Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
shamrozkadiwal
Posts: 74 Joined: Thu Jan 25, 2018 1:13 am
Post
by shamrozkadiwal » Wed May 08, 2019 12:50 pm
I dont think so this would be an issued but I have commented out it just for safe side.
Code: Select all
/etc/nagios/objects/commands.cfg: command_name check_zookeeper
/etc/nagios/objects/commands.cfg: command_line $USER1$/check_plugin.pl $USER1$/check_zookeeper.pl -H $HOSTADDRESS$ -P 4150
I have also modified /etc/group as you directed and also attached new info.txt.
Attachments
info.txt
(220.01 KiB) Downloaded 220 times
tgriep
Madmin
Posts: 9177 Joined: Thu Oct 30, 2014 9:02 am
Post
by tgriep » Wed May 08, 2019 1:15 pm
I think I found what the issue is.
The file was opened with a editor that added carriage returns in the script and that is causing the error.
Install an application on the Nagios server called dos2unix and then run the following to remove them.
Code: Select all
dos2unix /usr/lib/nagios/plugins/check_zookeeper_apache.py
Test the plugin and let us know if it works.
Be sure to check out our
Knowledgebase for helpful articles and solutions!
shamrozkadiwal
Posts: 74 Joined: Thu Jan 25, 2018 1:13 am
Post
by shamrozkadiwal » Fri May 10, 2019 11:11 am
This is a Gentoo server and have some issue with repository. We cant take any risk to install and break the box. Is there any alternate to fix the script?
shamrozkadiwal
Posts: 74 Joined: Thu Jan 25, 2018 1:13 am
Post
by shamrozkadiwal » Fri May 10, 2019 11:50 am
I ran this command instead of installing dos2unix.
Code: Select all
# cat check_zookeeper_apache.py | tr -d '\015' > ./check_zookeeper_apache_new.py
Attachments
tgriep
Madmin
Posts: 9177 Joined: Thu Oct 30, 2014 9:02 am
Post
by tgriep » Fri May 10, 2019 1:04 pm
It looks like removing the characters made the plugin work for you.
Let us know if you have any further questions or that we can lock the post.
Be sure to check out our
Knowledgebase for helpful articles and solutions!
shamrozkadiwal
Posts: 74 Joined: Thu Jan 25, 2018 1:13 am
Post
by shamrozkadiwal » Mon May 13, 2019 12:20 pm
I really appreciate all the help. Please close the ticket.
Thanks!