change from poller_module to include from os polling

This commit is contained in:
Adam Winberg
2016-04-19 13:58:38 +02:00
parent 3de317b7a8
commit 5871681015
5 changed files with 10 additions and 25 deletions

View File

@@ -13,7 +13,7 @@ require 'includes/graphs/common.inc.php';
$rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/cisco-wwan-mnc.rrd'; $rrdfilename = $config['rrd_dir'].'/'.$device['hostname'].'/cisco-wwan-mnc.rrd';
if (file_exists($rrdfilename)) { if (file_exists($rrdfilename)) {
$rrd_options .= ' DEF:mnc='.$rrdfilename.':mnc:LAST '; $rrd_options .= ' DEF:mnc='.$rrdfilename.':mnc:LAST ';
$rrd_options .= ' -l -r'; $rrd_options .= ' --lower-limit 0 '
$rrd_options .= " --vertical-label='MNC'"; $rrd_options .= " --vertical-label='MNC'";
$rrd_options .= " LINE2:mnc#750F7DFF:'MNC Mobile Netwok Code'"; $rrd_options .= " LINE2:mnc#750F7DFF:'MNC Mobile Netwok Code'";
$rrd_options .= ' GPRINT:mnc:LAST:%0.2lf%s\\\l '; $rrd_options .= ' GPRINT:mnc:LAST:%0.2lf%s\\\l ';

View File

@@ -716,7 +716,6 @@ $config['poller_modules']['cisco-cbqos'] = 1;
$config['poller_modules']['stp'] = 1; $config['poller_modules']['stp'] = 1;
$config['poller_modules']['cisco-otv'] = 1; $config['poller_modules']['cisco-otv'] = 1;
$config['poller_modules']['services'] = 1; $config['poller_modules']['services'] = 1;
$config['poller_modules']['cisco-wwan'] = 1;
// List of discovery modules. Need to be in this array to be // List of discovery modules. Need to be in this array to be
// considered for execution. // considered for execution.

View File

@@ -1,21 +0,0 @@
<?php
/*
* LibreNMS
*
* 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 ($device['os_group'] == "cisco") {
/*
* Cisco WWAN
* This module graphs the MNC and RSSI values for a Cisco Wireless
* WAN router
*/
include 'wireless/cisco-wwan.inc.php';
}

View File

@@ -41,3 +41,9 @@ if (empty($hardware)) {
// if(isset($cisco_hardware_oids[$poll_device['sysObjectID']])) { $hardware = $cisco_hardware_oids[$poll_device['sysObjectID']]; } // if(isset($cisco_hardware_oids[$poll_device['sysObjectID']])) { $hardware = $cisco_hardware_oids[$poll_device['sysObjectID']]; }
$serial = get_main_serial($device); $serial = get_main_serial($device);
if (strstr($hardware, 'cisco819')) {
include 'includes/polling/wireless/cisco-wwan.inc.php';
}

View File

@@ -10,7 +10,7 @@
*/ */
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cisco-wwan-rssi.rrd"; $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cisco-wwan-rssi.rrd";
$rssi = snmp_get($device, "1.3.6.1.4.1.9.9.661.1.3.4.1.1.1.13", "-Ovqn", ""); $rssi = snmp_get($device, "CISCO-WAN-3G-MIB::c3gCurrentGsmRssi.13", "-Ovqn", "CISCO-WAN-3G-MIB");
if (is_numeric($rssi)) { if (is_numeric($rssi)) {
if (!is_file($rrd_filename)) { if (!is_file($rrd_filename)) {
@@ -26,7 +26,7 @@ if (is_numeric($rssi)) {
$rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cisco-wwan-mnc.rrd"; $rrd_filename = $config['rrd_dir'] . "/" . $device['hostname'] . "/cisco-wwan-mnc.rrd";
$mnc = snmp_get($device, "1.3.6.1.4.1.9.9.661.1.3.2.1.11.13", "-Ovqn", ""); $mnc = snmp_get($device, "CISCO-WAN-3G-MIB::c3gGsmMnc.13", "-Ovqn", "CISCO-WAN-3G-MIB");
if (is_numeric($mnc)) { if (is_numeric($mnc)) {
if (!is_file($rrd_filename)) { if (!is_file($rrd_filename)) {
rrdtool_create($rrd_filename, " --step 300 DS:mnc:GAUGE:600:0:U".$config['rrd_rra']); rrdtool_create($rrd_filename, " --step 300 DS:mnc:GAUGE:600:0:U".$config['rrd_rra']);
@@ -38,3 +38,4 @@ if (is_numeric($mnc)) {
$graphs['cisco_wwan_mnc'] = TRUE; $graphs['cisco_wwan_mnc'] = TRUE;
unset($rrd_filename,$mnc); unset($rrd_filename,$mnc);
} }