diff --git a/AUTHORS.md b/AUTHORS.md index 2a6395a7a3..26bf5774e2 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -27,7 +27,7 @@ LibreNMS contributors: - Mohammad Al-Shami (mohshami) - Rudy Hardeman (zarya) - Freddie Cash (fjwcash) -- Thom Seddon (thomseddon) +- Thom Seddon (thomseddon) - Vitali Kari (vitalisator) - James Campbell (neokjames) - Steve Calvário (Calvario) @@ -93,6 +93,9 @@ LibreNMS contributors: - David Bell (geordish) - Ibrahim Tachijian (barhom) - Guillaume Coeugnet (gcoeugnet) +- Jared Newell (Jaredn) +- Karsten Nerdinger (piratonym) +- Michael Nguyen (mnguyen1289) [1]: http://observium.org/ "Observium web site" Observium was written by: @@ -100,4 +103,4 @@ Observium was written by: - Tom Laermans - various others as indicated in the file contents and commit logs - + diff --git a/check-services.php b/check-services.php index a39171a3d7..dcee38ae85 100755 --- a/check-services.php +++ b/check-services.php @@ -2,14 +2,15 @@ * - * @package observium - * @subpackage services - * @author Adam Armstrong - * @copyright (C) 2006 - 2012 Adam Armstrong + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. */ chdir(dirname($argv[0])); @@ -19,41 +20,28 @@ require 'config.php'; require 'includes/definitions.inc.php'; require 'includes/functions.php'; +$options = getopt('d::'); +if (isset($options['d'])) { + echo "DEBUG!\n"; + $debug = true; + ini_set('display_errors', 1); + ini_set('display_startup_errors', 1); + ini_set('log_errors', 1); + ini_set('error_reporting', 1); +} +else { + $debug = false; + // ini_set('display_errors', 0); + ini_set('display_startup_errors', 0); + ini_set('log_errors', 0); + // ini_set('error_reporting', 0); +} + +rrdtool_pipe_open($rrd_process, $rrd_pipes); + foreach (dbFetchRows('SELECT * FROM `devices` AS D, `services` AS S WHERE S.device_id = D.device_id ORDER by D.device_id DESC') as $service) { - if ($service['status'] = '1') { - unset($check, $service_status, $time, $status); - $service_status = $service['service_status']; - $service_type = strtolower($service['service_type']); - $service_param = $service['service_param']; - $checker_script = $config['install_dir'].'/includes/services/'.$service_type.'/check.inc'; - - if (is_file($checker_script)) { - include $checker_script; - } - else { - $cmd = $config['nagios_plugins'] . "/check_" . $service['service_type'] . " -H " . ($service['service_ip'] ? $service['service_ip'] : $service['hostname']); - $cmd .= " ".$service['service_param']; - $check = shell_exec($cmd); - list($check, $time) = explode("|", $check); - if(stristr($check, "ok -")) { - $status = 1; - } - else { - $status = 0; - } - } - - $update = array(); - - if ($service_status != $status) { - $update['service_changed'] = time(); - } - $update = array_merge(array('service_status' => $status, 'service_message' => $check, 'service_checked' => time()), $update); - dbUpdate($update, 'services', '`service_id` = ?', array($service['service_id'])); - unset($update); - } - else { - $status = '0'; - }//end if + // Run the polling function + poll_service($service); } //end foreach +rrdtool_pipe_close($rrd_process, $rrd_pipes); diff --git a/doc/API/API-Docs.md b/doc/API/API-Docs.md index 185349b954..b23339ee84 100644 --- a/doc/API/API-Docs.md +++ b/doc/API/API-Docs.md @@ -13,6 +13,7 @@ - [`get_graphs`](#api-route-5) - [`get_graph_generic_by_hostname`](#api-route-6) - [`get_port_graphs`](#api-route-7) + - [`get_port_stack`](#api-route-29) - [`get_components`](#api-route-25) - [`add_components`](#api-route-26) - [`edit_components`](#api-route-27) @@ -275,6 +276,47 @@ Output: } ``` +### Function: `get_port_stack` [`top`](#top) + +Get a list of port mappings for a device. This is useful for showing physical ports that are in a virtual port-channel. + +Route: /api/v0/devices/:hostname/port_stack + +- hostname can be either the device hostname or id + +Input: + + - valid_mappings: Filter the result by only showing valid mappings ("0" values not shown). + +Example: +```curl +curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/devices/localhost/port_stack?valid_mappings +``` + +Output: + +```text +{ + "status": "ok", + "err-msg": "", + "count": 2, + "mappings": [ + { + "device_id": "3742", + "port_id_high": "1001000", + "port_id_low": "51001", + "ifStackStatus": "active" + }, + { + "device_id": "3742", + "port_id_high": "1001000", + "port_id_low": "52001", + "ifStackStatus": "active" + } + ] +} +``` + ### Function: `get_components` [`top`](#top) Get a list of components for a particular device. diff --git a/doc/Extensions/Services.md b/doc/Extensions/Services.md index fe2608552f..ea68763848 100644 --- a/doc/Extensions/Services.md +++ b/doc/Extensions/Services.md @@ -27,26 +27,44 @@ Finally, you now need to add check-services.php to the current cron file (/etc/c */5 * * * * librenms /opt/librenms/check-services.php >> /dev/null 2>&1 ``` -Now you can add services via the main Services link in the navbar, or via the Services link within the device 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. -> **Please note that at present the service checks will only return the status and the response from the check -no graphs will be generated. ** +## Performance data -## Supported checks +By default, the check-services script will collect all performance data that the Nagios script returns and display each datasource on a separate graph. +However for some modules it would be better if some of this information was consolidated on a single graph. +An example is the ICMP check. This check returns: Round Trip Average (rta), Round Trip Min (rtmin) and Round Trip Max (rtmax). +These have been combined onto a single graph. -- ftp -- icmp -- spop -- ssh -- ssl_cert -- http -- domain_expire -- mysql -- imap -- dns -- telnet -- smtp -- pop -- simap -- ntp -- ircd +If you find a check script that would benefit from having some datasources graphed together, please log an issue on GitHub with the debug information from the script, and let us know which DS's should go together. Example below: + + ./check-services.php -d + -- snip -- + Nagios Service - 26 + Request: /usr/lib/nagios/plugins/check_icmp localhost + Perf Data - DS: rta, Value: 0.016, UOM: ms + Perf Data - DS: pl, Value: 0, UOM: % + Perf Data - DS: rtmax, Value: 0.044, UOM: ms + Perf Data - DS: rtmin, Value: 0.009, UOM: ms + Response: OK - localhost: rta 0.016ms, lost 0% + Service DS: { + "rta": "ms", + "pl": "%", + "rtmax": "ms", + "rtmin": "ms" + } + OK u:0.00 s:0.00 r:40.67 + RRD[update /opt/librenms/rrd/localhost/services-26.rrd N:0.016:0:0.044:0.009] + -- snip -- + +## Alerting + +Services uses the Nagios Alerting scheme where: + + 0 = Ok, + 1 = Warning, + 2 = Critical, + +To create an alerting rule to alert on service=critical, your alerting rule would look like: + + %services.service_status = "2" diff --git a/html/ajax_form.php b/html/ajax_form.php index 999a43a4dc..93c8498f66 100644 --- a/html/ajax_form.php +++ b/html/ajax_form.php @@ -21,6 +21,7 @@ require_once '../includes/definitions.inc.php'; require_once 'includes/functions.inc.php'; require_once '../includes/functions.php'; require_once 'includes/authenticate.inc.php'; +require_once 'includes/vars.inc.php'; if (!$_SESSION['authenticated']) { echo 'unauthenticated'; diff --git a/html/api_v0.php b/html/api_v0.php index 883b4609d2..3ca6dc0ad4 100644 --- a/html/api_v0.php +++ b/html/api_v0.php @@ -48,6 +48,7 @@ $app->group( $app->get('/:hostname/graphs', 'authToken', 'get_graphs')->name('get_graphs'); // api/v0/devices/$hostname/graphs $app->get('/:hostname/ports', 'authToken', 'get_port_graphs')->name('get_port_graphs'); + $app->get('/:hostname/port_stack', 'authToken', 'get_port_stack')->name('get_port_stack'); // api/v0/devices/$hostname/ports $app->get('/:hostname/components', 'authToken', 'get_components')->name('get_components'); $app->post('/:hostname/components/:type', 'authToken', 'add_components')->name('add_components'); diff --git a/html/includes/api_functions.inc.php b/html/includes/api_functions.inc.php index 834904fffb..9a26298909 100644 --- a/html/includes/api_functions.inc.php +++ b/html/includes/api_functions.inc.php @@ -721,6 +721,32 @@ function get_port_graphs() { } +function get_port_stack() { + global $config; + $app = \Slim\Slim::getInstance(); + $router = $app->router()->getCurrentRoute()->getParams(); + $hostname = $router['hostname']; + // use hostname as device_id if it's all digits + $device_id = ctype_digit($hostname) ? $hostname : getidbyname($hostname); + + if (isset($_GET['valid_mappings'])) { + $mappings = dbFetchRows("SELECT * FROM `ports_stack` WHERE (`device_id` = ? AND `ifStackStatus` = 'active' AND (`port_id_high` != '0' AND `port_id_low` != '0')) ORDER BY `port_id_high` ASC", array($device_id)); + } else { + $mappings = dbFetchRows("SELECT * FROM `ports_stack` WHERE `device_id` = ? AND `ifStackStatus` = 'active' ORDER BY `port_id_high` ASC", array($device_id)); + } + + $total_mappings = count($mappings); + $output = array( + 'status' => 'ok', + 'err-msg' => '', + 'count' => $total_mappings, + 'mappings' => $mappings, + ); + $app->response->setStatus('200'); + $app->response->headers->set('Content-Type', 'application/json'); + echo _json_encode($output); +} + function list_alert_rules() { global $config; $app = \Slim\Slim::getInstance(); diff --git a/html/includes/forms/create-service.inc.php b/html/includes/forms/create-service.inc.php new file mode 100644 index 0000000000..4e591dab4b --- /dev/null +++ b/html/includes/forms/create-service.inc.php @@ -0,0 +1,47 @@ + + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +if (is_admin() === false) { + die('ERROR: You need to be admin'); +} + +$service_id = $vars['service_id']; +$type = mres($vars['stype']); +$desc = mres($vars['desc']); +$ip = mres($vars['ip']); +$param = mres($vars['param']); +$device_id = mres($vars['device_id']); + +if (is_numeric($service_id) && $service_id > 0) { + // Need to edit. + $update = array('service_desc' => $desc, 'service_ip' => $ip, 'service_param' => $param); + if (edit_service($update, $service_id)) { + $status = array('status' =>0, 'message' => 'Modified Service: '.$service_id.': '.$type.''); + } + else { + $status = array('status' =>1, 'message' => 'ERROR: Failed to modify service: '.$service_id.''); + } +} +else { + // Need to add. + $service_id = add_service($device_id, $type, $desc, $ip, $param); + if ($service_id == false) { + $status = array('status' =>1, 'message' => 'ERROR: Failed to add Service: '.$type.''); + } + else { + $status = array('status' =>0, 'message' => 'Added Service: '.$service_id.': '.$type.''); + } +} +header('Content-Type: application/json'); +echo _json_encode($status); \ No newline at end of file diff --git a/html/includes/forms/delete-service.inc.php b/html/includes/forms/delete-service.inc.php new file mode 100644 index 0000000000..66bbd52557 --- /dev/null +++ b/html/includes/forms/delete-service.inc.php @@ -0,0 +1,31 @@ + + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +if (is_admin() === false) { + $status = array('status' =>1, 'message' => 'ERROR: You need to be admin to delete services'); +} +else { + if (!is_numeric($vars['service_id'])) { + $status = array('status' =>1, 'message' => 'No Service has been selected'); + } + else { + if (delete_service($vars['service_id'])) { + $status = array('status' =>0, 'message' => 'Service: '.$vars['service_id'].', has been deleted.'); + } + else { + $status = array('status' =>1, 'message' => 'Service: '.$vars['service_id'].', has NOT been deleted.'); + } + } +} +header('Content-Type: application/json'); +echo _json_encode($status); diff --git a/html/includes/forms/parse-service.inc.php b/html/includes/forms/parse-service.inc.php new file mode 100644 index 0000000000..a421e1a93a --- /dev/null +++ b/html/includes/forms/parse-service.inc.php @@ -0,0 +1,33 @@ + + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +if (is_admin() === false) { + die('ERROR: You need to be admin'); +} + +$service_id = $vars['service_id']; + +if (is_numeric($service_id) && $service_id > 0) { + $service = service_get(null, $service_id); + + $output = array( + 'stype' => $service[0]['service_type'], + 'ip' => $service[0]['service_ip'], + 'desc' => $service[0]['service_desc'], + 'param' => $service[0]['service_param'] + ); + + header('Content-Type: application/json'); + echo _json_encode($output); +} diff --git a/html/includes/graphs/device/cambium_250_modulationMode.inc.php b/html/includes/graphs/device/cambium_250_modulationMode.inc.php index 01fa4118ff..ec6adab904 100644 --- a/html/includes/graphs/device/cambium_250_modulationMode.inc.php +++ b/html/includes/graphs/device/cambium_250_modulationMode.inc.php @@ -16,6 +16,7 @@ if (file_exists($rrdfilename)) { $rrd_options .= " COMMENT:'Mode Now Ave Max \\n'"; $rrd_options .= ' DEF:rxModulation='.$rrdfilename.':rxModulation:AVERAGE '; $rrd_options .= ' DEF:txModulation='.$rrdfilename.':txModulation:AVERAGE '; + $rrd_options .= " -l 0 "; $rrd_options .= " LINE2:rxModulation#0000FF:'Receive Modulation ' "; $rrd_options .= ' GPRINT:rxModulation:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:rxModulation:MIN:%0.2lf%s '; @@ -24,4 +25,4 @@ if (file_exists($rrdfilename)) { $rrd_options .= ' GPRINT:txModulation:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:txModulation:MIN:%0.2lf%s '; $rrd_options .= ' GPRINT:txModulation:MAX:%0.2lf%s\\\l '; -} +} \ No newline at end of file diff --git a/html/includes/graphs/device/cambium_250_transmitPower.inc.php b/html/includes/graphs/device/cambium_250_transmitPower.inc.php index 7206e02a9f..82a8436f91 100644 --- a/html/includes/graphs/device/cambium_250_transmitPower.inc.php +++ b/html/includes/graphs/device/cambium_250_transmitPower.inc.php @@ -16,7 +16,8 @@ if (file_exists($rrdfilename)) { $rrd_options .= " COMMENT:'dBm Now Ave Max \\n'"; $rrd_options .= ' DEF:transmitPower='.$rrdfilename.':transmitPower:AVERAGE '; $rrd_options .= " LINE2:transmitPower#FF0000:'Transmit Power ' "; + $rrd_options .= " -l 0 "; $rrd_options .= ' GPRINT:transmitPower:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:transmitPower:MIN:%0.2lf%s '; $rrd_options .= ' GPRINT:transmitPower:MAX:%0.2lf%s\\\l '; -} +} \ No newline at end of file diff --git a/html/includes/graphs/device/cambium_650_modulationMode.inc.php b/html/includes/graphs/device/cambium_650_modulationMode.inc.php index cb8a62da03..81a83aad12 100644 --- a/html/includes/graphs/device/cambium_650_modulationMode.inc.php +++ b/html/includes/graphs/device/cambium_650_modulationMode.inc.php @@ -16,6 +16,7 @@ if (file_exists($rrdfilename)) { $rrd_options .= " COMMENT:'Mode Now Ave Max \\n'"; $rrd_options .= ' DEF:rxModulation='.$rrdfilename.':rxModulation:AVERAGE '; $rrd_options .= ' DEF:txModulation='.$rrdfilename.':txModulation:AVERAGE '; + $rrd_options .= " -l 0 "; $rrd_options .= " LINE2:rxModulation#0000FF:'Receive Modulation ' "; $rrd_options .= ' GPRINT:rxModulation:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:rxModulation:MIN:%0.2lf%s '; @@ -24,4 +25,4 @@ if (file_exists($rrdfilename)) { $rrd_options .= ' GPRINT:txModulation:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:txModulation:MIN:%0.2lf%s '; $rrd_options .= ' GPRINT:txModulation:MAX:%0.2lf%s\\\l '; -} +} \ No newline at end of file diff --git a/html/includes/graphs/device/cambium_650_transmitPower.inc.php b/html/includes/graphs/device/cambium_650_transmitPower.inc.php index 565a75eef3..46af92e3ad 100644 --- a/html/includes/graphs/device/cambium_650_transmitPower.inc.php +++ b/html/includes/graphs/device/cambium_650_transmitPower.inc.php @@ -15,8 +15,9 @@ $rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/cambium-650-transmit if (file_exists($rrdfilename)) { $rrd_options .= " COMMENT:'dBm Now Ave Max \\n'"; $rrd_options .= ' DEF:transmitPower='.$rrdfilename.':transmitPower:AVERAGE '; + $rrd_options .= " -l 0 "; $rrd_options .= " LINE2:transmitPower#FF0000:'Transmit Power ' "; $rrd_options .= ' GPRINT:transmitPower:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:transmitPower:MIN:%0.2lf%s '; $rrd_options .= ' GPRINT:transmitPower:MAX:%0.2lf%s\\\l '; -} +} \ No newline at end of file diff --git a/html/includes/graphs/device/cambium_epmp_gps.inc.php b/html/includes/graphs/device/cambium_epmp_gps.inc.php index 548c5f9d73..46d27c6fcf 100644 --- a/html/includes/graphs/device/cambium_epmp_gps.inc.php +++ b/html/includes/graphs/device/cambium_epmp_gps.inc.php @@ -14,7 +14,7 @@ if (file_exists($rrdfilename)) { $rrd_options .= " COMMENT:'dBm Now Ave Max \\n'"; $rrd_options .= ' DEF:numTracked='.$rrdfilename.':numTracked:AVERAGE '; $rrd_options .= ' DEF:numVisible='.$rrdfilename.':numVisible:AVERAGE '; - $rrd_options .= " LINE2:numTracked#FF0000:'GPS Number Tracked ' "; + $rrd_options .= " AREA:numTracked#00B200:'GPS Number Tracked ' "; $rrd_options .= ' GPRINT:numTracked:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:numTracked:MIN:%0.2lf%s '; $rrd_options .= ' GPRINT:numTracked:MAX:%0.2lf%s\\\l '; @@ -22,4 +22,4 @@ if (file_exists($rrdfilename)) { $rrd_options .= ' GPRINT:numVisible:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:numVisible:MIN:%0.2lf%s '; $rrd_options .= ' GPRINT:numVisible:MAX:%0.2lf%s\\\l '; -} +} \ No newline at end of file diff --git a/html/includes/graphs/device/cambium_epmp_gpsSync.inc.php b/html/includes/graphs/device/cambium_epmp_gpsSync.inc.php index cf08b8b132..a6f3f34217 100644 --- a/html/includes/graphs/device/cambium_epmp_gpsSync.inc.php +++ b/html/includes/graphs/device/cambium_epmp_gpsSync.inc.php @@ -13,7 +13,8 @@ $rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/cambium-epmp-gpsSync if (file_exists($rrdfilename)) { $rrd_options .= " COMMENT:'1 - GPS Sync Up 2 - GPS Sync Down 3 - CMM Sync \\n'"; $rrd_options .= ' DEF:gpsSync='.$rrdfilename.':gpsSync:AVERAGE '; + $rrd_options .= " -l 1 "; + $rrd_options .= " -u 3 "; $rrd_options .= " LINE2:gpsSync#666699:'GPS Sync Status ' "; $rrd_options .= ' GPRINT:gpsSync:LAST:%0.2lf%s '; - } \ No newline at end of file diff --git a/html/includes/graphs/device/cambium_epmp_registeredSM.inc.php b/html/includes/graphs/device/cambium_epmp_registeredSM.inc.php index 7ee964ee5b..fd12c51291 100644 --- a/html/includes/graphs/device/cambium_epmp_registeredSM.inc.php +++ b/html/includes/graphs/device/cambium_epmp_registeredSM.inc.php @@ -15,7 +15,8 @@ if (file_exists($rrdfilename)) { $rrd_options .= " COMMENT:'Value Now Ave Max \\n'"; $rrd_options .= ' DEF:regSM='.$rrdfilename.':regSM:AVERAGE '; $rrd_options .= " LINE2:regSM#73b0c2:'Registered SM ' "; + $rrd_options .= " -l 0 "; $rrd_options .= ' GPRINT:regSM:LAST:%0.2lf%s '; $rrd_options .= ' GPRINT:regSM:MIN:%0.2lf%s '; $rrd_options .= ' GPRINT:regSM:MAX:%0.2lf%s\\\l '; -} +} \ No newline at end of file diff --git a/html/includes/graphs/device/cambium_generic_450_linkRadioDbm.inc.php b/html/includes/graphs/device/cambium_generic_450_linkRadioDbm.inc.php deleted file mode 100644 index 1c643a71de..0000000000 --- a/html/includes/graphs/device/cambium_generic_450_linkRadioDbm.inc.php +++ /dev/null @@ -1,26 +0,0 @@ - + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +// Get a list of all services for this device. +require_once '../includes/services.inc.php'; +$services = service_get($device['device_id']); + +// Determine which key is the service we want to show. +if (isset($vars['service'])) { + // Service is set, find its key. + foreach ($services as $key => $service) { + if ($service['service_id'] == $vars['service']) { + // We have found the service we want. + $vars['service'] = $key; + } + } +} +else { + // No service set, set the first one. + if (isset($services[0])) { + $vars['service'] = 0; + } +} + +// We know our service. build the filename. +$filename = "services-".$services[$vars['service']]['service_id'].".rrd"; +$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/" . safename ($filename); + +// if we have a script for this check, use it. +$check_script = $config['install_dir'].'/includes/services/check_'.strtolower($services[$vars['service']]['service_type']).'.inc.php'; +if (is_file($check_script)) { + include $check_script; + + // If we have a replacement DS use it. + if (isset($check_ds)) { + $services[$vars['service']]['service_ds'] = $check_ds; + } +} + +include "includes/graphs/common.inc.php"; +$rrd_options .= " -l 0 -E "; +$rrd_options .= " COMMENT:' Now Avg Max\\n'"; +$rrd_additions = ""; + +// Remove encoded characters +$services[$vars['service']]['service_ds'] = htmlspecialchars_decode($services[$vars['service']]['service_ds']); + +if ($services[$vars['service']]['service_ds'] != "") { + $graphinfo = json_decode($services[$vars['service']]['service_ds'],TRUE); + + // Do we have a DS set + if (!isset($graphinfo[$vars['ds']])) { + foreach ($graphinfo as $k => $v) { + // Select a DS to display. + $vars['ds'] = $k; + } + } + + // Need: DS name, Label + $ds = $vars['ds']; + $label = $graphinfo[$vars['ds']]; + + if (file_exists($rrd_filename)) { + + if (isset($check_graph)) { + // We have a graph definition, use it. + $rrd_additions .= $check_graph[$ds]; + } + else { + // Build the graph ourselves + $color = $config['graph_colours']['mixed'][2]; + + $rrd_additions .= " DEF:DS=" . $rrd_filename . ":".$ds.":AVERAGE "; + $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 "; + } + } +} + +if ($rrd_additions == "") { + // We didn't add any data points. +} +else { + $rrd_options .= $rrd_additions; +} diff --git a/html/includes/graphs/device/signal.inc.php b/html/includes/graphs/device/signal.inc.php index 5bf416ee19..f8f4769d08 100644 --- a/html/includes/graphs/device/signal.inc.php +++ b/html/includes/graphs/device/signal.inc.php @@ -1,7 +1,7 @@ - + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +if(is_admin() === false) { + die('ERROR: You need to be admin'); +} + +?> + + + + diff --git a/html/includes/modal/new_service.inc.php b/html/includes/modal/new_service.inc.php new file mode 100644 index 0000000000..e1b973c74f --- /dev/null +++ b/html/includes/modal/new_service.inc.php @@ -0,0 +1,145 @@ + + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. Please see LICENSE.txt at the top level of + * the source code distribution for details. + */ + +if(is_admin() !== false) { + + // Build the types list. + if ($handle = opendir($config['nagios_plugins'])) { + while (false !== ($file = readdir($handle))) { + if ($file != '.' && $file != '..' && !strstr($file, '.') && strstr($file, 'check_')) { + list(,$check_name) = explode('_',$file,2); + $stype .= ""; + } + } + closedir($handle); + } + +?> + + + + += 5) { @@ -219,18 +219,20 @@ if ($config['show_services']) { -
  • Alerts ('.$service_alerts.')
  • '); +if (($service_status[1] > 0) || ($service_status[2] > 0)) { + echo ' '; + if ($service_status[1] > 0) { + echo '
  • Warning ('.$service_status[1].')
  • '; + } + if ($service_status[2] > 0) { + echo '
  • Critical ('.$service_status[2].')
  • '; + } } if ($_SESSION['userlevel'] >= '10') { echo(' -
  • Add Service
  • -
  • Edit Service
  • -
  • Delete Service
  • '); +
  • Add Service
  • '); } ?> diff --git a/html/includes/print-service-edit.inc.php b/html/includes/print-service-edit.inc.php deleted file mode 100644 index 7b5c1bafb5..0000000000 --- a/html/includes/print-service-edit.inc.php +++ /dev/null @@ -1,36 +0,0 @@ -Edit Service -
    - - -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    -
    - -
    - -
    -
    - This may be required based on the service check. -
    -
    - -
    -
    "; -}//end if diff --git a/html/includes/print-service.inc.php b/html/includes/print-service.inc.php deleted file mode 100644 index 0cac82cc07..0000000000 --- a/html/includes/print-service.inc.php +++ /dev/null @@ -1,77 +0,0 @@ -$service_type"; -} -else if ($service[service_status] == '1') { - $status = "$service_type"; -} -else if ($service[service_status] == '2') { - $status = "$service_type"; -} - -$message = trim($service['service_message']); -$message = str_replace("\n", '
    ', $message); - -$desc = trim($service['service_desc']); -$desc = str_replace("\n", '
    ', $desc); - -$since = (time() - $service['service_changed']); -$since = formatUptime($since); - -if ($service['service_checked']) { - $checked = (time() - $service['service_checked']); - $checked = formatUptime($checked); -} -else { - $checked = 'Never'; -} - -$mini_url = 'graph.php?id='.$service['service_id'].'&type=service_availability&from='.$config['time']['day'].'&to='.$config['time']['now'].'&width=80&height=20&bg=efefef'; - -$popup = "onmouseover=\"return overlib('
    ".$device['hostname'].' - '.$service['service_type']; -$popup .= "
    "; -$popup .= "', RIGHT".$config['overlib_defaults'].');" onmouseout="return nd();"'; - -echo " - "; - -if ($device_id) { - if (!$samehost) { - echo "".generate_device_link($device).''; - } - else { - echo ''; - } -} - -echo " - - $status - - - $since - - - $message - - - $desc - - - $checked - - "; - -$i++; diff --git a/html/includes/service-add.inc.php b/html/includes/service-add.inc.php deleted file mode 100644 index cf1433b274..0000000000 --- a/html/includes/service-add.inc.php +++ /dev/null @@ -1,10 +0,0 @@ -'; -} diff --git a/html/includes/service-delete.inc.php b/html/includes/service-delete.inc.php deleted file mode 100644 index 9ea114dc59..0000000000 --- a/html/includes/service-delete.inc.php +++ /dev/null @@ -1,10 +0,0 @@ -'; -} diff --git a/html/includes/service-edit.inc.php b/html/includes/service-edit.inc.php deleted file mode 100644 index 9d725dd4dd..0000000000 --- a/html/includes/service-edit.inc.php +++ /dev/null @@ -1,5 +0,0 @@ -'.$device['sysName']; if (empty($port_count)) { $port_count = 0; + $col_port = ''; } if ($port_count) { $col_port = ' '.$port_count.'
    '; diff --git a/html/pages/addsrv.inc.php b/html/pages/addsrv.inc.php index 8fe1459829..e75ff24fd9 100644 --- a/html/pages/addsrv.inc.php +++ b/html/pages/addsrv.inc.php @@ -4,13 +4,11 @@ if ($_SESSION['userlevel'] < '10') { include 'includes/error-no-perm.inc.php'; } else { - if ($_POST['addsrv']) { + if ($vars['addsrv']) { if ($_SESSION['userlevel'] >= '10') { $updated = '1'; - // FIXME should call add_service (needs more parameters) - $service_id = dbInsert(array('device_id' => $_POST['device'], 'service_ip' => $_POST['ip'], 'service_type' => $_POST['type'], 'service_desc' => $_POST['descr'], 'service_param' => $_POST['params'], 'service_ignore' => '0', 'service_status' => '0', 'service_checked' => '0', 'service_changed' => '0', 'service_message' => 'New check', 'service_disabled' => '0'), 'services'); - + $service_id = add_service($vars['device'], $vars['type'], $vars['descr'], $vars['ip'], $vars['params'], 0); if ($service_id) { $message .= $message_break.'Service added ('.$service_id.')!'; $message_break .= '
    '; diff --git a/html/pages/delsrv.inc.php b/html/pages/delsrv.inc.php deleted file mode 100644 index 444b960370..0000000000 --- a/html/pages/delsrv.inc.php +++ /dev/null @@ -1,48 +0,0 @@ - '5') { - include 'includes/service-delete.inc.php'; - } - } - - foreach (dbFetchRows('SELECT * FROM `services` AS S, `devices` AS D WHERE S.device_id = D.device_id ORDER BY hostname') as $device) { - $service_description = ''; - - if (!empty($device['service_desc'])) { - $service_description = ' - ' . substr($device['service_desc'], 0, 30); - } - - $servicesform .= "'; - - } - - if ($updated) { - print_message('Service Deleted!'); - } - - echo " -

    Delete Service

    -
    - -
    -
    - -
    - -
    -
    -
    -
    - -
    -
    "; -}//end if diff --git a/html/pages/device.inc.php b/html/pages/device.inc.php index 9517dd96cf..8f42abff83 100644 --- a/html/pages/device.inc.php +++ b/html/pages/device.inc.php @@ -327,6 +327,16 @@ if (device_permitted($vars['device']) || $check_device == $vars['device']) { if (is_file($configs.$device['hostname'])) { $device_config_file = $configs.$device['hostname']; } + elseif (is_file($configs.strtok($device['hostname'], '.'))) { // Strip domain + $device_config_file = $configs.strtok($device['hostname'], '.'); + } + else { + if (!empty($config['mydomain'])) { // Try with domain name if set + if (is_file($configs.$device['hostname'].'.'.$config['mydomain'])) { + $device_config_file = $configs.$device['hostname'].'.'.$config['mydomain']; + } + } + } // end if } if ($config['oxidized']['enabled'] === true && isset($config['oxidized']['url'])) { diff --git a/html/pages/device/edit/services.inc.php b/html/pages/device/edit/services.inc.php index 1f2bc1d30e..e480f88edb 100644 --- a/html/pages/device/edit/services.inc.php +++ b/html/pages/device/edit/services.inc.php @@ -1,32 +1,26 @@ = '10') { - include 'includes/service-add.inc.php'; - } - } + $updated = '1'; - if ($_POST['delsrv']) { - if ($_SESSION['userlevel'] >= '10') { - include 'includes/service-delete.inc.php'; - } - } - - if ($_POST['confirm-editsrv']) { - echo 'yeah'; - if ($_SESSION['userlevel'] >= '10') { - include 'includes/service-edit.inc.php'; - } - } - - if ($handle = opendir($config['install_dir'].'/includes/services/')) { - while (false !== ($file = readdir($handle))) { - if ($file != '.' && $file != '..' && !strstr($file, '.')) { - $servicesform .= ""; + $service_id = add_service($vars['device'], $vars['type'], $vars['descr'], $vars['ip'], $vars['params'], 0); + if ($service_id) { + $message .= $message_break.'Service added ('.$service_id.')!'; + $message_break .= '
    '; } } + } + // Build the types list. + if ($handle = opendir($config['nagios_plugins'])) { + while (false !== ($file = readdir($handle))) { + if ($file != '.' && $file != '..' && !strstr($file, '.') && strstr($file, 'check_')) { + list(,$check_name) = explode('_',$file,2); + $servicesform .= ""; + } + } closedir($handle); } @@ -37,45 +31,6 @@ if (is_admin() === true || is_read() === true) { print_message('Device Settings Saved'); } - if (dbFetchCell('SELECT COUNT(*) from `services` WHERE `device_id` = ?', array($device['device_id'])) > '0') { - $i = '1'; - foreach (dbFetchRows('select * from services WHERE device_id = ? ORDER BY service_type', array($device['device_id'])) as $service) { - $existform .= "'; - } - } - - echo '
    '; - - if ($existform) { - echo '
    '; - if ($_POST['editsrv'] == 'yes') { - include_once 'includes/print-service-edit.inc.php'; - } - else { - echo " -

    Edit / Delete Service

    -
    -
    -
    - -
    - -
    -
    -
    -
    - -
    -
    -
    -
    "; - } - - echo '
    '; - } - echo '
    '; include_once 'includes/print-service-add.inc.php'; diff --git a/html/pages/device/overview.inc.php b/html/pages/device/overview.inc.php index b68a7a6c33..278960e766 100644 --- a/html/pages/device/overview.inc.php +++ b/html/pages/device/overview.inc.php @@ -7,12 +7,10 @@ $ports['up'] = dbFetchCell("SELECT COUNT(*) FROM `ports` WHERE device_id = $ports['down'] = dbFetchCell("SELECT COUNT(*) FROM `ports` WHERE device_id = ? AND `ifOperStatus` = 'down' AND `ifAdminStatus` = 'up'", array($device['device_id'])); $ports['disabled'] = dbFetchCell("SELECT COUNT(*) FROM `ports` WHERE device_id = ? AND `ifAdminStatus` = 'down'", array($device['device_id'])); -$services['total'] = dbFetchCell("SELECT COUNT(service_id) FROM `services` WHERE `device_id` = ?", array($device['device_id'])); -$services['up'] = dbFetchCell("SELECT COUNT(service_id) FROM `services` WHERE `device_id` = ? AND `service_status` = '1' AND `service_ignore` ='0'", array($device['device_id'])); -$services['down'] = dbFetchCell("SELECT COUNT(service_id) FROM `services` WHERE `device_id` = ? AND `service_status` = '0' AND `service_ignore` = '0'", array($device['device_id'])); -$services['disabled'] = dbFetchCell("SELECT COUNT(service_id) FROM `services` WHERE `device_id` = ? AND `service_ignore` = '1'", array($device['device_id'])); +$services = get_service_status($device['device_id']); +$services['total'] = array_sum($services); -if ($services['down']) { +if ($services[0]) { $services_colour = $warn_colour_a; } else { diff --git a/html/pages/device/overview/services.inc.php b/html/pages/device/overview/services.inc.php index 7be48403ab..ed5b5023bb 100644 --- a/html/pages/device/overview/services.inc.php +++ b/html/pages/device/overview/services.inc.php @@ -1,49 +1,44 @@ '; - echo '
    -
    -
    -
    '; - echo " Services"; - echo '
    - '; - - echo " - - - - - - - -
    $services[total] $services[up] $services[down] $services[disabled]
    "; - - foreach (dbFetchRows('SELECT * FROM services WHERE device_id = ? ORDER BY service_type', array($device['device_id'])) as $data) { - if ($data['service_status'] == '0' && $data['service_ignore'] == '1') { - $status = 'grey'; - } - - if ($data['service_status'] == '1' && $data['service_ignore'] == '1') { - $status = 'green'; - } - - if ($data['service_status'] == '0' && $data['service_ignore'] == '0') { + // Build the string. + foreach (service_get ($device['device_id']) as $data) { + if ($data['service_status'] == '1') { + // Ok + $status = 'green'; + } elseif ($data['service_status'] == '0') { + // Critical $status = 'red'; + } elseif ($data['service_status'] == '2') { + // Warning + $status = 'red'; + } else { + // Unknown + $status = 'grey'; } - - if ($data['service_status'] == '1' && $data['service_ignore'] == '0') { - $status = 'blue'; - } - - echo "$break".strtolower($data['service_type']).''; + $string .= $break . '' . strtolower ($data['service_type']) . ''; $break = ', '; } - - echo '
    '; - echo '
    '; - echo '
    '; - echo '
    '; - echo '
    '; -}//end if + ?> +
    +
    +
    +
    + Services +
    + + + + + + + + + + +
    +
    +
    +
    +Services » "; $menu_options = array( @@ -29,43 +38,85 @@ foreach ($menu_options as $option => $text) { $sep = ' | '; } - unset($sep); - +echo ''; print_optionbar_end(); - -if (dbFetchCell('SELECT COUNT(service_id) FROM `services` WHERE device_id = ?', array($device['device_id'])) > '0') { - echo "
    "; - $i = '1'; - foreach (dbFetchRows('SELECT * FROM `services` WHERE `device_id` = ? ORDER BY `service_type`', array($device['device_id'])) as $service) { - include 'includes/print-service.inc.php'; - +?> +
    + '0') { + // Loop over each service, pulling out the details. +?> +
    +Ok"; + } + elseif ($service['service_status'] == 1) { + $status = "Warning"; + } + elseif ($service['service_status'] == 2) { + $status = "Critical"; + } + else { + $status = "Unknown"; + } +?> + + '; + $graphs = json_decode($service['service_ds'],TRUE); + foreach ($graphs as $k => $v) { + $graph_array['device'] = $device['device_id']; + $graph_array['type'] = 'device_service'; + $graph_array['service'] = $service['service_id']; + $graph_array['ds'] = $k; +?> +
    + +
    +'; +?> + + +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    +
    +
    +
    '; - - include 'includes/print-graphrow.inc.php'; - - echo '
    + +
    No Services
    + diff --git a/html/pages/editsrv.inc.php b/html/pages/editsrv.inc.php deleted file mode 100644 index 02cd59b5d2..0000000000 --- a/html/pages/editsrv.inc.php +++ /dev/null @@ -1,52 +0,0 @@ - '5') { - include 'includes/service-edit.inc.php'; - } - } - - foreach (dbFetchRows('SELECT * FROM `services` AS S, `devices` AS D WHERE S.device_id = D.device_id ORDER BY hostname') as $device) { - $service_description = ''; - - if (!empty($device['service_desc'])) { - $service_description = ' - ' . substr($device['service_desc'], 0, 30); - } - - $servicesform .= "'; - } - - if ($updated) { - print_message('Service updated!'); - } - - if ($_POST['editsrv'] == 'yes') { - include_once 'includes/print-service-edit.inc.php'; - } - else { - echo " -

    Delete Service

    -
    - -
    -
    - -
    - -
    -
    -
    -
    - -
    -
    "; - }//end if -}//end if diff --git a/html/pages/services.inc.php b/html/pages/services.inc.php index aab52c3d8a..a4b1ec3d39 100644 --- a/html/pages/services.inc.php +++ b/html/pages/services.inc.php @@ -4,41 +4,29 @@ $pagetitle[] = 'Services'; print_optionbar_start(); +require_once 'includes/modal/new_service.inc.php'; +require_once 'includes/modal/delete_service.inc.php'; + echo "Services » "; $menu_options = array( 'basic' => 'Basic', ); - -$sql_param = array(); -if (isset($vars['state'])) { - if ($vars['state'] == 'up') { - $state = '1'; - } - elseif ($vars['state'] == 'down') { - $state = '0'; - } -} - -if ($vars['state']) { - $where .= " AND service_status= ? AND service_disabled='0' AND `service_ignore`='0'"; - $sql_param[] = $state; -} - -if ($vars['disabled']) { - $where .= ' AND service_disabled= ?'; - $sql_param[] = $vars['disabled']; -} - -if ($vars['ignore']) { - $where .= ' AND `service_ignore`= ?'; - $sql_param[] = $vars['ignore']; -} - if (!$vars['view']) { $vars['view'] = 'basic'; } +$status_options = array( + 'all' => 'All', + 'ok' => 'Ok', + 'warning' => 'Warning', + 'critical' => 'Critical', +); +if (!$vars['state']) { + $vars['state'] = 'all'; +} + +// The menu option - on the left $sep = ''; foreach ($menu_options as $option => $text) { if (empty($vars['view'])) { @@ -57,21 +45,61 @@ foreach ($menu_options as $option => $text) { $sep = ' | '; } - unset($sep); +// The status option - on the right +echo '
    '; +$sep = ''; +foreach ($status_options as $option => $text) { + if (empty($vars['state'])) { + $vars['state'] = $option; + } + + echo $sep; + if ($vars['state'] == $option) { + echo ""; + } + + echo generate_link($text, $vars, array('state' => $option)); + if ($vars['state'] == $option) { + echo ''; + } + + $sep = ' | '; +} +unset($sep); +echo '
    '; print_optionbar_end(); -echo '
    - +$sql_param = array(); +if (isset($vars['state'])) { + if ($vars['state'] == 'ok') { + $state = '0'; + } + elseif ($vars['state'] == 'critical') { + $state = '2'; + } + elseif ($vars['state'] == 'warning') { + $state = '1'; + } +} +if (isset($state)) { + $where .= " AND service_status= ? AND service_disabled='0' AND `service_ignore`='0'"; + $sql_param[] = $state; +} + +?> +
    +
    - - '; + + += '5') { $host_sql = 'SELECT * FROM devices AS D, services AS S WHERE D.device_id = S.device_id GROUP BY D.hostname ORDER BY D.hostname'; $host_par = array(); @@ -85,6 +113,7 @@ $shift = 1; foreach (dbFetchRows($host_sql, $host_par) as $device) { $device_id = $device['device_id']; $device_hostname = $device['hostname']; + $devlink = generate_device_link($device,null,array('tab' => 'services')); if ($shift == 1) { array_unshift($sql_param, $device_id); $shift = 0; @@ -94,39 +123,31 @@ foreach (dbFetchRows($host_sql, $host_par) as $device) { } foreach (dbFetchRows("SELECT * FROM `services` WHERE `device_id` = ? $where", $sql_param) as $service) { - include 'includes/print-service.inc.php'; - - // $samehost = 1; - if ($vars['view'] == 'details') { - $graph_array['height'] = '100'; - $graph_array['width'] = '215'; - $graph_array['to'] = $config['time']['now']; - $graph_array['id'] = $service['service_id']; - $graph_array['type'] = 'service_availability'; - - $periods = array( - 'day', - 'week', - 'month', - 'year', - ); - - echo ''; - }//end if + if ($service['service_status'] == '2') { + $status = "".$service['service_type'].""; + } + else if ($service['service_status'] == '0') { + $status = "".$service['service_type'].""; + } + else { + $status = "".$service['service_type'].""; + } +?> + + + + + + + + + -'; +?> +
    Device Service Changed Message DescriptionLast Check
     
    '; - - foreach ($periods as $period) { - $graph_array['from'] = $$period; - $graph_array_zoom = $graph_array; - $graph_array_zoom['height'] = '150'; - $graph_array_zoom['width'] = '400'; - echo overlib_link('', generate_lazy_graph_tag($graph_array), generate_graph_tag($graph_array_zoom), NULL); - } - - echo '
    + + +
    diff --git a/includes/common.php b/includes/common.php index e7ba9ca4be..36f2a5dc2d 100644 --- a/includes/common.php +++ b/includes/common.php @@ -585,38 +585,6 @@ function is_valid_hostname($hostname) { return ctype_alnum(str_replace('_','',str_replace('-','',str_replace('.','',$hostname)))); } -function add_service($device, $service, $descr, $service_ip, $service_param = "", $service_ignore = 0) { - - if (!is_array($device)) { - $device = device_by_id_cache($device); - } - - if (empty($service_ip)) { - $service_ip = $device['hostname']; - } - - $insert = array('device_id' => $device['device_id'], 'service_ip' => $service_ip, 'service_type' => $service, - 'service_changed' => array('UNIX_TIMESTAMP(NOW())'), 'service_desc' => $descr, 'service_param' => $service_param, 'service_ignore' => $service_ignore); - - return dbInsert($insert, 'services'); -} - -function edit_service($service, $descr, $service_ip, $service_param = "", $service_ignore = 0) { - - if (!is_numeric($service)) { - return false; - } - - $update = array('service_ip' => $service_ip, - 'service_changed' => array('UNIX_TIMESTAMP(NOW())'), - 'service_desc' => $descr, - 'service_param' => $service_param, - 'service_ignore' => $service_ignore); - return dbUpdate($update, 'services', '`service_id`=?', array($service)); - -} - - /* * convenience function - please use this instead of 'if ($debug) { echo ...; }' */ diff --git a/includes/defaults.inc.php b/includes/defaults.inc.php index 42e0a4db69..3dac116ada 100644 --- a/includes/defaults.inc.php +++ b/includes/defaults.inc.php @@ -715,6 +715,7 @@ $config['poller_modules']['cisco-voice'] = 1; $config['poller_modules']['cisco-cbqos'] = 1; $config['poller_modules']['stp'] = 1; $config['poller_modules']['cisco-otv'] = 1; +$config['poller_modules']['services'] = 1; // List of discovery modules. Need to be in this array to be // considered for execution. diff --git a/includes/discovery/functions.inc.php b/includes/discovery/functions.inc.php index b622454bae..e93099f868 100644 --- a/includes/discovery/functions.inc.php +++ b/includes/discovery/functions.inc.php @@ -338,10 +338,7 @@ function sensor_low_limit($class, $current) { break; case 'signal': - $limit = ($current * 1.20); - if ($limit < -80 && $current > -80) { - $limit = -80; - } + $limit = -80; break; }//end switch @@ -387,7 +384,7 @@ function sensor_limit($class, $current) { break; case 'signal'; - $limit = 0; + $limit = -30; break; }//end switch diff --git a/includes/discovery/sensors/current/apc.inc.php b/includes/discovery/sensors/current/apc.inc.php index 8e35df8821..76e0006a69 100644 --- a/includes/discovery/sensors/current/apc.inc.php +++ b/includes/discovery/sensors/current/apc.inc.php @@ -58,7 +58,10 @@ if ($device['os'] == 'apc') { unset($oids); // v2 firmware- first bank is total, v3 firmware, 3rd bank is total - $oids = snmp_walk($device, 'rPDULoadStatusIndex', '-OsqnU', 'PowerNet-MIB'); + $bank_count = snmp_get($device, 'rPDULoadDevNumBanks.0', '-Oqv', 'PowerNet-MIB'); + if ($bank_count > 0) { + $oids = snmp_walk($device, 'rPDULoadStatusIndex', '-OsqnU', 'PowerNet-MIB'); + } // should work with firmware v2 and v3 if ($oids) { echo 'APC PowerNet-MIB Banks '; diff --git a/includes/discovery/sensors/temperatures/canopy.inc.php b/includes/discovery/sensors/temperatures/canopy.inc.php index a268c52da6..7acf089c73 100644 --- a/includes/discovery/sensors/temperatures/canopy.inc.php +++ b/includes/discovery/sensors/temperatures/canopy.inc.php @@ -15,7 +15,6 @@ if ($device['os'] == 'canopy') { list(,$current) = explode(' ', $oids); $index = $oid; $descr = 'System Temp'; - discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, $type, $descr, $divisor, '1', null, null, null, null, $current); + discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, $type, $descr, $divisor, '1', -30, null, null, 50, $current); } - -} +} \ No newline at end of file diff --git a/includes/discovery/sensors/temperatures/powerconnect.inc.php b/includes/discovery/sensors/temperatures/powerconnect.inc.php index af9c8fe8d2..46d334f39a 100644 --- a/includes/discovery/sensors/temperatures/powerconnect.inc.php +++ b/includes/discovery/sensors/temperatures/powerconnect.inc.php @@ -18,6 +18,14 @@ if ($device['os'] == 'powerconnect') { $temperature = trim(snmp_get($device, ".1.3.6.1.4.1.89.53.15.1.9.1", "-Ovq")); discover_sensor($valid['sensor'], 'temperature', $device, '.1.3.6.1.4.1.89.53.15.1.9.1', 0, 'powerconnect', 'Internal Temperature', '1', '1', '0', null, null, '45', $temperature); break; + /** + * Dell Powerconnect 3548P + * Operating Temperature: 0Âş C to 45Âş C + */ + case '.1.3.6.1.4.1.674.10895.3019': + $temperature = trim(snmp_get($device, ".1.3.6.1.4.1.89.53.15.1.9.1", "-Ovq")); + discover_sensor($valid['sensor'], 'temperature', $device, '.1.3.6.1.4.1.89.53.15.1.9.1', 0, 'powerconnect', 'Internal Temperature', '1', '1', '0', null, null, '45', $temperature); + break; default : /** * Default Temperature Discovery diff --git a/includes/services.inc.php b/includes/services.inc.php index 1850550184..2205a4f47c 100644 --- a/includes/services.inc.php +++ b/includes/services.inc.php @@ -1,5 +1,103 @@ 0, 1 => 0, 2 => 0); + // Rebuild the array in a more convenient method + foreach ($result as $v) { + $service_count[$v['service_status']] = $v['count']; + } + + d_echo("Service Count by Status: ".print_r($service_count,TRUE)."\n"); + return $service_count; +} + +function add_service($device, $type, $desc, $ip='localhost', $param = "", $ignore = 0) { + + if (!is_array($device)) { + $device = device_by_id_cache($device); + } + + if (empty($ip)) { + $ip = $device['hostname']; + } + + $insert = array('device_id' => $device['device_id'], 'service_ip' => $ip, 'service_type' => $type, 'service_changed' => array('UNIX_TIMESTAMP(NOW())'), 'service_desc' => $desc, 'service_param' => $param, 'service_ignore' => $ignore, 'service_status' => 3, 'service_message' => 'Service not yet checked'); + return dbInsert($insert, 'services'); +} + +function service_get($device = null, $service = null) { + $sql_query = "SELECT `service_id`,`device_id`,`service_ip`,`service_type`,`service_desc`,`service_param`,`service_ignore`,`service_status`,`service_changed`,`service_message`,`service_disabled`,`service_ds` FROM `services` WHERE"; + $sql_param = array(); + $add = 0; + + d_echo("SQL Query: ".$sql_query); + if (!is_null($service)) { + // Add a service filter to the SQL query. + $sql_query .= " `service_id` = ? AND"; + $sql_param[] = $service; + $add++; + } + if (!is_null($device)) { + // Add a device filter to the SQL query. + $sql_query .= " `device_id` = ? AND"; + $sql_param[] = $device; + $add++; + } + + if ($add == 0) { + // No filters, remove " WHERE" -6 + $sql_query = substr($sql_query, 0, strlen($sql_query)-6); + } + else { + // We have filters, remove " AND" -4 + $sql_query = substr($sql_query, 0, strlen($sql_query)-4); + } + d_echo("SQL Query: ".$sql_query); + + // $service is not null, get only what we want. + $services = dbFetchRows($sql_query, $sql_param); + d_echo("Service Array: ".print_r($services,TRUE)."\n"); + + return $services; +} + +function edit_service($update=array(), $service=null) { + if (!is_numeric($service)) { + return false; + } + + return dbUpdate($update, 'services', '`service_id`=?', array($service)); +} + +function delete_service($service=null) { + if (!is_numeric($service)) { + return false; + } + + return dbDelete('services', '`service_id` = ?', array($service)); +} function discover_service($device, $service) { if (! dbFetchCell('SELECT COUNT(service_id) FROM `services` WHERE `service_type`= ? AND `device_id` = ?', array($service, $device['device_id']))) { @@ -7,7 +105,143 @@ function discover_service($device, $service) { log_event('Autodiscovered service: type '.mres($service), $device, 'service'); echo '+'; } - echo "$service "; - +} + +function poll_service($service) { + global $config; + $update = array(); + $old_status = $service['service_status']; + $check_cmd = ""; + + // if we have a script for this check, use it. + $check_script = $config['install_dir'].'/includes/services/check_'.strtolower($service['service_type']).'.inc.php'; + if (is_file($check_script)) { + include $check_script; + } + + // If we do not have a cmd from the check script, build one. + if ($check_cmd == "") { + $check_cmd = $config['nagios_plugins'] . "/check_" . $service['service_type'] . " -H " . ($service['service_ip'] ? $service['service_ip'] : $service['hostname']); + $check_cmd .= " " . $service['service_param']; + } + + // Some debugging + d_echo("\nNagios Service - ".$service['service_id']."\n"); + d_echo("Request: ".$check_cmd."\n"); + list($new_status, $msg, $perf) = check_service($check_cmd); + d_echo("Response: ".$msg."\n"); + + // If we have performance data we will store it. + if (count($perf) > 0) { + // Yes, We have perf data. + $filename = "services-".$service['service_id'].".rrd"; + $rrd_filename = $config['rrd_dir'] . "/" . $service['hostname'] . "/" . safename ($filename); + + // Set the DS in the DB if it is blank. + $DS = array(); + foreach ($perf as $k => $v) { + $DS[$k] = $v['uom']; + } + d_echo("Service DS: "._json_encode($DS)."\n"); + if ($service['service_ds'] == "") { + $update['service_ds'] = json_encode($DS); + } + + // Create the RRD + if (!file_exists ($rrd_filename)) { + $rra = ""; + foreach ($perf as $k => $v) { + if ($v['uom'] == 'c') { + // This is a counter, create the DS as such + $rra .= " DS:".$k.":COUNTER:600:0:U"; + } + else { + // Not a counter, must be a gauge + $rra .= " DS:".$k.":GAUGE:600:0:U"; + } + } + rrdtool_create ($rrd_filename, $rra . $config['rrd_rra']); + } + + // Update RRD + $rrd = array(); + foreach ($perf as $k => $v) { + $rrd[$k] = $v['value']; + } + rrdtool_update ($rrd_filename, $rrd); + } + + if ($old_status != $new_status) { + // Status has changed, update. + $update['service_changed'] = time(); + $update['service_status'] = $new_status; + $update['service_message'] = $msg; + } + + if (count($update) > 0) { + edit_service($update,$service['service_id']); + } + + return true; +} + +function check_service($command) { + // This array is used to test for valid UOM's to be used for graphing. + // Valid values from: https://nagios-plugins.org/doc/guidelines.html#AEN200 + // Note: This array must be decend from 2 char to 1 char so that the search works correctly. + $valid_uom = array ('us', 'ms', 'KB', 'MB', 'GB', 'TB', 'c', 's', '%', 'B'); + + // Make our command safe. + $command = escapeshellcmd($command); + + // Run the command and return its response. + exec($command, $response_array, $status); + + // exec returns an array, lets implode it back to a string. + $response_string = implode("\n", $response_array); + + // Split out the response and the performance data. + list($response, $perf) = explode("|", $response_string); + + // Split each performance metric + $perf_arr = explode(' ', $perf); + + // Create an array for our metrics. + $metrics = array(); + + // Loop through the perf string extracting our metric data + foreach ($perf_arr as $string) { + // Separate the DS and value: DS=value + list ($ds,$values) = explode('=', trim($string)); + + // Keep the first value, discard the others. + list($value,,,) = explode(';', trim($values)); + $value = trim($value); + + // Set an empty uom + $uom = ''; + + // is the UOM valid - https://nagios-plugins.org/doc/guidelines.html#AEN200 + foreach ($valid_uom as $v) { + if ((strlen($value)-strlen($v)) === strpos($value,$v)) { + // Yes, store and strip it off the value + $uom = $v; + $value = substr($value, 0, -strlen($v)); + break; + } + } + + if ($ds != "") { + // We have a DS. Add an entry to the array. + d_echo("Perf Data - DS: ".$ds.", Value: ".$value.", UOM: ".$uom."\n"); + $metrics[$ds] = array ('value'=>$value, 'uom'=>$uom); + } + else { + // No DS. Don't add an entry to the array. + d_echo("Perf Data - None.\n"); + } + } + + return array ($status, $response, $metrics); } diff --git a/includes/services/dns/check.inc b/includes/services/check_dns.inc.php similarity index 55% rename from includes/services/dns/check.inc rename to includes/services/check_dns.inc.php index ed6fba7241..bfdbf4b9ef 100644 --- a/includes/services/dns/check.inc +++ b/includes/services/check_dns.inc.php @@ -4,14 +4,4 @@ if ($service['service_param']) { $nsquery = $service['service_param']; } else { $nsquery = "localhost"; } if ($service['service_ip']) { $resolver = $service['service_ip']; } else { $resolver = $service['hostname']; } -$check = shell_exec($config['nagios_plugins'] . "/check_dns -H ".$nsquery." -s ".$resolver); - -list($check, $time) = explode("|", $check); - -if(strstr($check, "DNS OK: ")) { - $status = '1'; -} else { - $status = '0'; -} - -?> +$check_cmd = $config['nagios_plugins'] . "/check_dns -H ".$nsquery." -s ".$resolver; diff --git a/includes/services/check_domain_expire.inc.php b/includes/services/check_domain_expire.inc.php new file mode 100644 index 0000000000..8c722fe526 --- /dev/null +++ b/includes/services/check_domain_expire.inc.php @@ -0,0 +1,10 @@ + diff --git a/includes/services/ftp/check.inc b/includes/services/ftp/check.inc deleted file mode 100644 index 1ac1a4df9f..0000000000 --- a/includes/services/ftp/check.inc +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/includes/services/http/check.inc b/includes/services/http/check.inc deleted file mode 100644 index 5c9067e8c5..0000000000 --- a/includes/services/http/check.inc +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/includes/services/icmp/check.inc b/includes/services/icmp/check.inc deleted file mode 100644 index 9d96d502c0..0000000000 --- a/includes/services/icmp/check.inc +++ /dev/null @@ -1,12 +0,0 @@ - diff --git a/includes/services/imap/check.inc b/includes/services/imap/check.inc deleted file mode 100644 index 11916d5423..0000000000 --- a/includes/services/imap/check.inc +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/includes/services/ircd/check.inc b/includes/services/ircd/check.inc deleted file mode 100644 index db8e8613fb..0000000000 --- a/includes/services/ircd/check.inc +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/includes/services/mysql/check.inc b/includes/services/mysql/check.inc deleted file mode 100644 index 6aa94bc725..0000000000 --- a/includes/services/mysql/check.inc +++ /dev/null @@ -1,16 +0,0 @@ - diff --git a/includes/services/ntp/check.inc b/includes/services/ntp/check.inc deleted file mode 100644 index 7b3b776499..0000000000 --- a/includes/services/ntp/check.inc +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/includes/services/pop/check.inc b/includes/services/pop/check.inc deleted file mode 100644 index f31ca2506a..0000000000 --- a/includes/services/pop/check.inc +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/includes/services/simap/check.inc b/includes/services/simap/check.inc deleted file mode 100644 index 47d86208b8..0000000000 --- a/includes/services/simap/check.inc +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/includes/services/smtp/check.inc b/includes/services/smtp/check.inc deleted file mode 100644 index 7152410e1c..0000000000 --- a/includes/services/smtp/check.inc +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/includes/services/spop/check.inc b/includes/services/spop/check.inc deleted file mode 100644 index a3bc249555..0000000000 --- a/includes/services/spop/check.inc +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/includes/services/ssh/check.inc b/includes/services/ssh/check.inc deleted file mode 100644 index 2ae81cdc9c..0000000000 --- a/includes/services/ssh/check.inc +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/includes/services/ssl_cert/check.inc b/includes/services/ssl_cert/check.inc deleted file mode 100644 index 3c21078dd2..0000000000 --- a/includes/services/ssl_cert/check.inc +++ /dev/null @@ -1,20 +0,0 @@ - diff --git a/includes/services/telnet/check.inc b/includes/services/telnet/check.inc deleted file mode 100644 index 8f81a16446..0000000000 --- a/includes/services/telnet/check.inc +++ /dev/null @@ -1,15 +0,0 @@ - diff --git a/includes/syslog.php b/includes/syslog.php index 395e13a7a4..42f999dff9 100644 --- a/includes/syslog.php +++ b/includes/syslog.php @@ -55,7 +55,7 @@ function process_syslog($entry, $update) { // multipart message if(strpos($entry['msg'], ':') !== false) { $matches = array(); - $timestamp_prefix = '([A-Z][a-z]{2} \d\d? \d\d:\d\d:\d\d(.\d\d\d)?( [A-Z]{3})?: )?'; + $timestamp_prefix = '([\*\.]?[A-Z][a-z]{2} \d\d? \d\d:\d\d:\d\d(.\d\d\d)?( [A-Z]{3})?: )?'; $program_match = '(?%?[A-Za-z\d\-_]+(:[A-Z]* %[A-Z\d\-_]+)?)'; $message_match = '(?.*)'; if(preg_match('/^' . $timestamp_prefix . $program_match . ': ?' . $message_match . '/', $entry['msg'], $matches)) { diff --git a/librenms.cron b/librenms.cron index f5ba937407..f03f5316da 100644 --- a/librenms.cron +++ b/librenms.cron @@ -5,4 +5,3 @@ */5 * * * * root /opt/librenms/cronic /opt/librenms/poller-wrapper.py 16 15 0 * * * root /opt/librenms/daily.sh >> /dev/null 2>&1 * * * * * root /opt/librenms/alerts.php >> /dev/null 2>&1 -*/5 * * * * root /opt/librenms/check-services.php >> /dev/null 2>&1 diff --git a/librenms.nonroot.cron b/librenms.nonroot.cron index 5f55ad7751..3c83bf8b1b 100644 --- a/librenms.nonroot.cron +++ b/librenms.nonroot.cron @@ -5,4 +5,3 @@ */5 * * * * librenms /opt/librenms/cronic /opt/librenms/poller-wrapper.py 16 15 0 * * * librenms /opt/librenms/daily.sh >> /dev/null 2>&1 * * * * * librenms /opt/librenms/alerts.php >> /dev/null 2>&1 -*/5 * * * * librenms /opt/librenms/check-services.php >> /dev/null 2>&1 diff --git a/mibs/PowerNet-MIB b/mibs/PowerNet-MIB index 51ea45c17e..deb4091462 100644 --- a/mibs/PowerNet-MIB +++ b/mibs/PowerNet-MIB @@ -1,18 +1,18 @@ -- ************************************************************************* -- AMERICAN POWER CONVERSION PowerNet-MIB -- ************************************************************************* --- Copyright (c) 2015 American Power Conversion, Inc. +-- Copyright (c) 2016 American Power Conversion, Inc. -- PowerNet is a Trademark of American Power Conversion Corp. -- -- Title: APC TOP LEVEL PowerNet MIB -- --- Version : 4.1.4 +-- Version : 4.1.7 -- -- Generated by script: tomib.awk -- -- Input File: powernetPS.mib -- --- Created: Wednesday, January, 21, 2015 +-- Created: Wednesday, January, 06, 2016 -- -- Revision History: -- ************************************************************************* @@ -158,17 +158,17 @@ -- Added rPDU2 Metered Outlet Data -- 08/17/11 - v4.0.4 Updated several rPDU2 and rPDU OIDs. -- 12/07/11 - v4.0.5 Added new OID's for SYPX upsPhaseOutputPowerFactor and symmetraPxDisplay. --- Added SYS OID's for different Caphorn models galaxy5000UPS20KVA, galaxy5000UPS30KVA, galaxy5000UPS40KVA --- galaxy5000UPS50KVA, galaxy5000UPS60KVA , galaxy5000UPS80KVA, galaxy5000UPS100KVA, galaxy5000UPS120KVA --- galaxy5000UPS130KVA, galaxy5500UPS20KVA, galaxy5500UPS30KVA, galaxy5500UPS40KVA, galaxy5500UPS50KVA --- galaxy5500UPS60KVA, galaxy5500UPS80KVA, galaxy5500UPS100KVA, galaxy5500UPS120KVA, galaxy5500UPS130KVA --- and new OID upsAdvStateEcomode +-- Added SYS OID's for different Caphorn models galaxy5000UPS20KVA, galaxy5000UPS30KVA, galaxy5000UPS40KVA +-- galaxy5000UPS50KVA, galaxy5000UPS60KVA , galaxy5000UPS80KVA, galaxy5000UPS100KVA, galaxy5000UPS120KVA +-- galaxy5000UPS130KVA, galaxy5500UPS20KVA, galaxy5500UPS30KVA, galaxy5500UPS40KVA, galaxy5500UPS50KVA +-- galaxy5500UPS60KVA, galaxy5500UPS80KVA, galaxy5500UPS100KVA, galaxy5500UPS120KVA, galaxy5500UPS130KVA +-- and new OID upsAdvStateEcomode -- 06/05/12 - v4.0.6 Added new OID rPDUIdentDeviceLineToNeutralVoltage for AP7823 Rack PDU. -- 06/20/12 - v4.0.6 Added new rPDU2Group OID table for AP84xx, AP86xx, AP88xx, AP89xx Rack PDUs. -- 08/10/12 - v4.0.6 Added new OIDs for SYPX 250/500 upsAdvConfigWarningAlarmDelay, upsAdvConfigInformationalAlarmDelay, upsDiagSwitchGearInstallationLoadPct, --- upsParallelOutputActivePowerTable,upsParallelSysSwitchGearInstallationLoadPct, upsParallelSysRedundancyStatus and upsParallelSysName. --- Modified the description for upsBasicBatteryLastReplaceDate and bit 51 of upsBasicStateOutputState. --- Updated upsBasicOutputStatus and upsBasicSystemStatus. +-- upsParallelOutputActivePowerTable,upsParallelSysSwitchGearInstallationLoadPct, upsParallelSysRedundancyStatus and upsParallelSysName. +-- Modified the description for upsBasicBatteryLastReplaceDate and bit 51 of upsBasicStateOutputState. +-- Updated upsBasicOutputStatus and upsBasicSystemStatus. -- 08/10/12 - v4.0.6 Added SYS OIDs for different Caphorn models galaxy9000UPS, galaxy9000SSC, galaxy9000UPSWithSSC, galaxy9000FreqConverter, eps6000UPS, -- eps6000SSC, eps6000UPSWithSSC, eps6000FreqConverter, eps7000UPS, eps7000SSC, eps7000UPSWithSSC, -- eps7000FreqConverter, eps8000UPS, eps8000SSC, eps8000UPSWithSSC, eps8000FreqConverter. @@ -198,6 +198,22 @@ -- 5.Added OIDs airIRRP100GroupStatusDewPointTempUS, airIRRP100GroupStatusDewPointTempMetric, airIRRP500GroupStatusDewPointTempUS -- and airIRRP500GroupStatusDewPointTempMetric to support the group dew point temperature. -- 6.Added OIDs airIRRP100UnitStatusLeakSensor and airIRRP500UnitStatusLeakSensor to support leak sensor status. +-- 05/06/15 -v4.1.5 Added configurable contact OID rPDU2DeviceConfigContact. +-- Added enums for the chargerSpotmode, inverterSpotmode state in upsBasicOutputStatus OID and StaticBypassStandby state in the upsBasicSystemStatus OID. +-- Added new OIDs to support Active Flow Controller for airIRSC: +-- airIRSCGroupConfigNumberOfActiveFlowControllers, airIRSCGroupConfigActiveFlowControllerLampTest, +-- airIRSCGroupStatusActiveFlowControlStatus, airIRSCGroupSetpointsActiveFlowControlBias, airIRSCUnitStatusLeakSensor +-- 07/13/15 -v4.1.6 Changes for airIR Gen2 RD: +-- 1. Updated airIRG2GroupConfigConfigurationType to support CACS strategy. +-- 2. Added airIRG2RDT2StatusLeakSensor to support leak sensor status. +-- 3. Added OIDs to support Active Flow Controller: +-- airIRG2GroupStatusActiveFlowControlStatus,airIRG2GroupSetpointsActiveFlowControlBias,airIRG2GroupConfigNumberOfActiveFlowControllers, +-- airIRG2GroupConfigActiveFlowControllerLampTest,airIRG2GroupConfigAltitudeUS,airIRG2GroupConfigAltitudeMetric. +-- 08/05/15 -v4.1.7 Changes for SUMX and SY: +-- 1. Added upsAdvConfigBatteryHealthAlarmWarningTime and upsAdvConfigBatteryHealthAlarmSleepTime OIDs. +-- 2. Added upsDCOutput OIDs to support UPSes with DC outputs +-- 3. Added upsOnBatteryDueToFault and upsOnBatteryDueToFaultCleared for Symmetra UPSes. + -- ******************************************************************************************** -- ******************************************************************************************** -- PowerNet-MIB { iso org(3) dod(6) internet(1) private(4) @@ -443,7 +459,12 @@ airIRRP500Series OBJECT IDENTIFIER ::= { networkAir 7 } airIRRD100Series OBJECT IDENTIFIER ::= { networkAir 8 } airInRoomPerimeter OBJECT IDENTIFIER ::= { networkAir 9 } airACRC300Series OBJECT IDENTIFIER ::= { networkAir 10 } -airIRRDU OBJECT IDENTIFIER ::= { networkAir 12 } +airLESeries OBJECT IDENTIFIER ::= { networkAir 11 } +airIRRDU OBJECT IDENTIFIER ::= { networkAir 12 } +airEcoBreeze OBJECT IDENTIFIER ::= { networkAir 13 } +airLELSeries OBJECT IDENTIFIER ::= { networkAir 14 } +airACRC600Series OBJECT IDENTIFIER ::= { networkAir 15 } +airACRD600Series OBJECT IDENTIFIER ::= { networkAir 16 } ais5000UPS10kVA OBJECT IDENTIFIER ::= { ais5000UPS 1 } ais5000UPS20kVA OBJECT IDENTIFIER ::= { ais5000UPS 2 } @@ -520,6 +541,7 @@ galaxy9000FreqConverter OBJECT IDENTIFIER ::= { galaxy 51 } + eps6000UPS OBJECT IDENTIFIER ::= { eps 1 } eps6000SSC OBJECT IDENTIFIER ::= { eps 2 } eps6000UPSWithSSC OBJECT IDENTIFIER ::= { eps 3 } @@ -558,6 +580,7 @@ upsDiagnostics OBJECT IDENTIFIER ::= { ups 13 } upsParallelSystem OBJECT IDENTIFIER ::= { ups 14 } upsPhysicalLayout OBJECT IDENTIFIER ::= { ups 15 } upsIntegratedATS OBJECT IDENTIFIER ::= { ups 16 } +upsDCOutput OBJECT IDENTIFIER ::= { ups 17 } upsBasicIdent OBJECT IDENTIFIER ::= { upsIdent 1 } upsAdvIdent OBJECT IDENTIFIER ::= { upsIdent 2 } @@ -998,8 +1021,8 @@ airIRGen3 OBJECT IDENTIFIER ::= { airConditioners 6 } airIRG3Ident OBJECT IDENTIFIER ::= { airIRGen3 1 } airIRG3Group OBJECT IDENTIFIER ::= { airIRGen3 2 } airIRG3Alarms OBJECT IDENTIFIER ::= { airIRGen3 3 } -airIRG3RDU OBJECT IDENTIFIER ::= { airIRGen3 4 } -airIRG3CM OBJECT IDENTIFIER ::= { airIRGen3 5 } +airIRG3RDU OBJECT IDENTIFIER ::= { airIRGen3 4 } +airIRG3CM OBJECT IDENTIFIER ::= { airIRGen3 5 } rARUIdent OBJECT IDENTIFIER ::= { rARU 1 } @@ -8960,7 +8983,7 @@ upsBasicBatteryLastReplaceDate OBJECT-TYPE in mm/dd/yy (or yyyy) format. For Smart-UPS models, this value is originally set in the factory. When the UPS batteries are replaced, this value should be reset by the administrator. - For Symmetra PX 250/500 this OID is read only and is configurable in the local display only." + For Symmetra PX 250/500 this OID is read only and is configurable in the local display only." ::= { upsBasicBattery 3 } -- the upsAdvBattery group @@ -10034,7 +10057,9 @@ upsBasicOutputStatus OBJECT-TYPE staticBypassStandby(17), powerSavingMode(18), spotMode(19), - eConversion(20) + eConversion(20), + chargerSpotmode(21), + inverterSpotmode(22) } ACCESS read-only STATUS mandatory @@ -10068,7 +10093,8 @@ upsBasicSystemStatus OBJECT-TYPE onSmartTrim(12), ecoMode(13), inverter(14), - eConversion(15) + eConversion(15), + staticBypassStandby(16) } ACCESS read-only STATUS mandatory @@ -10637,7 +10663,7 @@ upsAdvConfigSetEEPROMDefaults OBJECT-TYPE STATUS mandatory DESCRIPTION "WRITE: Resets the UPS EEPROM variables to default values. - READ: returns 0" + READ: returns 1" ::= { upsAdvConfig 12 } upsAdvConfigDipSwitchTable OBJECT-TYPE @@ -11166,6 +11192,25 @@ upsAdvConfigBatterySelection OBJECT-TYPE Lead Acid type battery and Vented Cell is a wet cell type (car) battery." ::= { upsAdvConfig 49 } +upsAdvConfigBatteryHealthAlarmWarningTime OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-write + STATUS mandatory + DESCRIPTION + "Configure the number of days before the battery health is depleted that the battery + health alarm is activated. Setting this to -1, if supported by the UPS, will suppress + the battery health alarm." + ::= { upsAdvConfig 50 } + +upsAdvConfigBatteryHealthAlarmSleepTime OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-write + STATUS mandatory + DESCRIPTION + "Configure the number of days that the UPS's battery health alarm should sleep before + being activated again after being acknowledged. Setting this to -1, if supported by the + UPS, displays no other alarms after the first alarm is acknowledged." + ::= { upsAdvConfig 51 } -- the upsSyncCtrlGroupConfig group @@ -11938,8 +11983,8 @@ upsAdvStateEcomode OBJECT-TYPE STATUS mandatory DESCRIPTION "Eco mode status. - 1: UPS is on Eco-mode - 2: UPS is not on Eco-mode." + 1: UPS is on Eco-mode + 2: UPS is not on Eco-mode." ::= { upsAdvState 13 } -- the upsBasicControl group @@ -13911,6 +13956,214 @@ upsDiagPMManufactureDate OBJECT-TYPE "The manufacture date of the Power Module." ::= { upsDiagPMEntry 6 } +upsDiagPMLifetimeInfoTable OBJECT-TYPE + SYNTAX SEQUENCE OF UpsDiagPMLifetimeInfoEntry + ACCESS not-accessible + STATUS mandatory + DESCRIPTION + "Allows for diagnostics of individual power module's lifetime information. + The number of entries is contained in the upsDiagPMTableSize OID." + ::= { upsDiagnosticPowerModules 3 } + +upsDiagPMLifetimeInfoEntry OBJECT-TYPE + SYNTAX UpsDiagPMLifetimeInfoEntry + ACCESS not-accessible + STATUS mandatory + DESCRIPTION + "The diagnostics of a Power Module lifetime information." + INDEX { upsDiagPMLifetimeInfoIndex} + ::= { upsDiagPMLifetimeInfoTable 1 } + +UpsDiagPMLifetimeInfoEntry ::= + SEQUENCE { + upsDiagPMLifetimeInfoIndex INTEGER, + upsDiagPMLifetimeStatus INTEGER, + upsDiagPMEstmtdLifetimeRmng INTEGER, + upsDiagPMEstmtdLifetimeRmngPct INTEGER, + upsDiagPMFanLifetimeStatus INTEGER, + upsDiagPMFanEstmtdLifetimeRmng INTEGER, + upsDiagPMFanEstmtdLifetimeRmngPct INTEGER + + } + +upsDiagPMLifetimeInfoIndex OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The index to the Power Module lifetime information entry." + ::= { upsDiagPMLifetimeInfoEntry 1 } + +upsDiagPMLifetimeStatus OBJECT-TYPE + SYNTAX INTEGER { + ok (1), + nearEnd (2), + exceeded (3), + unknown (4) + } + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The status of the Power Module lifetime information. + ok(1) indicates the device lifetime status is OK. + nearEnd(2) indicates the device lifetime status is near end. + exceeded(3) indicates the device lifetime status is exceeded. + unknown(4) indicates the device lifetime status is unknown." + + ::= { upsDiagPMLifetimeInfoEntry 2 } + +upsDiagPMEstmtdLifetimeRmng OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Displays the time remaining for the module before it should be replaced. + Measured in months. This value is set when you originally install the module." + ::= { upsDiagPMLifetimeInfoEntry 3 } + +upsDiagPMEstmtdLifetimeRmngPct OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Displays the percentage of the total lifetime remaining for the module + before it should be replaced." + ::= { upsDiagPMLifetimeInfoEntry 4 } + +upsDiagPMFanLifetimeStatus OBJECT-TYPE + SYNTAX INTEGER { + ok (1), + nearEnd (2), + exceeded (3), + unknown (4) + } + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The status of the Power Module Fan lifetime information. + ok(1) indicates the device lifetime status is OK. + nearEnd(2) indicates the device lifetime status is near end. + exceeded(3) indicates the device lifetime status is exceeded. + unknown(4) indicates the device lifetime status is unknown." + ::= { upsDiagPMLifetimeInfoEntry 5 } + +upsDiagPMFanEstmtdLifetimeRmng OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Displays the time remaining, measured in months, before the module's + fan should be replaced. It is reset by the field service engineer when + a new fan is installed." + ::= { upsDiagPMLifetimeInfoEntry 6 } + +upsDiagPMFanEstmtdLifetimeRmngPct OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Displays the percentage of the total lifetime remaining + before the module's fan should be replaced." + ::= { upsDiagPMLifetimeInfoEntry 7 } + +upsDiagPMEnclDoorFltrTableSize OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The maximum number of power module enclosures attached to the UPS." + ::= { upsDiagnosticPowerModules 4 } + +upsDiagPMEnclDoorFltrTable OBJECT-TYPE + SYNTAX SEQUENCE OF UpsDiagPMEnclDoorFltrEntry + ACCESS not-accessible + STATUS mandatory + DESCRIPTION + "Allows for the diagnostics of individual power module enclosure door filters. + The number of entries is contained in the upsDiagPMEnclDoorFltrTableSize OID." + ::= { upsDiagnosticPowerModules 5 } + +upsDiagPMEnclDoorFltrEntry OBJECT-TYPE + SYNTAX UpsDiagPMEnclDoorFltrEntry + ACCESS not-accessible + STATUS mandatory + DESCRIPTION + "Power module door filter diagnostics info." + INDEX { upsDiagPMEnclIndex} + ::= { upsDiagPMEnclDoorFltrTable 1 } + +UpsDiagPMEnclDoorFltrEntry ::= + SEQUENCE { + upsDiagPMEnclIndex INTEGER, + upsDiagPMEnclDoorFltrLifetime INTEGER, + upsDiagPMEnclDoorFltrStatus INTEGER, + upsDiagPMEnclDoorFltrEstmtdLifetimeRmng INTEGER, + upsDiagPMEnclDoorFltrEstmtdLifetimeRmngPct INTEGER + } +upsDiagPMEnclIndex OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The index to the power module enclosure entry. + Enclosure 0 indicates the Power enclosure 1. + Enclosure 1 indicates the Power enclosure 2." + ::= { upsDiagPMEnclDoorFltrEntry 1 } + +upsDiagPMEnclDoorFltrLifetime OBJECT-TYPE + SYNTAX INTEGER { + heavyFiltration15days (1), + normalFiltration30days(2), + lightFiltration60days (3), + notPresent (4) + } + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Door filter replacement time interval, based on the installation enivironment. + heavyFiltration15days (1) indicates door filter needs to be replaced within 15 days. + normalFiltration30days (2) indicates door filter needs to be replaced within 30 days. + lightFiltration60days (3) indicates door filter needs to be replaced within 60 days. + notPresent(4) indicates that the door filter is not present." + ::= { upsDiagPMEnclDoorFltrEntry 2 } + +upsDiagPMEnclDoorFltrStatus OBJECT-TYPE + SYNTAX INTEGER { + ok (1), + nearEnd (2), + exceeded (3), + unknown (4) + } + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Indicates the current status of the door filter. + ok(1) indicates the device lifetime status is OK. + nearEnd(2) indicates the device lifetime status is near end. + exceeded(3) indicates the device lifetime status is exceeded. + unknown(4) indicates the device lifetime status is unknown." + ::= { upsDiagPMEnclDoorFltrEntry 3 } + +upsDiagPMEnclDoorFltrEstmtdLifetimeRmng OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Displays the time remaining, measured in days, before the module door filter should be replaced. + This value is set when you originally install the module." + ::= { upsDiagPMEnclDoorFltrEntry 4 } + +upsDiagPMEnclDoorFltrEstmtdLifetimeRmngPct OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Displays the percentage of the total lifetime remaining for the module + door filter before it should be replaced." + ::= { upsDiagPMEnclDoorFltrEntry 5 } + + + -- the upsDiagnosticBatteries group upsDiagBatteryTableSize OBJECT-TYPE @@ -15455,7 +15708,6 @@ upsDiagSubFeedBreakerTableSize OBJECT-TYPE "The number of subfeed breakers attached to the UPS." ::= { upsDiagSwitchGear 8 } - upsDiagSubFeedBreakerTable OBJECT-TYPE SYNTAX SEQUENCE OF UpsDiagSubFeedBreakerEntry ACCESS not-accessible @@ -15486,8 +15738,9 @@ upsDiagSubFeedBreakerTable OBJECT-TYPE subfeedBreakerUpperAcceptPowerCritical INTEGER, subfeedBreakerStatus - INTEGER - + INTEGER, + subfeedBreakerName + DisplayString } subfeedBreakerIndex OBJECT-TYPE @@ -15554,8 +15807,17 @@ upsDiagSubFeedBreakerTable OBJECT-TYPE notInstalled(2) indicates the circuit breaker is not installed. opened(3) indicates the circuit breaker is opened. closed(4) indicates the circuit breaker is closed." - ::= { upsDiagSubFeedBreakerEntry 6 } - + ::= { upsDiagSubFeedBreakerEntry 6 } + + subfeedBreakerName OBJECT-TYPE + SYNTAX DisplayString + ACCESS read-write + STATUS mandatory + DESCRIPTION + "The name of the subfeed breaker." + ::= { upsDiagSubFeedBreakerEntry 7} + + upsDiagSwitchGearInstallationLoadPct OBJECT-TYPE SYNTAX INTEGER ACCESS read-only @@ -15586,8 +15848,8 @@ upsDiagSwitchGearInstallationLoadPct OBJECT-TYPE UPSDiagSubFeedPhaseEntry ::= SEQUENCE { upsDiagSubFeedBreakerIndex INTEGER, upsDiagSubFeedPhaseIndex INTEGER, - upsDiagSubFeedPhaseCurrent INTEGER - + upsDiagSubFeedPhaseCurrent INTEGER, + upsDiagSubFeedPhaseCurrentAlternate INTEGER } upsDiagSubFeedBreakerIndex OBJECT-TYPE @@ -15613,7 +15875,14 @@ upsDiagSwitchGearInstallationLoadPct OBJECT-TYPE DESCRIPTION "The subfeed phase current in Amps." ::= { upsDiagSubFeedPhaseEntry 3 } - + + upsDiagSubFeedPhaseCurrentAlternate OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The subfeed phase current in tenths of Amps." + ::= { upsDiagSubFeedPhaseEntry 4 } upsDiagSwitchgearSerialNumber OBJECT-TYPE @@ -16270,7 +16539,7 @@ upsParallelSysName OBJECT-TYPE STATUS mandatory DESCRIPTION "An ID string for the group of UPS units in the same parallel system. - Some products do not allow write operations for this OID." + Some products do not allow write operations for this OID." ::= { upsParallelSystem 15 } @@ -16573,6 +16842,112 @@ upsIntegratedATSLineStabilityDelay OBJECT-TYPE Specified in seconds." ::= { upsIntegratedATSSourceEntry 5 } +-- the upsDCOutput group + +upsDCOutputStatus OBJECT IDENTIFIER ::= { upsDCOutput 1 } + +upsDCOutputStatusTableSize OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The number of DC outputs on the UPS." + ::= { upsDCOutputStatus 1 } + +upsDCOutputStatusTable OBJECT-TYPE + SYNTAX SEQUENCE OF UpsDCOutputStatusEntry + ACCESS not-accessible + STATUS mandatory + DESCRIPTION + "Provides status information on UPS DC outputs. + The number of entries is contained in the upsDCOutputStatusTableSize OID." + ::= { upsDCOutputStatus 2 } + +upsDCOutputStatusEntry OBJECT-TYPE + SYNTAX UpsDCOutputStatusEntry + ACCESS not-accessible + STATUS mandatory + DESCRIPTION + "The DC output." + INDEX { upsDCOutputStatusTableIndex} + ::= { upsDCOutputStatusTable 1 } + +UpsDCOutputStatusEntry ::= + SEQUENCE { + upsDCOutputStatusTableIndex INTEGER, + upsDCOutputStatusVoltageNominal INTEGER, + upsDCOutputStatusCurrentRating INTEGER, + upsDCOutputStatusVoltage INTEGER, + upsDCOutputStatusCurrent INTEGER, + upsDCOutputStatusAbnormalConditions DisplayString + } + +upsDCOutputStatusTableIndex OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The index to the DC output status entry." + ::= { upsDCOutputStatusEntry 1 } + +upsDCOutputStatusVoltageNominal OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The desired voltage for this output in tenths of VDC. + When the output is on and there are no fault conditions, + the actual voltage should be near the nominal." + ::= { upsDCOutputStatusEntry 2 } + +upsDCOutputStatusCurrentRating OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The amount of current this output is able to supply in + tenths of amperes." + ::= { upsDCOutputStatusEntry 3 } + +upsDCOutputStatusVoltage OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The voltage measured on this output in tenths of VDC." + ::= { upsDCOutputStatusEntry 4 } + +upsDCOutputStatusCurrent OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The current drawn by the load measured on this output + in tenths of amperes." + ::= { upsDCOutputStatusEntry 5 } + +upsDCOutputStatusAbnormalConditions OBJECT-TYPE + SYNTAX DisplayString + ACCESS read-only + STATUS mandatory + DESCRIPTION + "An ASCII string containing flags representing active + output faults. If the Network Card is unable to determine + the state of the UPS, this variable is set to 'UNKNOWN'. + + The flags are numbered 1 onward, read from left to + right. The flags are defined as follows starting from 1: + + Flag 1: Output Overload + Flag 2: Output Short Circuit + Flag 3: Output Over Voltage + Flag 6: Backfeed Relay Fault + Flag 10: Bypass Relay Fault + Flag 19: Output Fault (over or undervoltage) + Flag 20: Bus Converter Fault + Flag 21: Sensor Fault" + ::= { upsDCOutputStatusEntry 6 } + -- the serialPort2Config group serialPort2Mode OBJECT-TYPE @@ -21127,7 +21502,9 @@ RPDU2DeviceConfigEntry ::= rPDU2DeviceConfigDevicePeakPowerReset INTEGER, rPDU2DeviceConfigDeviceEnergyReset INTEGER, rPDU2DeviceConfigOutletsEnergyReset INTEGER, - rPDU2DeviceConfigOutletsPeakLoadReset INTEGER + rPDU2DeviceConfigOutletsPeakLoadReset INTEGER, + rPDU2DeviceConfigContact DisplayString + } rPDU2DeviceConfigIndex OBJECT-TYPE @@ -21292,6 +21669,15 @@ rPDU2DeviceConfigOutletsPeakLoadReset OBJECT-TYPE in these models will fail." ::= { rPDU2DeviceConfigEntry 13 } +rPDU2DeviceConfigContact OBJECT-TYPE + SYNTAX DisplayString + ACCESS read-write + STATUS mandatory + DESCRIPTION + "A user-defined string identifying the + person to contact regarding the Rack PDU" + ::= { rPDU2DeviceConfigEntry 14 } + -- rPDU2 Device Properties rPDU2DevicePropertiesTable OBJECT-TYPE @@ -43033,11 +43419,11 @@ airIRRCGroupSetpointsFanSpeedControl OBJECT-TYPE airIRRCGroupSetpointsActiveFlowControlBias OBJECT-TYPE SYNTAX INTEGER { - positive (1), - slightlyPositive (2), - zero (3), + positive (1), + slightlyPositive (2), + zero (3), slightlyNegative (4), - negative (5) + negative (5) } ACCESS read-write STATUS mandatory @@ -43554,6 +43940,41 @@ airIRRCUnitRunHoursCondensatePump OBJECT-TYPE "Unit condensate pump run hours." ::= { airIRRCUnitRunHours 12 } +airIRRCUnitRunHoursFanPowerSupplyFeedALeft OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Unit fan, DC power feed A, left power supply run hours. + This is only valid for a DC input unit." + ::= { airIRRCUnitRunHours 13 } + +airIRRCUnitRunHoursFanPowerSupplyFeedARight OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Unit fan, DC power feed A, right power supply run hours. + This is only valid for a DC input unit." + ::= { airIRRCUnitRunHours 14 } + +airIRRCUnitRunHoursFanPowerSupplyFeedBLeft OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Unit fan, DC power feed B, left power supply run hours. + This is only valid for a DC input unit." + ::= { airIRRCUnitRunHours 15 } + +airIRRCUnitRunHoursFanPowerSupplyFeedBRight OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Unit fan, DC power feed B, right power supply run hours. + This is only valid for a DC input unit." + ::= { airIRRCUnitRunHours 16 } -- airIRRC AIR CONDITIONER UNIT Service Intervals @@ -46831,6 +47252,16 @@ airIRSCUnitStatusCompressor OBJECT-TYPE "The state (off/on) of the compressor." ::= { airIRSCUnitStatus 32 } +airIRSCUnitStatusLeakSensor OBJECT-TYPE + SYNTAX INTEGER { + no-leak (1), + leak (2) + } + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The state (no-leak/leak) of the leak sensor." + ::= { airIRSCUnitStatus 33 } -- airIRSC AIR CONDITIONER UNIT Ident @@ -47335,6 +47766,20 @@ airIRSCGroupStatusMinReturnAirTempMetric OBJECT-TYPE degrees Celsius." ::= { airIRSCGroupStatus 12 } +airIRSCGroupStatusActiveFlowControlStatus OBJECT-TYPE + SYNTAX INTEGER { + under (1), + okay (2), + over (3), + notApplicable (4) + } + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Status of the active flow control + system." + ::= { airIRSCGroupStatus 13 } + -- airIRSC AIR CONDITIONER GROUP Setpoint @@ -47400,6 +47845,19 @@ airIRSCGroupSetptsSupplyAirSetpointMetric OBJECT-TYPE degrees Celsius." ::= { airIRSCGroupSetpoints 7 } +airIRSCGroupSetpointsActiveFlowControlBias OBJECT-TYPE + SYNTAX INTEGER { + positive (1), + slightlyPositive (2), + zero (3), + slightlyNegative (4), + negative (5) + } + ACCESS read-write + STATUS mandatory + DESCRIPTION + "The active flow control bias setting." + ::= { airIRSCGroupSetpoints 8 } -- airIRSC AIR CONDITIONER GROUP Config @@ -47451,6 +47909,26 @@ airIRSCGroupConfigFanSpeedControl OBJECT-TYPE "The group fan speed control." ::= { airIRSCGroupConfig 6 } +airIRSCGroupConfigNumberOfActiveFlowControllers OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-write + STATUS mandatory + DESCRIPTION + "The number of active flow controllers + present in the group." + ::= { airIRSCGroupConfig 7 } + +airIRSCGroupConfigActiveFlowControllerLampTest OBJECT-TYPE + SYNTAX INTEGER { + off (1), + on (2) + } + ACCESS read-write + STATUS mandatory + DESCRIPTION + "Turns off/on the active flow + controller lamp test." + ::= { airIRSCGroupConfig 8 } -- ****************************************************************** -- airIRG2 Ident @@ -47637,6 +48115,20 @@ airIRG2GroupStatusMinReturnAirTempMetric OBJECT-TYPE degrees Celsius." ::= { airIRG2GroupStatus 12 } +airIRG2GroupStatusActiveFlowControlStatus OBJECT-TYPE + SYNTAX INTEGER { + under (1), + okay (2), + over (3), + notApplicable (4) + } + ACCESS read-only + STATUS mandatory + DESCRIPTION + "Status of the active flow control + system." + ::= { airIRG2GroupStatus 13 } + -- ****************************************************************** -- airIRG2 GROUP Setpoint @@ -47710,6 +48202,19 @@ airIRG2GroupSetptsSupplyAirSetpointMetric OBJECT-TYPE degrees Celsius." ::= { airIRG2GroupSetpoints 7 } +airIRG2GroupSetpointsActiveFlowControlBias OBJECT-TYPE + SYNTAX INTEGER { + positive (1), + slightlyPositive (2), + zero (3), + slightlyNegative (4), + negative (5) + } + ACCESS read-write + STATUS mandatory + DESCRIPTION + "The active flow control bias setting." + ::= { airIRG2GroupSetpoints 8 } -- ****************************************************************** -- airIRG2 GROUP Config @@ -47727,7 +48232,8 @@ airIRG2GroupConfigConfigurationType OBJECT-TYPE racs (1), spot (2), in-row (3), - hacs (4) + hacs (4), + cacs (5) } ACCESS read-write STATUS mandatory @@ -47822,6 +48328,42 @@ airIRG2GroupConfigLoadAssistEnable OBJECT-TYPE "Enable or disable load assist feature." ::= { airIRG2GroupConfig 11 } +airIRG2GroupConfigNumberOfActiveFlowControllers OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-write + STATUS mandatory + DESCRIPTION + "The number of active flow controllers + present in the group." + ::= { airIRG2GroupConfig 12 } + +airIRG2GroupConfigActiveFlowControllerLampTest OBJECT-TYPE + SYNTAX INTEGER { + off (1), + on (2) + } + ACCESS read-write + STATUS mandatory + DESCRIPTION + "Turns off/on the active flow + controller lamp test." + ::= { airIRG2GroupConfig 13 } + +airIRG2GroupConfigAltitudeUS OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-write + STATUS mandatory + DESCRIPTION + "The group altitude of the units above sea level in feet." + ::= { airIRG2GroupConfig 14 } + +airIRG2GroupConfigAltitudeMetric OBJECT-TYPE + SYNTAX INTEGER + ACCESS read-write + STATUS mandatory + DESCRIPTION + "The group altitude of the units above sea level in meters." + ::= { airIRG2GroupConfig 15 } -- *************************************** -- airIRG2 Alarm Status @@ -48148,6 +48690,16 @@ airIRG2RDT2StatusHotGasBypassValvePos OBJECT-TYPE "The position of the hot gas bypass valve in hundredths of percent." ::= { airIRG2RDT2Status 29 } +airIRG2RDT2StatusLeakSensor OBJECT-TYPE + SYNTAX INTEGER { + no-leak (1), + leak (2) + } + ACCESS read-only + STATUS mandatory + DESCRIPTION + "The state (no-leak/leak) of the leak sensor." + ::= { airIRG2RDT2Status 30 } -- ****************************************************************** -- airIRG2RDT2 Runhours @@ -52651,15 +53203,15 @@ airIRG3IdentTableSize OBJECT-TYPE AirIRG3IdentEntry ::= SEQUENCE { airIRG3IdentIndex INTEGER, airIRG3IdentName DisplayString, - airIRG3IdentLocation DisplayString, - airIRG3IdentModelNumber DisplayString, - airIRG3IdentSerialNumber DisplayString, + airIRG3IdentLocation DisplayString, + airIRG3IdentModelNumber DisplayString, + airIRG3IdentSerialNumber DisplayString, airIRG3IdentFirmwareRevision DisplayString, airIRG3IdentHardwareRevision DisplayString, - airIRG3IdentManufactureDate DisplayString, - airIRG3IdentRDUSysOID OBJECT IDENTIFIER, - airIRG3IdentCMSysOID OBJECT IDENTIFIER, - airIRG3IdentGroupSysOID OBJECT IDENTIFIER + airIRG3IdentManufactureDate DisplayString, + airIRG3IdentRDUSysOID OBJECT IDENTIFIER, + airIRG3IdentCMSysOID OBJECT IDENTIFIER, + airIRG3IdentGroupSysOID OBJECT IDENTIFIER } airIRG3IdentTable OBJECT-TYPE @@ -52783,29 +53335,29 @@ airIRG3GroupTableSize OBJECT-TYPE AirIRG3GroupStatusEntry ::= SEQUENCE { - airIRG3GroupStatusIndex INTEGER, - airIRG3GroupStatusCoolOutput INTEGER, - airIRG3GroupStatusCoolDemand INTEGER, - airIRG3GroupStatusAirFlowUS INTEGER, - airIRG3GroupStatusAirFlowMetric INTEGER, - airIRG3GroupStatusMaxRackInletTempUS INTEGER, - airIRG3GroupStatusMaxRackInletTempMetric INTEGER, - airIRG3GroupStatusMinRackInletTempUS INTEGER, - airIRG3GroupStatusMinRackInletTempMetric INTEGER, - airIRG3GroupStatusMaxReturnAirTempUS INTEGER, - airIRG3GroupStatusMaxReturnAirTempMetric INTEGER, - airIRG3GroupStatusMinReturnAirTempUS INTEGER, - airIRG3GroupStatusMinReturnAirTempMetric INTEGER, - airIRG3GroupStatusAvgSupplyTempUS INTEGER, - airIRG3GroupStatusAvgSupplyTempMetric INTEGER, - airIRG3GroupStatusAvgReturnTempUS INTEGER, - airIRG3GroupStatusAvgReturnTempMetric INTEGER, - airIRG3GroupStatusAvgFanSpeed INTEGER, - airIRG3GroupStatusAvgAirFlowUS INTEGER, - airIRG3GroupStatusAvgAirFlowMetric INTEGER, - airIRG3GroupStatusTotalAirFlowUS INTEGER, - airIRG3GroupStatusTotalAirFlowMetric INTEGER - } + airIRG3GroupStatusIndex INTEGER, + airIRG3GroupStatusCoolOutput INTEGER, + airIRG3GroupStatusCoolDemand INTEGER, + airIRG3GroupStatusAirFlowUS INTEGER, + airIRG3GroupStatusAirFlowMetric INTEGER, + airIRG3GroupStatusMaxRackInletTempUS INTEGER, + airIRG3GroupStatusMaxRackInletTempMetric INTEGER, + airIRG3GroupStatusMinRackInletTempUS INTEGER, + airIRG3GroupStatusMinRackInletTempMetric INTEGER, + airIRG3GroupStatusMaxReturnAirTempUS INTEGER, + airIRG3GroupStatusMaxReturnAirTempMetric INTEGER, + airIRG3GroupStatusMinReturnAirTempUS INTEGER, + airIRG3GroupStatusMinReturnAirTempMetric INTEGER, + airIRG3GroupStatusAvgSupplyTempUS INTEGER, + airIRG3GroupStatusAvgSupplyTempMetric INTEGER, + airIRG3GroupStatusAvgReturnTempUS INTEGER, + airIRG3GroupStatusAvgReturnTempMetric INTEGER, + airIRG3GroupStatusAvgFanSpeed INTEGER, + airIRG3GroupStatusAvgAirFlowUS INTEGER, + airIRG3GroupStatusAvgAirFlowMetric INTEGER, + airIRG3GroupStatusTotalAirFlowUS INTEGER, + airIRG3GroupStatusTotalAirFlowMetric INTEGER + } airIRG3GroupStatusTable OBJECT-TYPE SYNTAX SEQUENCE OF AirIRG3GroupStatusEntry @@ -53035,10 +53587,10 @@ AirIRG3GroupSetpointsEntry ::= SEQUENCE { airIRG3GroupSetpointsCoolDeadbandMetric INTEGER, airIRG3GroupSetpointsFanSpeedPreference INTEGER, airIRG3GroupSetpointsSupplyAirSetpointUS INTEGER, - airIRG3GroupSetpointsSupplyAirSetpointMetric INTEGER, - airIRG3GroupSetpointsAirFlowControl INTEGER, - airIRG3GroupSetpointsLightingOnTime INTEGER - } + airIRG3GroupSetpointsSupplyAirSetpointMetric INTEGER, + airIRG3GroupSetpointsAirFlowControl INTEGER, + airIRG3GroupSetpointsLightingOnTime INTEGER + } airIRG3GroupSetpointsTable OBJECT-TYPE SYNTAX SEQUENCE OF AirIRG3GroupSetpointsEntry @@ -53133,7 +53685,7 @@ airIRG3GroupSetpointsSupplyAirSetpointMetric OBJECT-TYPE degrees Celsius." ::= { airIRG3GroupSetpointsEntry 8 } -airIRG3GroupSetpointsAirFlowControl OBJECT-TYPE +airIRG3GroupSetpointsAirFlowControl OBJECT-TYPE SYNTAX INTEGER { automatic (1), manual (2) @@ -53165,12 +53717,12 @@ AirIRG3GroupConfigEntry ::= SEQUENCE { airIRG3GroupConfigFanSpeedControl INTEGER, airIRG3GroupConfigCoolGainP INTEGER, airIRG3GroupConfigCoolResetRateI INTEGER, - airIRG3GroupConfigCoolDerivativeD INTEGER, - airIRG3GroupConfigCoolPIDReset INTEGER, - airIRG3GroupConfigNumberofBackupUnits INTEGER, - airIRG3GroupConfigRuntimeBalancingEnable INTEGER, + airIRG3GroupConfigCoolDerivativeD INTEGER, + airIRG3GroupConfigCoolPIDReset INTEGER, + airIRG3GroupConfigNumberofBackupUnits INTEGER, + airIRG3GroupConfigRuntimeBalancingEnable INTEGER, airIRG3GroupConfigLoadAssistEnable INTEGER - } + } airIRG3GroupConfigTable OBJECT-TYPE SYNTAX SEQUENCE OF AirIRG3GroupConfigEntry @@ -53369,7 +53921,7 @@ airIRG3AlarmsDescription OBJECT-TYPE ::= { airIRG3AlarmsEntry 3 } -- *************************************** --- airIRG3 RDU Status +-- airIRG3 RDU Status -- *************************************** airIRG3RDUTableSize OBJECT-TYPE @@ -53384,48 +53936,48 @@ airIRG3RDUTableSize OBJECT-TYPE AirIRG3RDUStatusEntry ::= SEQUENCE { airIRG3RDUStatusDeviceIndex INTEGER, airIRG3RDUID DisplayString, - airIRG3RDUStatusOnReadyStandby INTEGER, - airIRG3RDUStatusOperatingMode INTEGER, - airIRG3RDUStatusLeadPump INTEGER, - airIRG3RDUStatusStartupDelay INTEGER, + airIRG3RDUStatusOnReadyStandby INTEGER, + airIRG3RDUStatusOperatingMode INTEGER, + airIRG3RDUStatusLeadPump INTEGER, + airIRG3RDUStatusStartupDelay INTEGER, airIRG3RDUStatusPumpChangeOverInterval INTEGER, - airIRG3RDUStatusStopOnLeakDetect INTEGER, - airIRG3RDUStatusPowerSource INTEGER, - airIRG3RDUStatusTotalRDUOutputPower INTEGER, - airIRG3RDUStatusInletWaterTempUS INTEGER, - airIRG3RDUStatusInletWaterTempMetric INTEGER, - airIRG3RDUStatusOutletWaterTempUS INTEGER, - airIRG3RDUStatusOutletWaterTempMetric INTEGER, - airIRG3RDUStatusCondenserSaturationTempUS INTEGER, - airIRG3RDUStatusCondenserSaturationTempMetric INTEGER, - airIRG3RDUStatusDewPointTempUS INTEGER, - airIRG3RDUStatusDewPointTempMetric INTEGER, - airIRG3RDUStatusPumpOutletTempUS INTEGER, - airIRG3RDUStatusPumpOutletTempMetric INTEGER, - airIRG3RDUStatusSubcoolerOutletTempUS INTEGER, - airIRG3RDUStatusSubcoolerOutletTempMetric INTEGER, - airIRG3RDUStatusCondenserOutletTempUS INTEGER, - airIRG3RDUStatusCondenserOutletTempMetric INTEGER, - airIRG3RDUStatusCondenserInletTempUS INTEGER, - airIRG3RDUStatusCondenserInletTempMetric INTEGER, - airIRG3RDUStatusCondenserOutletPressureUS INTEGER, - airIRG3RDUStatusCondenserOutletPressureMetric INTEGER, - airIRG3RDUStatusPump1HeadPressureUS INTEGER, - airIRG3RDUStatusPump1HeadPressureMetric INTEGER, - airIRG3RDUStatusPump2HeadPressureUS INTEGER, - airIRG3RDUStatusPump2HeadPressureMetric INTEGER, - airIRG3RDUStatusPump1Speed INTEGER, - airIRG3RDUStatusPump2Speed INTEGER, - airIRG3RDUStatusCWValvePosition INTEGER, - airIRG3RDUStatusReceiverLiquidLevel INTEGER, - airIRG3RDUStatusDCPowerSupply1Current INTEGER, - airIRG3RDUStatusDCPowerSupply2Current INTEGER, - airIRG3RDUStatusTotalDCPowerSupplyCurrent INTEGER, + airIRG3RDUStatusStopOnLeakDetect INTEGER, + airIRG3RDUStatusPowerSource INTEGER, + airIRG3RDUStatusTotalRDUOutputPower INTEGER, + airIRG3RDUStatusInletWaterTempUS INTEGER, + airIRG3RDUStatusInletWaterTempMetric INTEGER, + airIRG3RDUStatusOutletWaterTempUS INTEGER, + airIRG3RDUStatusOutletWaterTempMetric INTEGER, + airIRG3RDUStatusCondenserSaturationTempUS INTEGER, + airIRG3RDUStatusCondenserSaturationTempMetric INTEGER, + airIRG3RDUStatusDewPointTempUS INTEGER, + airIRG3RDUStatusDewPointTempMetric INTEGER, + airIRG3RDUStatusPumpOutletTempUS INTEGER, + airIRG3RDUStatusPumpOutletTempMetric INTEGER, + airIRG3RDUStatusSubcoolerOutletTempUS INTEGER, + airIRG3RDUStatusSubcoolerOutletTempMetric INTEGER, + airIRG3RDUStatusCondenserOutletTempUS INTEGER, + airIRG3RDUStatusCondenserOutletTempMetric INTEGER, + airIRG3RDUStatusCondenserInletTempUS INTEGER, + airIRG3RDUStatusCondenserInletTempMetric INTEGER, + airIRG3RDUStatusCondenserOutletPressureUS INTEGER, + airIRG3RDUStatusCondenserOutletPressureMetric INTEGER, + airIRG3RDUStatusPump1HeadPressureUS INTEGER, + airIRG3RDUStatusPump1HeadPressureMetric INTEGER, + airIRG3RDUStatusPump2HeadPressureUS INTEGER, + airIRG3RDUStatusPump2HeadPressureMetric INTEGER, + airIRG3RDUStatusPump1Speed INTEGER, + airIRG3RDUStatusPump2Speed INTEGER, + airIRG3RDUStatusCWValvePosition INTEGER, + airIRG3RDUStatusReceiverLiquidLevel INTEGER, + airIRG3RDUStatusDCPowerSupply1Current INTEGER, + airIRG3RDUStatusDCPowerSupply2Current INTEGER, + airIRG3RDUStatusTotalDCPowerSupplyCurrent INTEGER, airIRG3RDUStatusInputState INTEGER, - airIRG3RDUStatusOutputState INTEGER, + airIRG3RDUStatusOutputState INTEGER, airIRG3RDUStatusByPassValvePosition INTEGER, - airIRG3RDUStatusRefrigerantLeakDetector INTEGER - } + airIRG3RDUStatusRefrigerantLeakDetector INTEGER + } airIRG3RDUStatusTable OBJECT-TYPE SYNTAX SEQUENCE OF AirIRG3RDUStatusEntry @@ -53873,17 +54425,17 @@ airIRG3RDUStatusRefrigerantLeakDetector OBJECT-TYPE -- *************************************** --- airIRG3 RDU Run Hours +-- airIRG3 RDU Run Hours -- *************************************** AirIRG3RDURunHoursEntry ::= SEQUENCE { - airIRG3RDURunHoursDeviceIndex INTEGER, + airIRG3RDURunHoursDeviceIndex INTEGER, airIRG3RDURunHoursRDUID DisplayString, - airIRG3RDURunHoursPump1 INTEGER, - airIRG3RDURunHoursPump2 INTEGER, - airIRG3RDURunHoursPowerSupply1 INTEGER, - airIRG3RDURunHoursPowerSupply2 INTEGER - } + airIRG3RDURunHoursPump1 INTEGER, + airIRG3RDURunHoursPump2 INTEGER, + airIRG3RDURunHoursPowerSupply1 INTEGER, + airIRG3RDURunHoursPowerSupply2 INTEGER + } airIRG3RDURunHoursTable OBJECT-TYPE SYNTAX SEQUENCE OF AirIRG3RDURunHoursEntry @@ -53953,15 +54505,15 @@ airIRG3RDURunHoursPowerSupply2 OBJECT-TYPE -- *************************************** --- airIRG3 RDU Service Intervals +-- airIRG3 RDU Service Intervals -- *************************************** AirIRG3RDUServiceIntervalsEntry ::= SEQUENCE { airIRG3RDUServiceIntervalsDeviceIndex INTEGER, airIRG3RDUServiceIntervalsRDUID DisplayString, - airIRG3RDUServiceIntervalsAirFilterInterval INTEGER, - airIRG3RDUServiceIntervalsAirFilterAlarm INTEGER - } + airIRG3RDUServiceIntervalsAirFilterInterval INTEGER, + airIRG3RDUServiceIntervalsAirFilterAlarm INTEGER + } airIRG3RDUServiceIntervalsTable OBJECT-TYPE SYNTAX SEQUENCE OF AirIRG3RDUServiceIntervalsEntry @@ -54022,7 +54574,7 @@ airIRG3RDUServiceIntervalsAirFilterAlarm OBJECT-TYPE -- ******************************************* --- airIRG3 RDU Thresholds +-- airIRG3 RDU Thresholds -- Currently there are no thresholds for RDU -- ******************************************* @@ -54031,7 +54583,7 @@ AirIRG3RDUThresholdsEntry ::= SEQUENCE { airIRG3RDUThresholdsRDUID DisplayString, airIRG3RDUThresholdsEnteringFluidTempHighUS INTEGER, airIRG3RDUThresholdsEnteringFluidTempHighMetric INTEGER - } + } airIRG3RDUThresholdsTable OBJECT-TYPE SYNTAX SEQUENCE OF AirIRG3RDUThresholdsEntry @@ -54088,12 +54640,12 @@ airIRG3RDUThresholdsEnteringFluidTempHighMetric OBJECT-TYPE -- *************************************** --- airIRG3 RDU Setpoints +-- airIRG3 RDU Setpoints -- *************************************** AirIRG3RDUSetpointsEntry ::= SEQUENCE { airIRG3RDUSetpointsDeviceIndex INTEGER - } + } airIRG3RDUSetpointsTable OBJECT-TYPE SYNTAX SEQUENCE OF AirIRG3RDUSetpointsEntry @@ -54123,24 +54675,24 @@ airIRG3RDUSetpointsDeviceIndex OBJECT-TYPE -- *************************************** --- airIRG3 RDU Config +-- airIRG3 RDU Config -- *************************************** AirIRG3RDUConfigEntry ::= SEQUENCE { - airIRG3RDUConfigDeviceIndex INTEGER, - airIRG3RDUConfigRDUID DisplayString, - airIRG3RDUConfigStopOnLeakDetect INTEGER, - airIRG3RDUConfigStartupDelay INTEGER, - airIRG3RDUConfigPumpChangeOverInterval INTEGER, - airIRG3RDUConfigPowerSource INTEGER, - airIRG3RDUConfigOutputSource INTEGER, - airIRG3RDUConfigInputNormalState INTEGER, - airIRG3RDUConfigOutputNormalState INTEGER, - airIRG3RDUConfigByPassValveEnabled INTEGER, - airIRG3RDUConfigRefrigerantLeakDetectorEnabled INTEGER, + airIRG3RDUConfigDeviceIndex INTEGER, + airIRG3RDUConfigRDUID DisplayString, + airIRG3RDUConfigStopOnLeakDetect INTEGER, + airIRG3RDUConfigStartupDelay INTEGER, + airIRG3RDUConfigPumpChangeOverInterval INTEGER, + airIRG3RDUConfigPowerSource INTEGER, + airIRG3RDUConfigOutputSource INTEGER, + airIRG3RDUConfigInputNormalState INTEGER, + airIRG3RDUConfigOutputNormalState INTEGER, + airIRG3RDUConfigByPassValveEnabled INTEGER, + airIRG3RDUConfigRefrigerantLeakDetectorEnabled INTEGER, airIRG3RDUConfigCalibrateRefrigerantLeakDetector INTEGER, - airIRG3RDUConfigOnReadyStandby INTEGER - } + airIRG3RDUConfigOnReadyStandby INTEGER + } airIRG3RDUConfigTable OBJECT-TYPE SYNTAX SEQUENCE OF AirIRG3RDUConfigEntry @@ -54303,7 +54855,7 @@ airIRG3RDUConfigOnReadyStandby OBJECT-TYPE -- *************************************** --- airIRG3 CMStatus +-- airIRG3 CMStatus -- *************************************** airIRG3CMTableSize OBJECT-TYPE @@ -54316,29 +54868,29 @@ airIRG3CMTableSize OBJECT-TYPE AirIRG3CMStatusEntry ::= SEQUENCE { - airIRG3CMStatusDeviceIndex INTEGER, + airIRG3CMStatusDeviceIndex INTEGER, airIRG3CMStatusCMID DisplayString, - airIRG3CMStatusOperatingMode INTEGER, - airIRG3CMStatusUnitType INTEGER, - airIRG3CMStatusRackInletTempUS INTEGER, - airIRG3CMStatusRackInletTempMetric INTEGER, - airIRG3CMStatusReturnAirTempUS INTEGER, - airIRG3CMStatusReturnAirTempMetric INTEGER, - airIRG3CMStatusLiquidTempUS INTEGER, - airIRG3CMStatusLiquidTempMetric INTEGER, - airIRG3CMStatusVaporTempUS INTEGER, - airIRG3CMStatusVaporTempMetric INTEGER, - airIRG3CMStatusEvaporatorTempUS INTEGER, - airIRG3CMStatusEvaporatorTempMetric INTEGER, - airIRG3CMStatusLiquidInletPressureUS INTEGER, - airIRG3CMStatusLiquidInletPressureMetric INTEGER, - airIRG3CMStatusVaporOutletPressureUS INTEGER, - airIRG3CMStatusVaporOutletPressureMetric INTEGER, - airIRG3CMStatusExpansionValvePosition INTEGER, - airIRG3CMStatusEPRValvePosition INTEGER, + airIRG3CMStatusOperatingMode INTEGER, + airIRG3CMStatusUnitType INTEGER, + airIRG3CMStatusRackInletTempUS INTEGER, + airIRG3CMStatusRackInletTempMetric INTEGER, + airIRG3CMStatusReturnAirTempUS INTEGER, + airIRG3CMStatusReturnAirTempMetric INTEGER, + airIRG3CMStatusLiquidTempUS INTEGER, + airIRG3CMStatusLiquidTempMetric INTEGER, + airIRG3CMStatusVaporTempUS INTEGER, + airIRG3CMStatusVaporTempMetric INTEGER, + airIRG3CMStatusEvaporatorTempUS INTEGER, + airIRG3CMStatusEvaporatorTempMetric INTEGER, + airIRG3CMStatusLiquidInletPressureUS INTEGER, + airIRG3CMStatusLiquidInletPressureMetric INTEGER, + airIRG3CMStatusVaporOutletPressureUS INTEGER, + airIRG3CMStatusVaporOutletPressureMetric INTEGER, + airIRG3CMStatusExpansionValvePosition INTEGER, + airIRG3CMStatusEPRValvePosition INTEGER, airIRG3CMStatusLocalDisplayOnOffEnabled INTEGER, airIRG3CMStatusAverageFanSpeed INTEGER - } + } airIRG3CMStatusTable OBJECT-TYPE SYNTAX SEQUENCE OF AirIRG3CMStatusEntry @@ -54571,19 +55123,19 @@ airIRG3CMStatusAverageFanSpeed OBJECT-TYPE -- *************************************** --- airIRG3 CM Run Hours +-- airIRG3 CM Run Hours -- *************************************** AirIRG3CMRunHoursEntry ::= SEQUENCE { - airIRG3CMRunHoursDeviceIndex INTEGER, + airIRG3CMRunHoursDeviceIndex INTEGER, airIRG3CMRunHoursCMID DisplayString, - airIRG3CMRunHoursFan1 INTEGER, - airIRG3CMRunHoursFan2 INTEGER, - airIRG3CMRunHoursFan3 INTEGER, - airIRG3CMRunHoursFan4 INTEGER, - airIRG3CMRunHoursFan5 INTEGER, - airIRG3CMRunHoursAirFilter INTEGER - } + airIRG3CMRunHoursFan1 INTEGER, + airIRG3CMRunHoursFan2 INTEGER, + airIRG3CMRunHoursFan3 INTEGER, + airIRG3CMRunHoursFan4 INTEGER, + airIRG3CMRunHoursFan5 INTEGER, + airIRG3CMRunHoursAirFilter INTEGER + } airIRG3CMRunHoursTable OBJECT-TYPE SYNTAX SEQUENCE OF AirIRG3CMRunHoursEntry @@ -54674,15 +55226,15 @@ airIRG3CMRunHoursAirFilter OBJECT-TYPE -- *************************************** --- airIRG3 CM Service Intervals +-- airIRG3 CM Service Intervals -- *************************************** AirIRG3CMServiceIntervalsEntry ::= SEQUENCE { airIRG3CMServiceIntervalsDeviceIndex INTEGER, airIRG3CMServiceIntervalsCMID DisplayString, - airIRG3CMServiceIntervalsAirFilterInterval INTEGER, - airIRG3CMServiceIntervalsAirFilterAlarm INTEGER - } + airIRG3CMServiceIntervalsAirFilterInterval INTEGER, + airIRG3CMServiceIntervalsAirFilterAlarm INTEGER + } airIRG3CMServiceIntervalsTable OBJECT-TYPE SYNTAX SEQUENCE OF AirIRG3CMServiceIntervalsEntry @@ -54740,19 +55292,19 @@ airIRG3CMServiceIntervalsAirFilterAlarm OBJECT-TYPE -- *************************************** --- airIRG3 CM Thresholds +-- airIRG3 CM Thresholds -- *************************************** AirIRG3CMThresholdsEntry ::= SEQUENCE { airIRG3CMThresholdsDeviceIndex INTEGER, airIRG3CMThresholdsCMID DisplayString, - airIRG3CMThresholdsRackInletTempHighUS INTEGER, - airIRG3CMThresholdsRackInletTempHighMetric INTEGER, - airIRG3CMThresholdsSupplyAirTempHighUS INTEGER, - airIRG3CMThresholdsSupplyAirTempHighMetric INTEGER, - airIRG3CMThresholdsReturnAirTempHighUS INTEGER, - airIRG3CMThresholdsReturnAirTempHighMetric INTEGER - } + airIRG3CMThresholdsRackInletTempHighUS INTEGER, + airIRG3CMThresholdsRackInletTempHighMetric INTEGER, + airIRG3CMThresholdsSupplyAirTempHighUS INTEGER, + airIRG3CMThresholdsSupplyAirTempHighMetric INTEGER, + airIRG3CMThresholdsReturnAirTempHighUS INTEGER, + airIRG3CMThresholdsReturnAirTempHighMetric INTEGER + } airIRG3CMThresholdsTable OBJECT-TYPE SYNTAX SEQUENCE OF AirIRG3CMThresholdsEntry @@ -54848,12 +55400,12 @@ airIRG3CMThresholdsReturnAirTempHighMetric OBJECT-TYPE -- *************************************** --- airIRG3 CM Setpoints +-- airIRG3 CM Setpoints -- *************************************** AirIRG3CMSetpointsEntry ::= SEQUENCE { airIRG3CMSetpointsDeviceIndex INTEGER - } + } airIRG3CMSetpointsTable OBJECT-TYPE SYNTAX SEQUENCE OF AirIRG3CMSetpointsEntry @@ -54883,17 +55435,17 @@ airIRG3CMSetpointsDeviceIndex OBJECT-TYPE -- *************************************** --- airIRG3 CM Config +-- airIRG3 CM Config -- *************************************** AirIRG3CMConfigEntry ::= SEQUENCE { - airIRG3CMConfigDeviceIndex INTEGER, + airIRG3CMConfigDeviceIndex INTEGER, airIRG3CMConfigCMID DisplayString, - airIRG3CMConfigStopOnCoolFail INTEGER, + airIRG3CMConfigStopOnCoolFail INTEGER, airIRG3CMConfigStartupDelay INTEGER, - airIRG3CMConfigRemoteOnStandby INTEGER, - airIRG3CMConfigPowerSource INTEGER - } + airIRG3CMConfigRemoteOnStandby INTEGER, + airIRG3CMConfigPowerSource INTEGER + } airIRG3CMConfigTable OBJECT-TYPE SYNTAX SEQUENCE OF AirIRG3CMConfigEntry @@ -71449,5 +72001,40 @@ upsOscillatorFailedCleared TRAP-TYPE --#STATE OPERATIONAL ::= 776 +upsOnBatteryDueToFault TRAP-TYPE + ENTERPRISE apc + VARIABLES { mtrapargsString } + DESCRIPTION + "SEVERE: The UPS is on battery due to an error. + + Symmetra UPSes: Intelligence module has reported being in self-test for + too long. When this happens, the UPS is not usually in self-test, but the + batteries are draining slowly. If left uncorrected, the batteries will + become depleted and the UPS will not be able to turn on. If UPS has at + least N+1 redundancy, check power modules one by one to determine which + keeps the UPS in self-test. Once identified, replace the module." + --#TYPE "APC UPS: The UPS is on battery due to an error." + --#SUMMARY "The UPS is on battery due to an error." + --#SEVERITY SEVERE + --#TIMEINDEX 1 + --#HELP "" + --#HELPTAG 0 + --#STATE DEGRADED + ::= 777 + +upsOnBatteryDueToFaultCleared TRAP-TYPE + ENTERPRISE apc + VARIABLES { mtrapargsString } + DESCRIPTION + "INFORMATIONAL: The UPS is no longer on battery due to an error." + --#TYPE "APC UPS: The UPS is no longer on battery due to an error." + --#SUMMARY "The UPS is no longer on battery due to an error." + --#SEVERITY INFORMATIONAL + --#TIMEINDEX 1 + --#HELP "" + --#HELPTAG 0 + --#STATE OPERATIONAL + ::= 778 + END diff --git a/sql-schema/112.sql b/sql-schema/112.sql new file mode 100644 index 0000000000..3556225abd --- /dev/null +++ b/sql-schema/112.sql @@ -0,0 +1,2 @@ +ALTER TABLE `services` ADD `service_ds` VARCHAR(255) NOT NULL COMMENT 'Data Sources available for this service'; +ALTER TABLE `services` DROP `service_checked`; diff --git a/tests/SyslogTest.php b/tests/SyslogTest.php index 5336a4494e..1d78ffeef3 100644 --- a/tests/SyslogTest.php +++ b/tests/SyslogTest.php @@ -101,6 +101,22 @@ class SyslogTest extends \PHPUnit_Framework_TestCase array('device_id'=>1, 'program'=>'RXSBIF_SEQ_NUM_ERROR', 'msg'=>'slot=x') ); + // With program from syslog + $this->checkSyslog( + "1.1.1.1||local7||notice||notice||bd||2016-04-04 15:18:43||Apr 4 13:18:42.670: %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/32, changed state to up||345735", + array('device_id'=>1, 'program'=>'%LINEPROTO-5-UPDOWN', 'msg'=>'Line protocol on Interface GigabitEthernet0/32, changed state to up') + ); + + // Incorrect time + $this->checkSyslog( + "1.1.1.1||user||info||info||0e||2016-04-06 15:20:35||*Apr 4 21:26:41.778 UTC: %LWAPP-3-REPLAY_ERR: 1 wcm: Received replay error on slot 1, WLAN ID 1, count 1 from AP xxxx.xxxx.xxxx||", + array('device_id'=>1, 'program'=>'%LWAPP-3-REPLAY_ERR', 'msg'=>'1 wcm: Received replay error on slot 1, WLAN ID 1, count 1 from AP xxxx.xxxx.xxxx') + ); + + $this->checkSyslog( + "1.1.1.1||user||info||info||0e||2016-04-06 15:20:35||.Apr 4 21:26:41.778 UTC: %LWAPP-3-REPLAY_ERR: 1 wcm: Received replay error on slot 1, WLAN ID 1, count 1 from AP xxxx.xxxx.xxxx||", + array('device_id'=>1, 'program'=>'%LWAPP-3-REPLAY_ERR', 'msg'=>'1 wcm: Received replay error on slot 1, WLAN ID 1, count 1 from AP xxxx.xxxx.xxxx') + ); } public function testLinuxSyslog() {