plugin get wrong exit and alert
plugin get wrong exit and alert
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.
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.
Re: plugin get wrong exit and alert
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:
The command to run:
I used
Perry
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'
The command to run:
Code: Select all
<yourpythonpath> unix_check_ping.pyThanks,python3 unix_check_ping.py
and resulted in: All hosts available
Perry
Re: plugin get wrong exit and alert
hi,
i tried chmod 777 for host.txt but no luck, still facing issue.
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.
Re: plugin get wrong exit and alert
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
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.xxxPerry
Re: plugin get wrong exit and alert
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.
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.
Re: plugin get wrong exit and alert
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
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.pyThanks,
Perry
Re: plugin get wrong exit and alert
hi Perry,
pls find attach file for detail.
thank you
pls find attach file for detail.
thank you
You do not have the required permissions to view the files attached to this post.
Re: plugin get wrong exit and alert
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:
Please let us know the results,
Perry
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.txtPerry
Re: plugin get wrong exit and alert
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.
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
Hello @sacom01
Excellent, I will go ahead and lock this post. If you have anything further please let us know,
Perry
Excellent, I will go ahead and lock this post. If you have anything further please let us know,
Perry