Page 2 of 2

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

Posted: Fri Mar 13, 2015 11:53 pm
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]

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

Posted: Sat Mar 14, 2015 8:09 pm
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.

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

Posted: Mon Mar 16, 2015 10:06 am
by ssax
phyo, let us know if questrad's solution works for you.

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

Posted: Mon Mar 30, 2015 9:31 pm
by phyo
questrad's solution is work for me.

Thanks questrad.

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

Posted: Tue Mar 31, 2015 6:19 am
by questrad
@phy

It is good to hear that it works.

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

Posted: Tue Mar 31, 2015 8:27 am
by cmerchant
We'll go ahead and close the thread. Thanks.