Reopen (UDP port 162 is taken by sh and python)
Reopen (UDP port 162 is taken by sh and python)
Hi, I want to reopen the previous case UDP port 162 is taken by sh and python. Link is here.
http://support.nagios.com/forum/viewtop ... 16&t=31105
Yesterday, I noticed some of the SNMP Traps are not updated on the nagios xi web interface even though nagios received the SNMP Traps from the remote hosts. Means with new snmptraphandling.py file, some device SNMP Traps can show on the NagiosXI web interface but some or not. So I just restore the previous snmptraphandling.py file.
Thanks.
http://support.nagios.com/forum/viewtop ... 16&t=31105
Yesterday, I noticed some of the SNMP Traps are not updated on the nagios xi web interface even though nagios received the SNMP Traps from the remote hosts. Means with new snmptraphandling.py file, some device SNMP Traps can show on the NagiosXI web interface but some or not. So I just restore the previous snmptraphandling.py file.
Thanks.
Re: Reopen (UDP port 162 is taken by sh and python)
Are there any listings in /var/log/snmptt/snmpttunknown.log?
Former Nagios employee
Re: Reopen (UDP port 162 is taken by sh and python)
As I remember I did some changes in that script based on our configuration.
If you see some of them bit dont see anothers - the script is working, it just must much following:
The host should be always in UPPERCASE.
Also this part is changed:
If you see some of them bit dont see anothers - the script is working, it just must much following:
The host should be always in UPPERCASE.
Code: Select all
def check_arg():
try:
host = sys.argv[1].upper()
Code: Select all
try:
if not sys.argv[5]:
mondata_res = sys.argv[6]
else:
mondata_res = sys.argv[6] + " / " + sys.argv[5]
Re: Reopen (UDP port 162 is taken by sh and python)
Are you just giving us an update or are you experiencing an issue?
Sorry, it just sounds like from the second post that everything is working and you're just informing us.
Sorry, it just sounds like from the second post that everything is working and you're just informing us.
Re: Reopen (UDP port 162 is taken by sh and python)
On our Nagios configuration it working as expected.
I have just informed what kind of changes else I did in additional to handling the nagios cmd file.
If @phyo wants to handle only nagios cmd file, he can just copy and paste the part of the file handling code.
I have just informed what kind of changes else I did in additional to handling the nagios cmd file.
If @phyo wants to handle only nagios cmd file, he can just copy and paste the part of the file handling code.
Re: Reopen (UDP port 162 is taken by sh and python)
All the snmp trap go to /var/log/snmptt/snmptt.log file. Some SNMP trap can update on the web interface but some are not.tmcdonald wrote:Are there any listings in /var/log/snmptt/snmpttunknown.log?
Re: Reopen (UDP port 162 is taken by sh and python)
Sorry questrad, I mistakenly thought you were OP.
phyo, did you modify the file to include the file handling code and is it working for you?
phyo, did you modify the file to include the file handling code and is it working for you?
Re: Reopen (UDP port 162 is taken by sh and python)
Change the code as "questrad" mention?ssax wrote:phyo, did you modify the file to include the file handling code and is it working for you?
Re: Reopen (UDP port 162 is taken by sh and python)
Take a look at the code changes that I did.
If your hosts are in upper and lower cases then you need to change following:
To:
Please try this one, I think your issue is that one, because you saying that some of you get some of you dont.
Check also this log: /tmp/snmptraphandling.log if you have the SNMP from thet host that you dont see in NagiosXI.
If your hosts are in upper and lower cases then you need to change following:
Code: Select all
def check_arg():
try:
host = sys.argv[1].upper(Code: Select all
def check_arg():
try:
host = sys.argv[1](Check also this log: /tmp/snmptraphandling.log if you have the SNMP from thet host that you dont see in NagiosXI.
Re: Reopen (UDP port 162 is taken by sh and python)
phyo, did you modify the file as questrad suggested (for the upper and lower case) and is it working for you?