Reopen (UDP port 162 is taken by sh and python)

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
phyo
Posts: 162
Joined: Sun Dec 01, 2013 10:50 pm

Re: Reopen (UDP port 162 is taken by sh and python)

Post by phyo »

Hi questrad,

Code: Select all

def check_arg():
        try:
                host = sys.argv[1](
or

Code: Select all

def check_arg():
        try:
                host = sys.argv[1]()
And need . between sys.argv[1] and () ?

How about this part?

Code: Select all

try:
                if  not sys.argv[5]:
                        mondata_res = sys.argv[6]
                else:
                        mondata_res = sys.argv[6] + " / " + sys.argv[5]
questrad
Posts: 160
Joined: Wed Mar 21, 2012 3:08 pm
Location: Toronto
Contact:

Re: Reopen (UDP port 162 is taken by sh and python)

Post by questrad »

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 
To:

Code: Select all

def check_arg():
        try:
                host = sys.argv[1] 
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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Reopen (UDP port 162 is taken by sh and python)

Post by ssax »

phyo, let us know if questrad's solution works for you.
phyo
Posts: 162
Joined: Sun Dec 01, 2013 10:50 pm

Re: Reopen (UDP port 162 is taken by sh and python)

Post by phyo »

questrad's solution is work for me.

Thanks questrad.
questrad
Posts: 160
Joined: Wed Mar 21, 2012 3:08 pm
Location: Toronto
Contact:

Re: Reopen (UDP port 162 is taken by sh and python)

Post by questrad »

@phy

It is good to hear that it works.
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Reopen (UDP port 162 is taken by sh and python)

Post by cmerchant »

We'll go ahead and close the thread. Thanks.
Locked