snmp traps
-
hanya.radwan
- Posts: 194
- Joined: Tue Feb 25, 2014 6:12 am
- Location: palestine
snmp traps
most snmp traps services aren't working as before(before upgrade to 2014 R1.0)
one snmp service at nagios 2014 R1.0 returns the following error:
External command error: Bad SIZE syntax (OCTETSTRING): At line 203 in /usr/share/snmp/mibs/HPOV-NNM.txt
Bad parse of OBJECT-TYPE: At line 203 in /usr/share/snmp/mibs/HPOV-NNM.txt
Did not find 'openViewSeverity' in module HPOV-NNM-MIB (/usr/share/snmp/mibs/ALCATEL-NMC-PROXY-AGENT-MIB.txt)
Timeout: No Response from 10.202.6.23:161.
and from test command, it gives the following error:
COMMAND: /usr/local/nagios/libexec/check_snmp -H 10.202.6.23 -P 2c -C public -o numberOfSessions.6 -u sessions --rate --rate-multiplier 300 -w 5: -c 1:
OUTPUT: Cannot create temporary filename
and from server returns the following:
[root@nms ~]# /usr/local/nagios/libexec/check_snmp -H 10.202.6.23 -P 2c -C public -o numberOfSessions.6 -u sessions --rate --rate-multiplier 300 -w 5: -c 1:
SNMP RATE CRITICAL - *0.3734827264* sessions | GLENAYRE-ILSP2-ASU-ALARMS-MIB::numberOfSessions.6=0.3734827264sessions;0;0;
one snmp service at nagios 2014 R1.0 returns the following error:
External command error: Bad SIZE syntax (OCTETSTRING): At line 203 in /usr/share/snmp/mibs/HPOV-NNM.txt
Bad parse of OBJECT-TYPE: At line 203 in /usr/share/snmp/mibs/HPOV-NNM.txt
Did not find 'openViewSeverity' in module HPOV-NNM-MIB (/usr/share/snmp/mibs/ALCATEL-NMC-PROXY-AGENT-MIB.txt)
Timeout: No Response from 10.202.6.23:161.
and from test command, it gives the following error:
COMMAND: /usr/local/nagios/libexec/check_snmp -H 10.202.6.23 -P 2c -C public -o numberOfSessions.6 -u sessions --rate --rate-multiplier 300 -w 5: -c 1:
OUTPUT: Cannot create temporary filename
and from server returns the following:
[root@nms ~]# /usr/local/nagios/libexec/check_snmp -H 10.202.6.23 -P 2c -C public -o numberOfSessions.6 -u sessions --rate --rate-multiplier 300 -w 5: -c 1:
SNMP RATE CRITICAL - *0.3734827264* sessions | GLENAYRE-ILSP2-ASU-ALARMS-MIB::numberOfSessions.6=0.3734827264sessions;0;0;
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: snmp traps
Looks like what I suspected, check_snmp does not have permissions to write to the directory where it will keep it's temp check files. Can you try running that command as root? Did you change the directory where that plugin places those files?:
http://comments.gmane.org/gmane.network ... ugins/5125
It appears to happen specifically with --rate.
http://comments.gmane.org/gmane.network ... ugins/5125
It appears to happen specifically with --rate.
Code: Select all
/usr/local/nagios/libexec/check_snmp -H 10.202.6.23 -P 2c -C public -o numberOfSessions.6 -u sessions --rate --rate-multiplier 300 -w 5: -c 1-
hanya.radwan
- Posts: 194
- Joined: Tue Feb 25, 2014 6:12 am
- Location: palestine
Re: snmp traps
the command gives the following:
[root@nms ~]# /usr/local/nagios/libexec/check_snmp -H 10.202.6.23 -P 2c -C public -o numberOfSessions.6 -u sessions --rate --rate-multiplier 300 -w 5: -c 1
SNMP RATE CRITICAL - *9.230769231* sessions | GLENAYRE-ILSP2-ASU-ALARMS-MIB::numberOfSessions.6=9.230769231sessions;0;1;
[root@nms ~]# /usr/local/nagios/libexec/check_snmp -H 10.202.6.23 -P 2c -C public -o numberOfSessions.6 -u sessions --rate --rate-multiplier 300 -w 5: -c 1
SNMP RATE CRITICAL - *9.230769231* sessions | GLENAYRE-ILSP2-ASU-ALARMS-MIB::numberOfSessions.6=9.230769231sessions;0;1;
-
hanya.radwan
- Posts: 194
- Joined: Tue Feb 25, 2014 6:12 am
- Location: palestine
Re: snmp traps
this folder already exit
[root@nms ~]# cd /usr/local/nagios/var/check_snmp/
[root@nms check_snmp]# ls
090807575257bb1dfbcd7cec6488d5eb71f09f15 65a1d36206f3776e19e3acce247344b76ea06ed6 b8ee451dc7181fcd18a1ce641dd3469ddba20e06
09f25ec8d66ee2729f1a1cd7aaf5e1f19ee97358 6721d919781777be47b01313812a755d5a637787 b9889ba04f68fb523ada0014b1317025986a8287
0d98923a74b5f6f749d85f291add56abb484089d 6c9d40a4230d5a0d7ce8744c5681ca7d13a6782b b999804c3fa889eeb558cd12fd84bb93fc52d4c7
17067aee5a3d60a54c66b2e44e4036a41892063f 74abd36187997cffe439b32fe09aaf5e28790ce2 ba70938b68691e93c3cc36a34810fb406730ac06
[root@nms ~]# cd /usr/local/nagios/var/check_snmp/
[root@nms check_snmp]# ls
090807575257bb1dfbcd7cec6488d5eb71f09f15 65a1d36206f3776e19e3acce247344b76ea06ed6 b8ee451dc7181fcd18a1ce641dd3469ddba20e06
09f25ec8d66ee2729f1a1cd7aaf5e1f19ee97358 6721d919781777be47b01313812a755d5a637787 b9889ba04f68fb523ada0014b1317025986a8287
0d98923a74b5f6f749d85f291add56abb484089d 6c9d40a4230d5a0d7ce8744c5681ca7d13a6782b b999804c3fa889eeb558cd12fd84bb93fc52d4c7
17067aee5a3d60a54c66b2e44e4036a41892063f 74abd36187997cffe439b32fe09aaf5e28790ce2 ba70938b68691e93c3cc36a34810fb406730ac06
-
hanya.radwan
- Posts: 194
- Joined: Tue Feb 25, 2014 6:12 am
- Location: palestine
Re: snmp traps
also check_snmp has the following permission
[root@nms ~]# ll -d /usr/local/nagios/var/check_snmp
drwx------ 2 nagios nagios 4096 Jun 9 20:48 /usr/local/nagios/var/check_snmp
[root@nms ~]# ll -d /usr/local/nagios/var/check_snmp
drwx------ 2 nagios nagios 4096 Jun 9 20:48 /usr/local/nagios/var/check_snmp
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: snmp traps
The with those permissions, the apache user, which is part of the nagios group would never be able to create or modify files in that directory. Try the following:
Now both apache(test command button) and nagios core can add\modify\remove files in that directory.
Code: Select all
rm -rf /usr/local/nagios/var/check_snmp/*
chmod ug+rw -R /usr/local/nagios/var/check_snmp/Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
hanya.radwan
- Posts: 194
- Joined: Tue Feb 25, 2014 6:12 am
- Location: palestine
Re: snmp traps
i did the command and the permissions becomes as the following:
[root@nms ~]# ll -d /usr/local/nagios/var/check_snmp
drwxrw---- 2 nagios nagios 4096 Jun 9 21:12 /usr/local/nagios/var/check_snmp
[root@nms ~]# ll -d /usr/local/nagios/var/check_snmp
drwxrw---- 2 nagios nagios 4096 Jun 9 21:12 /usr/local/nagios/var/check_snmp
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: snmp traps
That looks much better. Are you able to successfully run the command from nagios core now? Preferably by letting it be scheduled or by running an immediate check and not via the test command button?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
-
hanya.radwan
- Posts: 194
- Joined: Tue Feb 25, 2014 6:12 am
- Location: palestine
Re: snmp traps
the same error:
[root@nms ~]# /usr/local/nagios/libexec/check_snmp -H 10.202.6.23 -P 2c -C public -o numberOfSessions.6 -u sessions --rate --rate-multiplier 300 -w 5: -c 1
SNMP RATE WARNING - *0.0797089601* sessions | GLENAYRE-ILSP2-ASU-ALARMS-MIB::numberOfSessions.6=0.0797089601sessions;0;1;
COMMAND: /usr/local/nagios/libexec/check_snmp -H 10.202.6.23 -P 2c -C public -o numberOfSessions.6 -u sessions --rate --rate-multiplier 300 -w 5: -c 1:
OUTPUT: Cannot create temporary filename
from nagiosxi:
External command error: Bad SIZE syntax (OCTETSTRING): At line 203 in /usr/share/snmp/mibs/HPOV-NNM.txt
Bad parse of OBJECT-TYPE: At line 203 in /usr/share/snmp/mibs/HPOV-NNM.txt
Did not find 'openViewSeverity' in module HPOV-NNM-MIB (/usr/share/snmp/mibs/ALCATEL-NMC-PROXY-AGENT-MIB.txt)
Timeout: No Response from 10.202.6.23:161.
[root@nms ~]# /usr/local/nagios/libexec/check_snmp -H 10.202.6.23 -P 2c -C public -o numberOfSessions.6 -u sessions --rate --rate-multiplier 300 -w 5: -c 1
SNMP RATE WARNING - *0.0797089601* sessions | GLENAYRE-ILSP2-ASU-ALARMS-MIB::numberOfSessions.6=0.0797089601sessions;0;1;
COMMAND: /usr/local/nagios/libexec/check_snmp -H 10.202.6.23 -P 2c -C public -o numberOfSessions.6 -u sessions --rate --rate-multiplier 300 -w 5: -c 1:
OUTPUT: Cannot create temporary filename
from nagiosxi:
External command error: Bad SIZE syntax (OCTETSTRING): At line 203 in /usr/share/snmp/mibs/HPOV-NNM.txt
Bad parse of OBJECT-TYPE: At line 203 in /usr/share/snmp/mibs/HPOV-NNM.txt
Did not find 'openViewSeverity' in module HPOV-NNM-MIB (/usr/share/snmp/mibs/ALCATEL-NMC-PROXY-AGENT-MIB.txt)
Timeout: No Response from 10.202.6.23:161.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: snmp traps
Again, please do not use the test command button, this is run via the apache user and will often have issues overwriting files created by the nagios and root users, as it is now.COMMAND: /usr/local/nagios/libexec/check_snmp -H 10.202.6.23 -P 2c -C public -o numberOfSessions.6 -u sessions --rate --rate-multiplier 300 -w 5: -c 1:
OUTPUT: Cannot create temporary filename
As for these, the response should be identical between cli and running from the XI interface. Just to confirm, these are from the same system? I also note that your first command returns proper results, however the second times out due to the system not responding, this is very indicitive of either differing systems when running the command or network issues. Please try the following command.the same error:
[root@nms ~]# /usr/local/nagios/libexec/check_snmp -H 10.202.6.23 -P 2c -C public -o numberOfSessions.6 -u sessions --rate --rate-multiplier 300 -w 5: -c 1
SNMP RATE WARNING - *0.0797089601* sessions | GLENAYRE-ILSP2-ASU-ALARMS-MIB::numberOfSessions.6=0.0797089601sessions;0;1;
from nagiosxi:
External command error: Bad SIZE syntax (OCTETSTRING): At line 203 in /usr/share/snmp/mibs/HPOV-NNM.txt
Bad parse of OBJECT-TYPE: At line 203 in /usr/share/snmp/mibs/HPOV-NNM.txt
Did not find 'openViewSeverity' in module HPOV-NNM-MIB (/usr/share/snmp/mibs/ALCATEL-NMC-PROXY-AGENT-MIB.txt)
Timeout: No Response from 10.202.6.23:161.
Code: Select all
cd /usr/local/nagios/libexec
su - nagios ./check_snmp -H 10.202.6.23 -P 2c -C public -o numberOfSessions.6 -u sessions --rate --rate-multiplier 300 -w 5: -c 1:
OUTPUT: Cannot create temporary filenameNagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.