mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix: Override -H for check_load service. Fixed backslash escaping. (#8020)
* Added check_load.inc.php. * Combined load graphs. Removed extra backslashes from all graphs. Escaped backslash in mysql file. * Added a note about local only service checks to the docs.
This commit is contained in:
@@ -3,8 +3,8 @@ source: Extensions/Services.md
|
|||||||
|
|
||||||
Services within LibreNMS provides the ability to use Nagios plugins to perform additional monitoring outside of SNMP.
|
Services within LibreNMS provides the ability to use Nagios plugins to perform additional monitoring outside of SNMP.
|
||||||
|
|
||||||
**These services are tied into an existing device so you need at least one device that supports SNMP to be able to add it
|
**These services are tied into an existing device so you need at least one device to be able to add it
|
||||||
to LibreNMS - localhost is a good one. This is needed in order for alerting to work properly.**
|
to LibreNMS - localhost is a good one. This is needed in order for alerting to work properly.**
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
@@ -37,6 +37,8 @@ Finally, you now need to add check-services.php to the current cron file (/etc/c
|
|||||||
|
|
||||||
Now you can add services via the main Services link in the navbar, or via the 'Add Service' link within the device, services page.
|
Now you can add services via the main Services link in the navbar, or via the 'Add Service' link within the device, services page.
|
||||||
|
|
||||||
|
Note that some services (procs, inodes, load and similar) will always poll the local LibreNMS server it's running on, regardless of which device you add it to.
|
||||||
|
|
||||||
## Performance data
|
## Performance data
|
||||||
|
|
||||||
By default, the check-services script will collect all performance data that the Nagios script returns and display each datasource on a separate graph.
|
By default, the check-services script will collect all performance data that the Nagios script returns and display each datasource on a separate graph.
|
||||||
|
@@ -80,7 +80,7 @@ if ($services[$vars['service']]['service_ds'] != "") {
|
|||||||
$rrd_additions .= " AREA:DS#" . $color . ":'" . str_pad(substr(ucfirst($ds)." (".$label.")", 0, 15), 15) . "' ";
|
$rrd_additions .= " AREA:DS#" . $color . ":'" . str_pad(substr(ucfirst($ds)." (".$label.")", 0, 15), 15) . "' ";
|
||||||
$rrd_additions .= " GPRINT:DS:LAST:%5.2lf%s ";
|
$rrd_additions .= " GPRINT:DS:LAST:%5.2lf%s ";
|
||||||
$rrd_additions .= " GPRINT:DS:AVERAGE:%5.2lf%s ";
|
$rrd_additions .= " GPRINT:DS:AVERAGE:%5.2lf%s ";
|
||||||
$rrd_additions .= " GPRINT:DS:MAX:%5.2lf%s\\\l ";
|
$rrd_additions .= " GPRINT:DS:MAX:%5.2lf%s\\l ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -11,20 +11,20 @@ $check_graph['rtt'] = " DEF:DS0=" . $rrd_filename . ":rta:AVERAGE ";
|
|||||||
$check_graph['rtt'] .= " LINE1.25:DS0#" . $config['graph_colours']['mixed'][0] . ":'" . str_pad(substr("Round Trip Average", 0, 15), 15) . "' ";
|
$check_graph['rtt'] .= " LINE1.25:DS0#" . $config['graph_colours']['mixed'][0] . ":'" . str_pad(substr("Round Trip Average", 0, 15), 15) . "' ";
|
||||||
$check_graph['rtt'] .= " GPRINT:DS0:LAST:%5.2lf%s ";
|
$check_graph['rtt'] .= " GPRINT:DS0:LAST:%5.2lf%s ";
|
||||||
$check_graph['rtt'] .= " GPRINT:DS0:AVERAGE:%5.2lf%s ";
|
$check_graph['rtt'] .= " GPRINT:DS0:AVERAGE:%5.2lf%s ";
|
||||||
$check_graph['rtt'] .= " GPRINT:DS0:MAX:%5.2lf%s\\\l ";
|
$check_graph['rtt'] .= " GPRINT:DS0:MAX:%5.2lf%s\\l ";
|
||||||
$check_graph['rtt'] .= " DEF:DS1=" . $rrd_filename . ":rtmax:AVERAGE ";
|
$check_graph['rtt'] .= " DEF:DS1=" . $rrd_filename . ":rtmax:AVERAGE ";
|
||||||
$check_graph['rtt'] .= " LINE1.25:DS1#" . $config['graph_colours']['mixed'][1] . ":'" . str_pad(substr("Round Trip Max", 0, 15), 15) . "' ";
|
$check_graph['rtt'] .= " LINE1.25:DS1#" . $config['graph_colours']['mixed'][1] . ":'" . str_pad(substr("Round Trip Max", 0, 15), 15) . "' ";
|
||||||
$check_graph['rtt'] .= " GPRINT:DS1:LAST:%5.2lf%s ";
|
$check_graph['rtt'] .= " GPRINT:DS1:LAST:%5.2lf%s ";
|
||||||
$check_graph['rtt'] .= " GPRINT:DS1:AVERAGE:%5.2lf%s ";
|
$check_graph['rtt'] .= " GPRINT:DS1:AVERAGE:%5.2lf%s ";
|
||||||
$check_graph['rtt'] .= " GPRINT:DS1:MAX:%5.2lf%s\\\l ";
|
$check_graph['rtt'] .= " GPRINT:DS1:MAX:%5.2lf%s\\l ";
|
||||||
$check_graph['rtt'] .= " DEF:DS2=" . $rrd_filename . ":rtmin:AVERAGE ";
|
$check_graph['rtt'] .= " DEF:DS2=" . $rrd_filename . ":rtmin:AVERAGE ";
|
||||||
$check_graph['rtt'] .= " LINE1.25:DS2#" . $config['graph_colours']['mixed'][2] . ":'" . str_pad(substr("Round Trip Min", 0, 15), 15) . "' ";
|
$check_graph['rtt'] .= " LINE1.25:DS2#" . $config['graph_colours']['mixed'][2] . ":'" . str_pad(substr("Round Trip Min", 0, 15), 15) . "' ";
|
||||||
$check_graph['rtt'] .= " GPRINT:DS2:LAST:%5.2lf%s ";
|
$check_graph['rtt'] .= " GPRINT:DS2:LAST:%5.2lf%s ";
|
||||||
$check_graph['rtt'] .= " GPRINT:DS2:AVERAGE:%5.2lf%s ";
|
$check_graph['rtt'] .= " GPRINT:DS2:AVERAGE:%5.2lf%s ";
|
||||||
$check_graph['rtt'] .= " GPRINT:DS2:MAX:%5.2lf%s\\\l ";
|
$check_graph['rtt'] .= " GPRINT:DS2:MAX:%5.2lf%s\\l ";
|
||||||
|
|
||||||
$check_graph['pl'] = " DEF:DS0=" . $rrd_filename . ":pl:AVERAGE ";
|
$check_graph['pl'] = " DEF:DS0=" . $rrd_filename . ":pl:AVERAGE ";
|
||||||
$check_graph['pl'] .= " AREA:DS0#" . $config['graph_colours']['mixed'][2] . ":'" . str_pad(substr("Packet Loss (%)", 0, 15), 15) . "' ";
|
$check_graph['pl'] .= " AREA:DS0#" . $config['graph_colours']['mixed'][2] . ":'" . str_pad(substr("Packet Loss (%)", 0, 15), 15) . "' ";
|
||||||
$check_graph['pl'] .= " GPRINT:DS0:LAST:%5.2lf%s ";
|
$check_graph['pl'] .= " GPRINT:DS0:LAST:%5.2lf%s ";
|
||||||
$check_graph['pl'] .= " GPRINT:DS0:AVERAGE:%5.2lf%s ";
|
$check_graph['pl'] .= " GPRINT:DS0:AVERAGE:%5.2lf%s ";
|
||||||
$check_graph['pl'] .= " GPRINT:DS0:MAX:%5.2lf%s\\\l ";
|
$check_graph['pl'] .= " GPRINT:DS0:MAX:%5.2lf%s\\l ";
|
||||||
|
31
includes/services/check_load.inc.php
Normal file
31
includes/services/check_load.inc.php
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// provide some sane default
|
||||||
|
if ($service['service_param']) {
|
||||||
|
$params = $service['service_param'];
|
||||||
|
} else {
|
||||||
|
$params = "-w 5,5,5 -c 10,10,10";
|
||||||
|
}
|
||||||
|
|
||||||
|
$check_cmd = $config['nagios_plugins'] . "/check_load " . $params;
|
||||||
|
|
||||||
|
// Check DS is a json array of the graphs that are available
|
||||||
|
$check_ds = '{"load":""}';
|
||||||
|
|
||||||
|
// Build the graph data
|
||||||
|
$check_graph = array();
|
||||||
|
$check_graph['load'] = " DEF:DS0=" . $rrd_filename . ":load1:AVERAGE ";
|
||||||
|
$check_graph['load'] .= " LINE1.25:DS0#" . $config['graph_colours']['mixed'][0] . ":'" . str_pad(substr("Load 1", 0, 15), 15) . "' ";
|
||||||
|
$check_graph['load'] .= " GPRINT:DS0:LAST:%5.2lf%s ";
|
||||||
|
$check_graph['load'] .= " GPRINT:DS0:AVERAGE:%5.2lf%s ";
|
||||||
|
$check_graph['load'] .= " GPRINT:DS0:MAX:%5.2lf%s\\l ";
|
||||||
|
$check_graph['load'] .= " DEF:DS1=" . $rrd_filename . ":load5:AVERAGE ";
|
||||||
|
$check_graph['load'] .= " LINE1.25:DS1#" . $config['graph_colours']['mixed'][1] . ":'" . str_pad(substr("Load 5", 0, 15), 15) . "' ";
|
||||||
|
$check_graph['load'] .= " GPRINT:DS1:LAST:%5.2lf%s ";
|
||||||
|
$check_graph['load'] .= " GPRINT:DS1:AVERAGE:%5.2lf%s ";
|
||||||
|
$check_graph['load'] .= " GPRINT:DS1:MAX:%5.2lf%s\\l ";
|
||||||
|
$check_graph['load'] .= " DEF:DS2=" . $rrd_filename . ":load15:AVERAGE ";
|
||||||
|
$check_graph['load'] .= " LINE1.25:DS2#" . $config['graph_colours']['mixed'][2] . ":'" . str_pad(substr("Load 15", 0, 15), 15) . "' ";
|
||||||
|
$check_graph['load'] .= " GPRINT:DS2:LAST:%5.2lf%s ";
|
||||||
|
$check_graph['load'] .= " GPRINT:DS2:AVERAGE:%5.2lf%s ";
|
||||||
|
$check_graph['load'] .= " GPRINT:DS2:MAX:%5.2lf%s\\l ";
|
@@ -18,44 +18,44 @@ $check_graph['mysqlqueries'] = " DEF:DS0=" . $rrd_filename . ":Queries:AVERAGE "
|
|||||||
$check_graph['mysqlqueries'] .= " LINE1.25:DS0#" . $config['graph_colours']['mixed'][1] . ":'" . str_pad(substr("Queries", 0, 19), 19) . "' ";
|
$check_graph['mysqlqueries'] .= " LINE1.25:DS0#" . $config['graph_colours']['mixed'][1] . ":'" . str_pad(substr("Queries", 0, 19), 19) . "' ";
|
||||||
$check_graph['mysqlqueries'] .= " GPRINT:DS0:LAST:%0.0lf ";
|
$check_graph['mysqlqueries'] .= " GPRINT:DS0:LAST:%0.0lf ";
|
||||||
$check_graph['mysqlqueries'] .= " GPRINT:DS0:AVERAGE:%0.0lf ";
|
$check_graph['mysqlqueries'] .= " GPRINT:DS0:AVERAGE:%0.0lf ";
|
||||||
$check_graph['mysqlqueries'] .= " GPRINT:DS0:MAX:%0.0lf\l ";
|
$check_graph['mysqlqueries'] .= " GPRINT:DS0:MAX:%0.0lf\\l ";
|
||||||
$check_graph['mysqlqueries'] .= " DEF:DS1=" . $rrd_filename . ":Questions:AVERAGE ";
|
$check_graph['mysqlqueries'] .= " DEF:DS1=" . $rrd_filename . ":Questions:AVERAGE ";
|
||||||
$check_graph['mysqlqueries'] .= " LINE1.25:DS1#" . $config['graph_colours']['mixed'][2] . ":'" . str_pad(substr("Questions", 0, 19), 19) . "' ";
|
$check_graph['mysqlqueries'] .= " LINE1.25:DS1#" . $config['graph_colours']['mixed'][2] . ":'" . str_pad(substr("Questions", 0, 19), 19) . "' ";
|
||||||
$check_graph['mysqlqueries'] .= " GPRINT:DS1:LAST:%0.0lf ";
|
$check_graph['mysqlqueries'] .= " GPRINT:DS1:LAST:%0.0lf ";
|
||||||
$check_graph['mysqlqueries'] .= " GPRINT:DS1:AVERAGE:%0.0lf ";
|
$check_graph['mysqlqueries'] .= " GPRINT:DS1:AVERAGE:%0.0lf ";
|
||||||
$check_graph['mysqlqueries'] .= " GPRINT:DS1:MAX:%0.0lf\l ";
|
$check_graph['mysqlqueries'] .= " GPRINT:DS1:MAX:%0.0lf\\l ";
|
||||||
|
|
||||||
|
|
||||||
$check_graph['mysql'] = " DEF:DS0=" . $rrd_filename . ":Connections:AVERAGE ";
|
$check_graph['mysql'] = " DEF:DS0=" . $rrd_filename . ":Connections:AVERAGE ";
|
||||||
$check_graph['mysql'] .= " LINE1.25:DS0#" . $config['graph_colours']['mixed'][0] . ":'" . str_pad(substr("Connections", 0, 19), 19) . "' ";
|
$check_graph['mysql'] .= " LINE1.25:DS0#" . $config['graph_colours']['mixed'][0] . ":'" . str_pad(substr("Connections", 0, 19), 19) . "' ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS0:LAST:%5.2lf%s ";
|
$check_graph['mysql'] .= " GPRINT:DS0:LAST:%5.2lf%s ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS0:AVERAGE:%5.2lf%s ";
|
$check_graph['mysql'] .= " GPRINT:DS0:AVERAGE:%5.2lf%s ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS0:MAX:%5.2lf%s\l ";
|
$check_graph['mysql'] .= " GPRINT:DS0:MAX:%5.2lf%s\\l ";
|
||||||
$check_graph['mysql'] .= " DEF:DS1=" . $rrd_filename . ":Open_files:AVERAGE ";
|
$check_graph['mysql'] .= " DEF:DS1=" . $rrd_filename . ":Open_files:AVERAGE ";
|
||||||
$check_graph['mysql'] .= " LINE1.25:DS1#" . $config['graph_colours']['mixed'][3] . ":'" . str_pad(substr("Open_files", 0, 19), 19) . "' ";
|
$check_graph['mysql'] .= " LINE1.25:DS1#" . $config['graph_colours']['mixed'][3] . ":'" . str_pad(substr("Open_files", 0, 19), 19) . "' ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS1:LAST:%0.0lf ";
|
$check_graph['mysql'] .= " GPRINT:DS1:LAST:%0.0lf ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS1:AVERAGE:%0.0lf ";
|
$check_graph['mysql'] .= " GPRINT:DS1:AVERAGE:%0.0lf ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS1:MAX:%0.0lf\l ";
|
$check_graph['mysql'] .= " GPRINT:DS1:MAX:%0.0lf\\l ";
|
||||||
$check_graph['mysql'] .= " DEF:DS2=" . $rrd_filename . ":Open_tables:AVERAGE ";
|
$check_graph['mysql'] .= " DEF:DS2=" . $rrd_filename . ":Open_tables:AVERAGE ";
|
||||||
$check_graph['mysql'] .= " LINE1.25:DS2#" . $config['graph_colours']['mixed'][4] . ":'" . str_pad(substr("Open_tables", 0, 19), 19) . "' ";
|
$check_graph['mysql'] .= " LINE1.25:DS2#" . $config['graph_colours']['mixed'][4] . ":'" . str_pad(substr("Open_tables", 0, 19), 19) . "' ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS2:LAST:%0.0lf ";
|
$check_graph['mysql'] .= " GPRINT:DS2:LAST:%0.0lf ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS2:AVERAGE:%0.0lf ";
|
$check_graph['mysql'] .= " GPRINT:DS2:AVERAGE:%0.0lf ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS2:MAX:%0.0lf\l ";
|
$check_graph['mysql'] .= " GPRINT:DS2:MAX:%0.0lf\\l ";
|
||||||
$check_graph['mysql'] .= " DEF:DS3=" . $rrd_filename . ":Table_locks_waited:AVERAGE ";
|
$check_graph['mysql'] .= " DEF:DS3=" . $rrd_filename . ":Table_locks_waited:AVERAGE ";
|
||||||
$check_graph['mysql'] .= " LINE1.25:DS3#" . $config['graph_colours']['mixed'][5] . ":'" . str_pad(substr("Table_locks_waited", 0, 19), 19) . "' ";
|
$check_graph['mysql'] .= " LINE1.25:DS3#" . $config['graph_colours']['mixed'][5] . ":'" . str_pad(substr("Table_locks_waited", 0, 19), 19) . "' ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS3:LAST:%0.0lf ";
|
$check_graph['mysql'] .= " GPRINT:DS3:LAST:%0.0lf ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS3:AVERAGE:%0.0lf ";
|
$check_graph['mysql'] .= " GPRINT:DS3:AVERAGE:%0.0lf ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS3:MAX:%0.0lf\l ";
|
$check_graph['mysql'] .= " GPRINT:DS3:MAX:%0.0lf\\l ";
|
||||||
$check_graph['mysql'] .= " DEF:DS4=" . $rrd_filename . ":Threads_connected:AVERAGE ";
|
$check_graph['mysql'] .= " DEF:DS4=" . $rrd_filename . ":Threads_connected:AVERAGE ";
|
||||||
$check_graph['mysql'] .= " LINE1.25:DS4#" . $config['graph_colours']['mixed'][6] . ":'" . str_pad(substr("Threads_connected", 0, 19), 19) . "' ";
|
$check_graph['mysql'] .= " LINE1.25:DS4#" . $config['graph_colours']['mixed'][6] . ":'" . str_pad(substr("Threads_connected", 0, 19), 19) . "' ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS4:LAST:%0.0lf ";
|
$check_graph['mysql'] .= " GPRINT:DS4:LAST:%0.0lf ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS4:AVERAGE:%0.0lf ";
|
$check_graph['mysql'] .= " GPRINT:DS4:AVERAGE:%0.0lf ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS4:MAX:%0.0lf\l ";
|
$check_graph['mysql'] .= " GPRINT:DS4:MAX:%0.0lf\\l ";
|
||||||
$check_graph['mysql'] .= " DEF:DS5=" . $rrd_filename . ":Threads_running:AVERAGE ";
|
$check_graph['mysql'] .= " DEF:DS5=" . $rrd_filename . ":Threads_running:AVERAGE ";
|
||||||
$check_graph['mysql'] .= " LINE1.25:DS5#" . $config['graph_colours']['mixed'][7] . ":'" . str_pad(substr("Threads_running", 0, 19), 19) . "' ";
|
$check_graph['mysql'] .= " LINE1.25:DS5#" . $config['graph_colours']['mixed'][7] . ":'" . str_pad(substr("Threads_running", 0, 19), 19) . "' ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS5:LAST:%0.0lf ";
|
$check_graph['mysql'] .= " GPRINT:DS5:LAST:%0.0lf ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS5:AVERAGE:%0.0lf ";
|
$check_graph['mysql'] .= " GPRINT:DS5:AVERAGE:%0.0lf ";
|
||||||
$check_graph['mysql'] .= " GPRINT:DS5:MAX:%0.0lf\l ";
|
$check_graph['mysql'] .= " GPRINT:DS5:MAX:%0.0lf\\l ";
|
||||||
|
|
||||||
$check_graph['mysqluptime'] = " DEF:DS0=" . $rrd_filename . ":Uptime:LAST ";
|
$check_graph['mysqluptime'] = " DEF:DS0=" . $rrd_filename . ":Uptime:LAST ";
|
||||||
$check_graph['mysqluptime'] .= " CDEF:cuptime=DS0,86400,/";
|
$check_graph['mysqluptime'] .= " CDEF:cuptime=DS0,86400,/";
|
||||||
@@ -69,29 +69,29 @@ $check_graph['mysqlQcache'] = " DEF:DS0=" . $rrd_filename . ":Qcache_free_memory
|
|||||||
$check_graph['mysqlQcache'] .= " LINE1.25:DS0#" . $config['graph_colours']['mixed'][0] . ":'" . str_pad(substr("Qcache_free_memory", 0, 19), 19) . "' ";
|
$check_graph['mysqlQcache'] .= " LINE1.25:DS0#" . $config['graph_colours']['mixed'][0] . ":'" . str_pad(substr("Qcache_free_memory", 0, 19), 19) . "' ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS0:LAST:%9.2lf%s ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS0:LAST:%9.2lf%s ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS0:AVERAGE:%9.2lf%s ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS0:AVERAGE:%9.2lf%s ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS0:MAX:%9.2lf%s\l ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS0:MAX:%9.2lf%s\\l ";
|
||||||
$check_graph['mysqlQcache'] .= " DEF:DS1=" . $rrd_filename . ":Qcache_hits:AVERAGE ";
|
$check_graph['mysqlQcache'] .= " DEF:DS1=" . $rrd_filename . ":Qcache_hits:AVERAGE ";
|
||||||
$check_graph['mysqlQcache'] .= " LINE1.25:DS1#" . $config['graph_colours']['mixed'][1] . ":'" . str_pad(substr("Qcache_hits", 0, 19), 19) . "' ";
|
$check_graph['mysqlQcache'] .= " LINE1.25:DS1#" . $config['graph_colours']['mixed'][1] . ":'" . str_pad(substr("Qcache_hits", 0, 19), 19) . "' ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS1:LAST:%9.2lf ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS1:LAST:%9.2lf ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS1:AVERAGE:%9.2lf ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS1:AVERAGE:%9.2lf ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS1:MAX:%9.2lf\l ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS1:MAX:%9.2lf\\l ";
|
||||||
$check_graph['mysqlQcache'] .= " DEF:DS2=" . $rrd_filename . ":Qcache_inserts:AVERAGE ";
|
$check_graph['mysqlQcache'] .= " DEF:DS2=" . $rrd_filename . ":Qcache_inserts:AVERAGE ";
|
||||||
$check_graph['mysqlQcache'] .= " LINE1.25:DS2#" . $config['graph_colours']['mixed'][2] . ":'" . str_pad(substr("Qcache_inserts", 0, 19), 19) . "' ";
|
$check_graph['mysqlQcache'] .= " LINE1.25:DS2#" . $config['graph_colours']['mixed'][2] . ":'" . str_pad(substr("Qcache_inserts", 0, 19), 19) . "' ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS2:LAST:%9.2lf ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS2:LAST:%9.2lf ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS2:AVERAGE:%9.2lf ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS2:AVERAGE:%9.2lf ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS2:MAX:%9.2lf\l ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS2:MAX:%9.2lf\\l ";
|
||||||
$check_graph['mysqlQcache'] .= " DEF:DS3=" . $rrd_filename . ":Qcache_lowmem_prune:AVERAGE ";
|
$check_graph['mysqlQcache'] .= " DEF:DS3=" . $rrd_filename . ":Qcache_lowmem_prune:AVERAGE ";
|
||||||
$check_graph['mysqlQcache'] .= " LINE1.25:DS3#" . $config['graph_colours']['mixed'][3] . ":'" . str_pad(substr("Qcache_lowmem_prune", 0, 19), 19) . "' ";
|
$check_graph['mysqlQcache'] .= " LINE1.25:DS3#" . $config['graph_colours']['mixed'][3] . ":'" . str_pad(substr("Qcache_lowmem_prune", 0, 19), 19) . "' ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS3:LAST:%9.2lf ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS3:LAST:%9.2lf ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS3:AVERAGE:%9.2lf ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS3:AVERAGE:%9.2lf ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS3:MAX:%9.2lf\l ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS3:MAX:%9.2lf\\l ";
|
||||||
$check_graph['mysqlQcache'] .= " DEF:DS4=" . $rrd_filename . ":Qcache_not_cached:AVERAGE ";
|
$check_graph['mysqlQcache'] .= " DEF:DS4=" . $rrd_filename . ":Qcache_not_cached:AVERAGE ";
|
||||||
$check_graph['mysqlQcache'] .= " LINE1.25:DS4#" . $config['graph_colours']['mixed'][4] . ":'" . str_pad(substr("Qcache_not_cached", 0, 19), 19) . "' ";
|
$check_graph['mysqlQcache'] .= " LINE1.25:DS4#" . $config['graph_colours']['mixed'][4] . ":'" . str_pad(substr("Qcache_not_cached", 0, 19), 19) . "' ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS4:LAST:%9.2lf ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS4:LAST:%9.2lf ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS4:AVERAGE:%9.2lf ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS4:AVERAGE:%9.2lf ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS4:MAX:%9.2lf\l ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS4:MAX:%9.2lf\\l ";
|
||||||
$check_graph['mysqlQcache'] .= " DEF:DS5=" . $rrd_filename . ":Qcache_queries_in_c:AVERAGE ";
|
$check_graph['mysqlQcache'] .= " DEF:DS5=" . $rrd_filename . ":Qcache_queries_in_c:AVERAGE ";
|
||||||
$check_graph['mysqlQcache'] .= " LINE1.25:DS5#" . $config['graph_colours']['mixed'][5] . ":'" . str_pad(substr("Qcache_queries_in_c", 0, 19), 19) . "' ";
|
$check_graph['mysqlQcache'] .= " LINE1.25:DS5#" . $config['graph_colours']['mixed'][5] . ":'" . str_pad(substr("Qcache_queries_in_c", 0, 19), 19) . "' ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS5:LAST:%9.2lf ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS5:LAST:%9.2lf ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS5:AVERAGE:%9.2lf ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS5:AVERAGE:%9.2lf ";
|
||||||
$check_graph['mysqlQcache'] .= " GPRINT:DS5:MAX:%9.2lf\l ";
|
$check_graph['mysqlQcache'] .= " GPRINT:DS5:MAX:%9.2lf\\l ";
|
||||||
|
Reference in New Issue
Block a user