stderr:"/usr/local/nagios/libexec/check_nna.py", line 159

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
bcgriffin90
Posts: 14
Joined: Mon Dec 20, 2021 2:46 pm

Re: stderr:"/usr/local/nagios/libexec/check_nna.py", line 15

Post by bcgriffin90 »

[~]# /usr/local/nagios/libexec/check_nna.py -H 10.10.7.73 -K <key> -S 8 -m flows -w 10 -c 20 --verbose
File "/usr/local/nagios/libexec/check_nna.py", line 159
print "DOWN - The " + text_type + " you are trying to use doesn't exist"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("DOWN - The " + text_type + " you are trying to use doesn't exist")?
[~]# python2 /usr/local/nagios/libexec/check_nna.py -H 10.10.7.73 -K <key> -S 8 -m flows -w 10 -c 20 --verbose
And error was encountered:
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>
[~]# python2 /usr/local/nagios/libexec/check_nna.py -H 10.10.7.73 -K <key> -S 8 -m flows -w 10 -c 20 --verbose --secure
And error was encountered:
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:727)>
[~]# python2 /usr/local/nagios/libexec/check_nna.py -H 10.10.7.73 -K <key> -S 8 -m flows -w 10 -c 20 --verbose --secure --ignorecert
And error was encountered:
0
bcgriffin90
Posts: 14
Joined: Mon Dec 20, 2021 2:46 pm

Re: stderr:"/usr/local/nagios/libexec/check_nna.py", line 15

Post by bcgriffin90 »

I updated the httpd configuration with our certs and re-ran the commands:

[~]# python2 /usr/local/nagios/libexec/check_nna.py -H <url> -K <key> -S 8 -m flows -w 10 -c 20 --verbose --secure
And error was encountered:
0
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: stderr:"/usr/local/nagios/libexec/check_nna.py", line 15

Post by gsmith »

Awesome, that's what we want to see.

How does it look from XI now?

Thanks
bcgriffin90
Posts: 14
Joined: Mon Dec 20, 2021 2:46 pm

Re: stderr:"/usr/local/nagios/libexec/check_nna.py", line 15

Post by bcgriffin90 »

It is not working. Please see my earlier thread:

Good Morning,

My sym link was already set up the way you described. I updated the command within the gui, applied the configuration, and even rebooted the server. I'm now receiving a different error. Also, navigating to the 'network traffic analysis' tab for a given host results in the page spinning indefinitely.

UNKNOWN - Error occurred while running the plugin.

What's our next steps on this?

Thanks,
Colton
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: stderr:"/usr/local/nagios/libexec/check_nna.py", line 15

Post by gsmith »

Hi

Please run:
python2 /usr/local/nagios/libexec/check_nna.py -H <url> -K <key> -S 8 -m flows -w 10 -c 20 --verbose --secure

Once you have done that please get a System Profile so I can look at the logs:
1. Login to the Nagios XI GUI using a web browser.
2. Click the "Admin" > "System Config" > "System Profile" menu pick
3. Click the "Download Profile" button
4. Save the profile.zip file and share the file in a private message and then reply to this post to bring it up in the queue.

Thanks
bcgriffin90
Posts: 14
Joined: Mon Dec 20, 2021 2:46 pm

Re: stderr:"/usr/local/nagios/libexec/check_nna.py", line 15

Post by bcgriffin90 »

I tried sending you the profile.zip via DM, but it just sits in my outbox like the last message I tried to send. So I sent it to your email.
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: stderr:"/usr/local/nagios/libexec/check_nna.py", line 15

Post by gsmith »

Hi

On your NNA server please run the following and send me the output:

Code: Select all

mysql -u root -pnagiosna nagiosna
select * from nagiosna_Sources;
ifmysql -u root -pnagiosna nagiosna doesn't work use: mysql -u root nagiosna

Thanks
bcgriffin90
Posts: 14
Joined: Mon Dec 20, 2021 2:46 pm

Re: stderr:"/usr/local/nagios/libexec/check_nna.py", line 15

Post by bcgriffin90 »

I sent you the results via email.

Thanks
gsmith
Posts: 1253
Joined: Tue Mar 02, 2021 11:15 am

Re: stderr:"/usr/local/nagios/libexec/check_nna.py", line 15

Post by gsmith »

Hi

In the command:
python2 /usr/local/nagios/libexec/check_nna.py -H <url> -K <key> -S 8 -m flows -w 10 -c 20 --verbose --secure

The S option's value is the SID of the source you are trying to monitor. Upon looking at the results of the database
query I see there is no SID of 8, so please try using a different SID from the query:
netflow.png
Let me know the results.

Thanks
You do not have the required permissions to view the files attached to this post.
bcgriffin90
Posts: 14
Joined: Mon Dec 20, 2021 2:46 pm

Re: stderr:"/usr/local/nagios/libexec/check_nna.py", line 15

Post by bcgriffin90 »

[~]# python2 /usr/local/nagios/libexec/check_nna.py -H nagiosna.parts4heat.com -K <api key> -S 2 -m flows -w 10 -c 20 --verbose --secure
CRITICAL - 13359 flows sent/recieved|flows=13359
Locked