Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Juniper SRX240 Monitoring Plugin (snmp)
1.12
2016-12-02
- Nagios 2.x
- Nagios 3.x
- Nagios 4.x
- Nagios XI
GPL
7861
File | Description |
---|---|
check_juniper.py | check_juniper.py |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
What it does:
- get FRU Units, its name and state based on OID (FRU)
- gets ( if aviable ) TEMP of FRU Units (TEMP)
- gets CPU- and MEM-Usage of System (SYSTEM)
- gets CPU- and MEM-Usage of SPU (SPU)
- gets, based on last Check, average throughput of Networks) (NETWORK)
For FRU,TEMP,SYSTEM and SPU monitoring this plugin runs through the ContentsIndex and getting Name, Type and State (Temp,CPU,MEM-Use) for each element listed in there. Based on what u specified to monitor ( -W ) it will return what you want.
For TEMP, SPU and SYSTEM is a definition of warning/crit max requierd.
In FRU Mode it will only return any Module isnt fine (online). if a FRU is Offline, it will return the Offline-Reason, too (textual). Empty slots are ignored.
In NETWORK mode, it will on first run store a ninimal file in /tmp, witch contains InOctets, OutOctets and Timestamp, what will be needed to calculate average speed on next run. It uses the Counter64 In/Out octets.
NOTE: Nagios-User need access rights to save Performance-Data Temporary( /temp) and run a Ping- Precheck ( /bin/ping )
Feel free to contact me, if you have any improvement.
17.10.2016
--BUGFIX for calculation of Network speed ---
02.12.2016
-- Fixed Minor Bug and Help Output reported by uvznap --
For TEMP, SPU and SYSTEM is a definition of warning/crit max requierd.
In FRU Mode it will only return any Module isnt fine (online). if a FRU is Offline, it will return the Offline-Reason, too (textual). Empty slots are ignored.
In NETWORK mode, it will on first run store a ninimal file in /tmp, witch contains InOctets, OutOctets and Timestamp, what will be needed to calculate average speed on next run. It uses the Counter64 In/Out octets.
NOTE: Nagios-User need access rights to save Performance-Data Temporary( /temp) and run a Ping- Precheck ( /bin/ping )
Feel free to contact me, if you have any improvement.
17.10.2016
--BUGFIX for calculation of Network speed ---
02.12.2016
-- Fixed Minor Bug and Help Output reported by uvznap --
Reviews (1)
byuvznab, November 27, 2016
1 of 1 people found this review helpful
This saved me hours (if not days) of work.
It works perfectly on my SRX100H.
Few comments to consider as improvements:
1. One minor bug exist in SNMPGET(oid) where Version needs to check if it's a string and fix it: result = netsnmp.snmpget(oid, Version = 2 if options.version == "2c" else int(options.version), DestHost=options.host, Community=options.community, Timeout=800000, Retries=0)[0]
2. Help text should state SPU instead of CPU as a valid input for the -W switch
3. It should be noted that it is assumed that the Nagios service user has access to /bin/ping and /tmp/juniper_lastdata.txt (mine wasn't and it took me 2 hours to find out why nothing works). Chown those two files if you share the same situation as I do.
4. NETWORKS switch won't work if /tmp/juniper_lastdata.txt doesn't exist. Quick fix: touch /tmp/juniper_lastdata.txt
5. I started writing an extension to check the disk utilization, but it's taking me longer than expected. I'll post my addition if I get around to finishing it.
Again, AWESOME work! Thanks for this plugin.
It works perfectly on my SRX100H.
Few comments to consider as improvements:
1. One minor bug exist in SNMPGET(oid) where Version needs to check if it's a string and fix it: result = netsnmp.snmpget(oid, Version = 2 if options.version == "2c" else int(options.version), DestHost=options.host, Community=options.community, Timeout=800000, Retries=0)[0]
2. Help text should state SPU instead of CPU as a valid input for the -W switch
3. It should be noted that it is assumed that the Nagios service user has access to /bin/ping and /tmp/juniper_lastdata.txt (mine wasn't and it took me 2 hours to find out why nothing works). Chown those two files if you share the same situation as I do.
4. NETWORKS switch won't work if /tmp/juniper_lastdata.txt doesn't exist. Quick fix: touch /tmp/juniper_lastdata.txt
5. I started writing an extension to check the disk utilization, but it's taking me longer than expected. I'll post my addition if I get around to finishing it.
Again, AWESOME work! Thanks for this plugin.
Owner's reply
Hey uvznap,
thanks for your review. I have updated the File in my Project. Please let me know when you have finished your disk utilization plugin, im interested in that ;)
Greetings,
Kalle