diff --git a/doc/Extensions/Services.md b/doc/Extensions/Services.md index ce67746b9d..731f89055d 100644 --- a/doc/Extensions/Services.md +++ b/doc/Extensions/Services.md @@ -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. -**These services are tied into an existing device so you need at least one device that supports SNMP to be able to add it -to LibreNMS - localhost is a good one. This is needed in order for alerting to work properly.** +**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.** ## 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. +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 By default, the check-services script will collect all performance data that the Nagios script returns and display each datasource on a separate graph. diff --git a/html/includes/graphs/device/service.inc.php b/html/includes/graphs/device/service.inc.php index ed44e9b9ef..7a2f55b6eb 100644 --- a/html/includes/graphs/device/service.inc.php +++ b/html/includes/graphs/device/service.inc.php @@ -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 .= " GPRINT:DS:LAST:%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 "; } } } diff --git a/includes/services/check_icmp.inc.php b/includes/services/check_icmp.inc.php index 7d20a96239..c674e3e8af 100644 --- a/includes/services/check_icmp.inc.php +++ b/includes/services/check_icmp.inc.php @@ -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 "; diff --git a/includes/services/check_load.inc.php b/includes/services/check_load.inc.php new file mode 100644 index 0000000000..7f3029e032 --- /dev/null +++ b/includes/services/check_load.inc.php @@ -0,0 +1,31 @@ +