Problem monitoring MYSQL socket (Zimbra)

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.
thomsany
Posts: 8
Joined: Wed Nov 16, 2016 2:56 pm

Re: Problem monitoring MYSQL socket (Zimbra)

Post by thomsany »

avandemore wrote:
thomsany wrote:Hmmm intersting, I am seeing the user nagios doesn't have the permission to run the command. I get the error mentioned before:
Please show the full output for the command.
This is the command inside the NRPE.cfg

Code: Select all

command[check_zimbra_mysql]=/usr/local/nagios/libexec/check_mysql -s /opt/zimbra/data/tmp/mysql/mysql.sock
This is the error I get:

Code: Select all

Can't connect to local MySQL server through socket '/opt/zimbra/data/tmp/mysql/mysql.sock' (13) 
I see the Xinetd is running as nagios user so maybe that's why on that particular command I am getting the error.
If I change it to root would it be dangerous?

Thanks,
Teo
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Problem monitoring MYSQL socket (Zimbra)

Post by avandemore »

thomsany wrote:If I change it to root would it be dangerous?
You know your environment better than us, but the daemon doesn't run as root to reduce security vectors. Most system administrators would likely avoid running any daemon as root unless necessary.
thomsany wrote:This is the error I get:
Please show the full command and output. eg /usr/local/nagios/libexec/check_mysql -s /opt/zimbra/data/tmp/mysql/mysql.sock <entirity of the command> + output
Previous Nagios employee
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Problem monitoring MYSQL socket (Zimbra)

Post by rkennedy »

This may be worth asking Zimbra as well, since it sounds like a change has been made based on how they work with the socket. (which could be security related)
Former Nagios Employee
thomsany
Posts: 8
Joined: Wed Nov 16, 2016 2:56 pm

Re: Problem monitoring MYSQL socket (Zimbra)

Post by thomsany »

Changed NRPE to run as Zimbra and the problem was solved with this particular Zimbra version.

Regards,
Teo
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Problem monitoring MYSQL socket (Zimbra)

Post by dwhitfield »

Glad your issue is fixed. Is it ok for us to lock this thread?
Locked