Hi all,
How can set up the Nagios for getting the result like this?
[root@PROBE00 ~]# /usr/local/nagios/libexec/check_snmp -H 10.18.0.254 -C public -o sysUpTime.0
SNMP OK - Timeticks: (395527839) 45 days, 18:41:18.39 |
I'm getting this result:
[root@mail ~]# /usr/local/nagios/libexec/check_snmp -H 10.18.0.254 -C public -o sysUpTime.0
SNMP OK - 395059058 | DISMAN-EVENT-MIB::sysUpTimeInstance=395059058
I've tried to copy switch.cfg, commands.cfg to the 1st machine to the 2nd but nothing changed.
Tks,
NTQ
Getting Timeticks result
Re: Getting Timeticks result
Hello truongquyen,
The plugin check_snmp returns what it return; ie:
There does not seem to be a provision in the plugin to return the value in days. However, a wrapper script could easily be created to perform the calculation and return the value you're looking for.
Also, this plugin on the exchange might provide what you're looking for:
https://exchange.nagios.org/directory/P ... me/details
The plugin check_snmp returns what it return; ie:
Code: Select all
/usr/local/nagios/libexec/check_snmp -H 10.18.0.254 -C public -o sysUpTime.0
SNMP OK - 395059058 | DISMAN-EVENT-MIB::sysUpTimeInstance=3950590581
Also, this plugin on the exchange might provide what you're looking for:
https://exchange.nagios.org/directory/P ... me/details
-
- Posts: 4
- Joined: Mon Nov 26, 2018 3:17 am
Re: Getting Timeticks result
Hi Brian,
Tks for your support but could you tell me how to do it? I tried to unzip the file then copied the check_snmp_uptime to usr/local/nagios/libexec and try to run the cmd but I get the result:
[root@mail libexec]# ./check_snmp_uptime -H 5.1.30.253 -C public -w 50 -c 100
-bash: ./check_snmp_uptime: /bin/bash^M: bad interpreter: No such file or directory
Could you tell me why and what should I do next?
Sorry, I'm newbie.
Tks again,
NTQ
Tks for your support but could you tell me how to do it? I tried to unzip the file then copied the check_snmp_uptime to usr/local/nagios/libexec and try to run the cmd but I get the result:
[root@mail libexec]# ./check_snmp_uptime -H 5.1.30.253 -C public -w 50 -c 100
-bash: ./check_snmp_uptime: /bin/bash^M: bad interpreter: No such file or directory
Could you tell me why and what should I do next?
Sorry, I'm newbie.
Tks again,
NTQ
Re: Getting Timeticks result
Hello truongquyen,
Rather than copying the file to /usr/local/nagios/libexec, Use the monitoring plugins link in the Core Configuration Manager to upload the plugin and select the Convert Line Endings checkbox which will remove the DOS ^M characters from the plugin. Let me know if you have any additional questions.
Rather than copying the file to /usr/local/nagios/libexec, Use the monitoring plugins link in the Core Configuration Manager to upload the plugin and select the Convert Line Endings checkbox which will remove the DOS ^M characters from the plugin. Let me know if you have any additional questions.