Update roles/pips/files/memory_usage.py
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3.11
|
||||||
"""Nagios plugin: report current memory usage.
|
"""Nagios plugin: report current memory usage.
|
||||||
|
|
||||||
Outputs a one-line status and perfdata and uses Nagios exit codes:
|
Outputs a one-line status and perfdata and uses Nagios exit codes:
|
||||||
@@ -49,7 +49,7 @@ def main():
|
|||||||
|
|
||||||
# Perfdata: used and total in MiB, and percent
|
# Perfdata: used and total in MiB, and percent
|
||||||
perf = (
|
perf = (
|
||||||
f"used={used_mb:.1f}MiB;{args.warning};{args.critical};0;{total_mb:.1f}"
|
f"used={used_mb:.1f}MiB;;;0;{total_mb:.1f}"
|
||||||
f" total={total_mb:.1f}MiB"
|
f" total={total_mb:.1f}MiB"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -59,4 +59,3 @@ def main():
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user