Page 1 of 1
plugin get wrong exit and alert
Posted: Fri Aug 20, 2021 2:28 am
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.
Re: plugin get wrong exit and alert
Posted: Fri Aug 20, 2021 11:09 am
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
Re: plugin get wrong exit and alert
Posted: Sun Aug 22, 2021 10:20 pm
by sacom01
hi,
i tried chmod 777 for host.txt but no luck, still facing issue.
Re: plugin get wrong exit and alert
Posted: Mon Aug 23, 2021 12:38 pm
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.
Thanks,
Perry
Re: plugin get wrong exit and alert
Posted: Mon Aug 23, 2021 9:05 pm
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.
Re: plugin get wrong exit and alert
Posted: Tue Aug 24, 2021 9:54 am
by pbroste
Hello @sacom01
Thanks for following up, and want to see what the verbose event logging on this looks like.
Please provide the results so we can further review.
Thanks,
Perry
Re: plugin get wrong exit and alert
Posted: Tue Aug 24, 2021 8:33 pm
by sacom01
hi Perry,
pls find attach file for detail.
thank you
Re: plugin get wrong exit and alert
Posted: Wed Aug 25, 2021 10:35 am
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
Re: plugin get wrong exit and alert
Posted: Wed Aug 25, 2021 10:22 pm
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.
Re: plugin get wrong exit and alert
Posted: Thu Aug 26, 2021 8:54 am
by pbroste
Hello @sacom01
Excellent, I will go ahead and lock this post. If you have anything further please let us know,
Perry