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:
Zmegolaz
2018-01-08 09:35:15 +01:00
committed by GitHub
parent 4be175578b
commit eac128aca8
5 changed files with 54 additions and 21 deletions

View File

@@ -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'] .= " GPRINT:DS0:LAST:%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'] .= " 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: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'] .= " 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: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'] .= " 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:AVERAGE:%5.2lf%s ";
$check_graph['pl'] .= " GPRINT:DS0:MAX:%5.2lf%s\\\l ";
$check_graph['pl'] .= " GPRINT:DS0:MAX:%5.2lf%s\\l ";