Page 1 of 1

mysql monitoring throwing stderr: /bin/sh errror

Posted: Tue Mar 06, 2018 6:49 am
by transline
Moderator Edit: This thread has been split from another - https://support.nagios.com/forum/viewto ... =6&t=47771

In the future, please create a new thread and link to the old one instead of adding on.


Hello there,

ive got the same problem, i wanted to monitor a mssql server and got the same error.
So i tried your solution but it didn't work :(

Maybe i've done something wrong.
I installed dos2unix like u said, then i tried:

Code: Select all

dos2unix /usr/local/nagios/libexec/ceck_mssql_server.py
don't know if this is the right plugin or not. I've only got the NagiosXi standard plugins, so have i really to convert this one?

Sorry im a completely beginner here, many thanks for help :)

Re: mysql monitoring throwing stderr: /bin/sh errror

Posted: Tue Mar 06, 2018 4:09 pm
by cdienger
Not sure if it was just a typo here but it looks like there was a typo in command. Try:

Code: Select all

dos2unix /usr/local/nagios/libexec/check_mssql_server.py

Re: mysql monitoring throwing stderr: /bin/sh errror

Posted: Wed Mar 07, 2018 8:26 am
by transline
Hello,

yes it was a typo in my comment, the command was executet succesfully but it didn't help

what else could i do?

Re: mysql monitoring throwing stderr: /bin/sh errror

Posted: Thu Mar 08, 2018 11:18 am
by cdienger
I've attached a good copy here in case the one you have still has problems. Replace the one on the system with this one and make sure the permissions/owernship is set:

chmod 775 /usr/local/nagios/libexec/check_mssql_server.py
chown apache:nagios /usr/local/nagios/libexec/check_mssql_server.py

Re: mysql monitoring throwing stderr: /bin/sh errror

Posted: Tue Mar 13, 2018 3:44 am
by transline
Hello,

i got it. My failure was a "!" in the userpassword, changed it, now its working :)

Re: mysql monitoring throwing stderr: /bin/sh errror

Posted: Tue Mar 13, 2018 11:03 am
by tmcdonald
Glad to hear it! I'll be closing this up now, but feel free to open another thread if you need anything in the future!