Issues adding Graph Template

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ewilliams
Posts: 9
Joined: Thu May 09, 2013 6:37 pm

Issues adding Graph Template

Post by ewilliams »

Hi,

We are going through the early stages of rolling out Nagios XI across the organisation.

V: Nagios XI 2012R1.7

I am trying to add the mysqld plugin and template and understand how they link together. I keep ending up with a graph that is working but it always uses the "default graph"

PLugin and graph: http://exchange.nagios.org/directory/Pl ... ld/details

I have downloaded the plugin from: http://exchange.nagios.org/components/c ... 4&cf_id=24 and loaded it into the plugins.

I have created a command :
command name: check_mysqld
command line: $USER1$/check_mysqld.pl -H $HOSTADDRESS$ -u nagios -p $ARG1$ -a uptime,threads_connected,questions,slow_queries,open_tables -w ',,,,' -c ',,,,' -A $USER21$

A service has been created called: mysqld
Config name: mysqld
Description: MySQLD
Ceck Command: check_mysqld
active is ticked.

I have downloaded the graph template and installed it via the nagios xi UI. check_mysqld.php from http://exchange.nagios.org/components/c ... 4&cf_id=36

Now. I have only used this via a passive check. So i have created a new NRDS configuration with the following:

command[check_mysqld]=/usr/local/nagios/libexec/check_mysqld.pl -H localhost -u nagios -p xxxx -F /etc/my.cnf -a uptime,threads_connected,questions,slow_queries,open_tables -w ",,,," -c ",,,," -A threads_running,innodb_row_lock_time_avg

Then added the item through inconfigured objects.

I can get data capturing however it always uses the default graph.

I have checked /usr/local/nagios/share/perfdata/HOST/

and a RRD and xml file are being created.

as you can see from the contents of the xml is is using the check_dummy template.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<NAGIOS>
<DATASOURCE>
<TEMPLATE>check_dummy</TEMPLATE>
<RRDFILE>/usr/local/nagios/share/perfdata/templ01-database-01.templeandwebster.com.au/check_mysqld.rrd</RRDFILE>
<RRD_STORAGE_TYPE>SINGLE</RRD_STORAGE_TYPE>
<RRD_HEARTBEAT>8460</RRD_HEARTBEAT>
<IS_MULTI>0</IS_MULTI>
<DS>1</DS>
<NAME>threads_running</NAME>
<LABEL>threads_running</LABEL>
<UNIT></UNIT>
<ACT>2</ACT>
<WARN></WARN>
<WARN_MIN></WARN_MIN>
<WARN_MAX></WARN_MAX>
<WARN_RANGE_TYPE></WARN_RANGE_TYPE>
<CRIT></CRIT>
<CRIT_MIN></CRIT_MIN>
<CRIT_MAX></CRIT_MAX>
<CRIT_RANGE_TYPE></CRIT_RANGE_TYPE>
<MIN></MIN>


I'm sure its something small or easy that I'm missing so any help would be great.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Issues adding Graph Template

Post by abrist »

I presume this is due to the check being configured passively. check_dummy will be used for a template as a result. Did you submit a ticket as well?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ewilliams
Posts: 9
Joined: Thu May 09, 2013 6:37 pm

Re: Issues adding Graph Template

Post by ewilliams »

Yep I submitted a ticket and received back the that it must be done through an active check.

So today we setup an active check and it now references the correct graph template name but now i just get a broken image instead of any graph.

I am getting back performance data on the check:
Performance Data: qcache_hits=2333961049 qcache_not_cached=43776751 binlog_cache_disk_use=9858 binlog_cache_use=18047824 connections=9058495 delayed_errors=0 delayed_insert_threads=0 slow_queries=114350 threads_running=3

I have browsed to /usr/local/nagios/share/perfdata/%hostname%/mysqld.xml and the details are below:

<NAGIOS>
<DATASOURCE>
<TEMPLATE>check_mysqld</TEMPLATE>
<RRDFILE>/usr/local/nagios/share/perfdata/templ01-db01.syd-a.ultraserve.net.au/MYSQLD.rrd</RRDFILE>
<RRD_STORAGE_TYPE>SINGLE</RRD_STORAGE_TYPE>
<RRD_HEARTBEAT>8460</RRD_HEARTBEAT>
<IS_MULTI>0</IS_MULTI>
<DS>1</DS>
<NAME>qcache_hits</NAME>
<LABEL>qcache_hits</LABEL>
<UNIT></UNIT>
<ACT>2318703505</ACT>
<WARN></WARN>
<WARN_MIN></WARN_MIN>
<WARN_MAX></WARN_MAX>
<WARN_RANGE_TYPE></WARN_RANGE_TYPE>
<CRIT></CRIT>
<CRIT_MIN></CRIT_MIN>
<CRIT_MAX></CRIT_MAX>
<CRIT_RANGE_TYPE></CRIT_RANGE_TYPE>
<MIN></MIN>
"MYSQLD.xml" 448L, 15762C
ewilliams
Posts: 9
Joined: Thu May 09, 2013 6:37 pm

Re: Issues adding Graph Template

Post by ewilliams »

i got it. problem of not reading the manual :oops:

2. Make sure you specify all attributes as below listed under
# '$USER21$' as a '-A' parameter to check_mysqld.pl plugin

I was only specifying some paremeter's thinking it would still work ok. pasted in all paremeter's, removed the rdd and xml files and it loaded and now its working.

Wow what a mission, but I do much better understand how graphing works in Nagiosxi so it was not a waste of time.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Issues adding Graph Template

Post by abrist »

Great! Should I close the ticket with impunity as well?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ewilliams
Posts: 9
Joined: Thu May 09, 2013 6:37 pm

Re: Issues adding Graph Template

Post by ewilliams »

Still having some issue with passive checks. Is it possible to get customer graphs to work on passive checks or only active checks?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Issues adding Graph Template

Post by slansing »

You should be able to graph passive checks "if" they return performance data, what checks are you specifically asking about? Do they show as returning performance data from their Service Details > Advanced page?
Locked