Page 1 of 1

Nagiosgraph and check_mysql not graphing

Posted: Tue Jul 23, 2013 12:40 am
by jobst
Hi

nagiosgraph produces no graphs when using "check_mysql":
- I checked the /var/nagiosgraph/rrd/HOST, there is no rrd file

- I checked /var/log/nagiosgraph/nagiosgraph.log and saw the following error:
hostname:HOST
servicedesc:mysql
output:Uptime: 17972 Threads: 1 Questions: 324633 Slow queries: 0 Opens: 104 Flush tables: 1 Open tables: 97 Queries per second avg: 11.934
perfdata:

- I read on the net the this would be due to a missing entry in the /etc/nagiosgraph/map file, so I added:

/output:Uptime.*(\d+).*Threads.*(\d+).*Questions.*(\d+).*Slo.*eries.*(\d+).*Opens.*(\d+).*Flu.*bles.*(\d+).*Ope.*bles: (\d+).*Queri.*avg.*([0-9]*\.?[0-9]*)
and push @s, [ 'mysql',
[ 'threads', GAUGE, $2 ],
[ 'questions', COUNTER, $3 ],
[ 'slowq', GAUGE, $4 ],
[ 'opens', GAUGE, $5 ],
[ 'flushT', GAUGE, $6 ],
[ 'openT', GAUGE, $7 ],
[ 'querys', GAUGE, $8 ]
];

and restarted everything but still producing the error.
What did I do wrong?

Jobst

Re: Nagiosgraph and check_mysql not graphing

Posted: Tue Jul 23, 2013 2:42 pm
by sreinhardt
Can you run the check command as you have it defined for this service via the command line and send us the output. Specifically does it include a | so that you have performance data?

Re: Nagiosgraph and check_mysql not graphing

Posted: Wed Jul 24, 2013 9:04 am
by jobst
Hi

thanks for the reply sreinhardt.

I just started using nagios ... it's all a bit new for me - so when you wrote "Specifically does it include a | so that you have performance data" I did some RTFM including the specs when writing/creating plugins.
The original "check_mysql" does not have a "|", so I re-wrote it.

I have a few other problems in the moment, for example the graphing suddenly stops and does not continue, I have no idea why.
I want to fix that first before I continue with check_mysql.

Jobst

Re: Nagiosgraph and check_mysql not graphing

Posted: Thu Jul 25, 2013 11:31 am
by abrist
You should turn on logging and then tail the nagiosgraph log as this will greatly help the troubleshooting process:
http://sourceforge.net/apps/mediawiki/n ... =Main_Page

Code: Select all

tail -25 /var/log/nagiosgraph.log
Post the output from a large tail here in code wraps.