Download details

check_mem check_mem.php

Informationen
Erstelldatum 17.03.2021
Änderungsdatum 02.05.2021
Version 1.20210325
Dateigröße 2.21 KB
Downloads 55
Lizenz MIT Lizenz external
Preis Donate PayPal

 

Nagios Plugin to check memory over snmp (Linux/Windows)

You need to install php-snmp


/usr/bin/php ./check_mem.php -H 192.168.2.212 -m linux -o KB -w 80 -c 90
OK - 65.7% (/2662328KB/4050928KB) | TOTAL=4050928KB;3240742;3645835;; USED=2662328KB;;;; FREE= 291712KB;;;; CACHES=1096888KB;;;;

/usr/bin/php ./check_mem.php -H 192.168.2.11 -m windows -o KB
OK - 34.7 (5797888KB/16686976 KB) | TOTAL: 16686976KB;13349581;15018278;; USED=5797888KB;;;; FREE=10889088KB;;;;
 


 

Usage:

/usr/bin/php check_mem.php -H [host] -P [snmp_version] (-w [Warning] -c [Critical] -v (debug) -V (snmp debug))

 

snmp_version  2

-C [community string] (default -C public)

              3

-u [user] -p [password] -a [auth. prot. (MD5/SHA] ( -x [priv. proto. (DES/AES)] -X [priv. password])

-m mode

linux (default)
windows

-o output/perfdata

B=Byte (default)
KB=KByte
MB=MByte
GB=GByte

                        


 

memory

Changelog

Version 1.20210325
update output (used/total)


Version 1.20210319
timeout correction, if a windows system is not reachable


Version 1.20210317
First Release

  

Would you like to support me?
Then donate to PayPal...