Update roles/pips/files/memory_usage.py

This commit is contained in:
2025-12-04 08:02:02 +01:00
parent b4637ccf89
commit 6ee90eabea
+2 -3
View File
@@ -1,4 +1,4 @@
#!/usr/bin/env python3
#!/usr/bin/env python3.11
"""Nagios plugin: report current memory usage.
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
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"
)
@@ -59,4 +59,3 @@ def main():
if __name__ == "__main__":
main()