Page 1 of 1

Nagios core pluggin not detected Mysql_query

Posted: Mon Nov 02, 2020 3:16 pm
by azura1003
Hi guys,

I'm asking for support because I have wasted a lot of my time trying to find solution on google without succes.

I'm trying to configure a probe to check some criteras into my mariadb sql base. The pluggin i'm installation is check_mysql_query.

But this plugging is not detected by my nagios server.

this is the shema of my infrastructure :

UBUTUN VM Wordpress server with an NRPE + MARIA DB ------------------------------------------ UBUTUN WN with nagios server

the goal is to monitor the worpress sql base and check when more than 4 comments are posted.

See bellow my NRPE.CFG file + interface screenshot
https://ibb.co/HrY5dpL

If someone have a clue ?
Thanks in advance

Re: Nagios core pluggin not detected Mysql_query

Posted: Tue Nov 03, 2020 3:37 pm
by benjaminsmith
Hi,

It might be the permissions on the plugin, log in to the server as the Nagios user, and try running the full plugin. Do you get valid results back?

Code: Select all

su - nagios
/usr/local/nagios/libexec/check_mysql_query -H localhost -u test -p test -d wordpress -q "SELECT COUNT(c.comment_date) FROM wp_comments as c where hour(timediff( localtime(), c.comment_date )) < 4" -w 4 -c 10 
Let me what you find out.

Benjamin