plugin get wrong exit and alert

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sacom01
Posts: 194
Joined: Wed Dec 23, 2020 10:15 pm

plugin get wrong exit and alert

Post by sacom01 »

hi team,
i have a plugin for checking hosts available or not. Everything work fine on UAT env but always get wrong exit and on Production env. I have attach the plugin pls help me

UAT env : Naigos XI v5.7.3, OS : Rhel 7,
Client svr : NCPA agent : v2.2.2, OS : Rhel 7.4.


PROD env : Nagios XI v5.8.1, OS : Rhel 7.9,
Client svr : NCPA agent : v2.2.2, OS : Rhel 7.9.
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: plugin get wrong exit and alert

Post by pbroste »

Hello @sacom01

Thanks for reaching out, in test the 'unix_check_ping.py command we see that it is pulling the list of hosts to check from:
  • '/usr/local/ncpa/plugins/host.txt'
Please verify that the list of hosts are included and that it the owner/group on host.txt is readable.

The command to run:

Code: Select all

<yourpythonpath> unix_check_ping.py
I used
python3 unix_check_ping.py
and resulted in: All hosts available
Thanks,
Perry
sacom01
Posts: 194
Joined: Wed Dec 23, 2020 10:15 pm

Re: plugin get wrong exit and alert

Post by sacom01 »

hi,
i tried chmod 777 for host.txt but no luck, still facing issue.
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: plugin get wrong exit and alert

Post by pbroste »

Hello @sacom01

Thanks for following up, appears that we receive "Host is not available". Wondering if the host is pingable?

I want to verify that you are able to ping the device/host.

Code: Select all

ping xxx.xxx.xxx.xxx
Thanks,
Perry
sacom01
Posts: 194
Joined: Wed Dec 23, 2020 10:15 pm

Re: plugin get wrong exit and alert

Post by sacom01 »

hi Perry,
the problem is no host unavailable, all hosts able to ping. You can see the picture, it show alert without any host.
thank you.
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: plugin get wrong exit and alert

Post by pbroste »

Hello @sacom01

Thanks for following up, and want to see what the verbose event logging on this looks like.

Code: Select all

python3 -v -d unix_check_ping.py
Please provide the results so we can further review.

Thanks,
Perry
sacom01
Posts: 194
Joined: Wed Dec 23, 2020 10:15 pm

Re: plugin get wrong exit and alert

Post by sacom01 »

hi Perry,
pls find attach file for detail.
thank you
You do not have the required permissions to view the files attached to this post.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: plugin get wrong exit and alert

Post by pbroste »

Hello @sacom01

Thanks for following up and providing the verbose results on the 'unix_check_ping.py command.

After review I am totally perplexed because we don't see anything failing other than the fact that we receive a 'Critical -Host is not available' warning message. You stated in the previous post that you are able to successfully ping the host. Are you pinging via FQDN or IP Address; please verify both are reachable and resolve (DNS).

Let's go ahead and download and try the 'check_ping_ip_list_file.sh' from the plugin exchange. With many options to alter the script to your liking if you decide to use it.

Example:

Code: Select all

./check_ping_ip_list_file.sh -p 2 -w 600,3% -c 1000,6% -f list_ip.txt
Please let us know the results,
Perry
sacom01
Posts: 194
Joined: Wed Dec 23, 2020 10:15 pm

Re: plugin get wrong exit and alert

Post by sacom01 »

hi Perry,
the service work fine now. i have to filter row by row in host file. Maybe it have strange character or anything.
Many thanks for your help.
pls close topic.
User avatar
pbroste
Posts: 1288
Joined: Tue Jun 01, 2021 1:27 pm

Re: plugin get wrong exit and alert

Post by pbroste »

Hello @sacom01

Excellent, I will go ahead and lock this post. If you have anything further please let us know,
Perry
Locked