mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 10:28:13 +00:00
Remove legacy code and fix missing device graphs (#11950)
* removing $graphs global * remove unused things * fix some additional graphs * Fix graphs persisting too soon * correct name for poller module performance graph * only one type of graph is used here
This commit is contained in:
parent
2fc037ab23
commit
020c5fd7e1
@ -26,6 +26,7 @@
|
||||
namespace LibreNMS;
|
||||
|
||||
use App\Models\Device;
|
||||
use App\Models\DeviceGraph;
|
||||
use DeviceCache;
|
||||
use Illuminate\Support\Str;
|
||||
use LibreNMS\Device\WirelessSensor;
|
||||
@ -45,16 +46,18 @@ class OS implements ProcessorDiscovery
|
||||
}
|
||||
|
||||
private $device; // annoying use of references to make sure this is in sync with global $device variable
|
||||
private $graphs; // stores device graphs
|
||||
private $cache; // data cache
|
||||
private $pre_cache; // pre-fetch data cache
|
||||
|
||||
/**
|
||||
* OS constructor. Not allowed to be created directly. Use OS::make()
|
||||
* @param $device
|
||||
* @param array $device
|
||||
*/
|
||||
private function __construct(&$device)
|
||||
{
|
||||
$this->device = &$device;
|
||||
$this->graphs = [];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -87,6 +90,29 @@ class OS implements ProcessorDiscovery
|
||||
return DeviceCache::get($this->getDeviceId());
|
||||
}
|
||||
|
||||
/**
|
||||
* Enable a graph for this device
|
||||
*
|
||||
* @param string $name
|
||||
*/
|
||||
public function enableGraph($name)
|
||||
{
|
||||
$this->graphs[$name] = true;
|
||||
}
|
||||
|
||||
public function persistGraphs()
|
||||
{
|
||||
$device = $this->getDeviceModel();
|
||||
$graphs = collect(array_keys($this->graphs));
|
||||
|
||||
// delete extra graphs
|
||||
$device->graphs->keyBy('graph')->collect()->except($graphs)->each->delete();
|
||||
// create missing graphs
|
||||
$device->graphs()->saveMany($graphs->diff($device->graphs->pluck('graph'))->map(function ($graph) {
|
||||
return new DeviceGraph(['graph' => $graph]);
|
||||
}));
|
||||
}
|
||||
|
||||
public function preCache()
|
||||
{
|
||||
if (is_null($this->pre_cache)) {
|
||||
|
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class RemoveMibPollingTables extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::drop('device_mibs');
|
||||
Schema::drop('device_oids');
|
||||
Schema::drop('mibdefs');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::create('device_mibs', function (Blueprint $table) {
|
||||
$table->unsignedInteger('device_id');
|
||||
$table->string('module');
|
||||
$table->string('mib');
|
||||
$table->string('included_by');
|
||||
if (\LibreNMS\DB\Eloquent::getDriver() == 'mysql') {
|
||||
$table->timestamp('last_modified')->default(DB::raw('CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP'));
|
||||
} else {
|
||||
$table->timestamp('last_modified')->useCurrent();
|
||||
}
|
||||
$table->primary(['device_id','module','mib']);
|
||||
});
|
||||
Schema::create('device_oids', function (Blueprint $table) {
|
||||
$table->unsignedInteger('device_id');
|
||||
$table->string('oid');
|
||||
$table->string('module');
|
||||
$table->string('mib');
|
||||
$table->string('object_type');
|
||||
$table->string('value')->nullable();
|
||||
$table->bigInteger('numvalue')->nullable();
|
||||
if (\LibreNMS\DB\Eloquent::getDriver() == 'mysql') {
|
||||
$table->timestamp('last_modified')->default(DB::raw('CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP'));
|
||||
} else {
|
||||
$table->timestamp('last_modified')->useCurrent();
|
||||
}
|
||||
$table->primary(['device_id','oid']);
|
||||
});
|
||||
Schema::create('mibdefs', function (Blueprint $table) {
|
||||
$table->string('module');
|
||||
$table->string('mib');
|
||||
$table->string('object_type');
|
||||
$table->string('oid');
|
||||
$table->string('syntax');
|
||||
$table->string('description')->nullable();
|
||||
$table->string('max_access')->nullable();
|
||||
$table->string('status')->nullable();
|
||||
$table->string('included_by');
|
||||
if (\LibreNMS\DB\Eloquent::getDriver() == 'mysql') {
|
||||
$table->timestamp('last_modified')->default(DB::raw('CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP'));
|
||||
} else {
|
||||
$table->timestamp('last_modified')->useCurrent();
|
||||
}
|
||||
$table->primary(['module','mib','object_type']);
|
||||
});
|
||||
}
|
||||
}
|
@ -43,7 +43,7 @@ if (is_numeric($users)) {
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pulse_users', $tags, $fields);
|
||||
$graphs['pulse_users'] = true;
|
||||
$os->enableGraph('pulse_users');
|
||||
}
|
||||
|
||||
$sessions = snmp_get($device, 'iveConcurrentUsers.0', '-OQv', 'PULSESECURE-PSG-MIB');
|
||||
@ -57,7 +57,7 @@ if (is_numeric($sessions)) {
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pulse_sessions', $tags, $fields);
|
||||
$graphs['pulse_sessions'] = true;
|
||||
$os->enableGraph('pulse_sessions');
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -1,193 +0,0 @@
|
||||
source: Extensions/MIB-based-polling.md
|
||||
path: blob/master/doc/
|
||||
|
||||
# WARNING
|
||||
|
||||
MIB-based polling is unmaintained and may be removed in the future.
|
||||
It might overload your LibreNMS server,
|
||||
destroy your data, set your routers on fire, and kick your cat. It has been
|
||||
tested against a very limited set of devices (namely Ruckus ZD1000 wireless
|
||||
controllers, and `net-snmp` on Linux). It may fail badly on other hardware.
|
||||
|
||||
The approach taken is fairly simplistic and I claim no special expertise in
|
||||
understanding MIBs. Most of my knowledge of SNMP comes from reading net-snmp
|
||||
man pages, and reverse engineering the output of snmptranslate and snmpwalk
|
||||
and trying to make devices work with LibreNMS. I may have made false
|
||||
assumptions and probably use wrong terminology in many places. Feel free to
|
||||
offer corrections/suggestions via pull requests or email.
|
||||
|
||||
Paul Gear <paul@librenms.org>
|
||||
|
||||
# Overview
|
||||
|
||||
This is the 2nd experimental release of MIB polling. If you used the 1st
|
||||
release, you MUST perform a data conversion of the MIB-based polling files
|
||||
using the script `contrib/convert-mib-graphs.sh`. Failure to do so will
|
||||
result in your data collection silently stopping.
|
||||
|
||||
MIB-based polling is disabled by default; you must set
|
||||
`$config['poller_modules']['mib'] = true;`
|
||||
in `config.php` to enable it.
|
||||
|
||||
# Preparation
|
||||
|
||||
MIB-based polling results in the creation of a separate RRD file for each
|
||||
device-MIB-OID-index combination encountered by LibreNMS. Thus it can cause
|
||||
your disk space requirements to grow enormously and rapidly. As an example,
|
||||
enabling MIB-based polling on my test Ruckus ZD1000 wireless controller with
|
||||
one (1) AP and one (1) user on that AP resulted in a 5 MB increase in RRD
|
||||
space usage for that device. Each RRD file is around 125 KB in size (on
|
||||
x64-64 systems) and is pre-allocated, so after the first discovery and poller
|
||||
run of each device with MIB-based polling enabled, disk space should be stable.
|
||||
However, monitoring disk usage is your responsibility. (The good news: you
|
||||
can do this with LibreNMS. :-)
|
||||
|
||||
Unless you are running LibreNMS on a powerful system with pure SSD for RRD
|
||||
storage, it is strongly recommended that you enable rrdcached and ensure it is
|
||||
working *before* enabling MIB-based polling.
|
||||
|
||||
# Components
|
||||
|
||||
The components involved in MIB-based polling are:
|
||||
|
||||
## Discovery
|
||||
|
||||
- OS discovery determines whether there are MIBs which should be polled. If
|
||||
so, they are registered in the `device_mibs` association table as relevant
|
||||
to that device. MIB associations for each device can be viewed at:
|
||||
<http://your.librenms.server/device/device=XXXX/tab=mib/>
|
||||
All MIBs used by MIB-based polling may be viewed at:
|
||||
<http://your.librenms.server/mibs/>
|
||||
All device associations created by MIB-based polling may be viewed at:
|
||||
<http://your.librenms.server/mib_assoc/> (Devices -> MIB associations)
|
||||
|
||||
- In addition, all devices are checked for a MIB matching their sysObjectID.
|
||||
If there is a matching MIB available, it is automatically included.
|
||||
The sysObjectID for each device is now displayed on the overview page:
|
||||
<http://your.librenms.server/device/device=XXXX/>
|
||||
|
||||
- Note that the above means that no MIB-based polling will occur until the
|
||||
devices in question are rediscovered. If you want to begin MIB-based
|
||||
polling immediately, you must force rediscovery from the web UI, or run it
|
||||
from the CLI using `./discovery.php -h HOSTNAME`
|
||||
|
||||
- During discovery, relevant MIBs are parsed using `snmptranslate`, and the
|
||||
data returned is used to populate a database which guides the poller in
|
||||
what to store. At the moment, only OIDs of INTEGER, Integer32, Gauge32,
|
||||
Unsigned32, Counter32, and Counter64 data types are parsed, and negative
|
||||
values are untested.
|
||||
|
||||
- Devices may be excluded from MIB polling by changing the setting in the
|
||||
device edit screen:
|
||||
<http://your.librenms.server/device/device=XXXX/tab=edit/section=modules/>
|
||||
|
||||
## Polling
|
||||
|
||||
- During polling the MIB associations for the device are looked up, and the
|
||||
MIB is polled for current values. You can see the values which LibreNMS
|
||||
has retrieved from the MIB poller in the "Device MIB values" section of
|
||||
<http://your.librenms.server/device/device=XXXX/tab=mib/>
|
||||
|
||||
- Data from the latest poll is saved in the table `device_oids`, and RRD
|
||||
files are saved in the relevant device directory as
|
||||
mibName-oidName-index.rrd
|
||||
|
||||
## Graphing
|
||||
|
||||
- For each graph type defined in the database, a graph will appear in:
|
||||
<http://your.librenms.server/device/device=XXXX/tab=graphs/group=mib/>
|
||||
- MIB graphs are generated generically by
|
||||
`html/includes/graphs/device/mib.inc.php` There is presently no
|
||||
customisation of graphs available.
|
||||
- If there is only one index under a given OID, it is displayed as a normal
|
||||
line graph; if there multiple OIDs, they are displayed as a stacked graph.
|
||||
At the moment, all indices are placed in the same graph. This is
|
||||
non-optimal for, e.g., wifi controllers with hundreds of APs attached.
|
||||
|
||||
## Alerting
|
||||
|
||||
There is no specific support for alerting in the MIB-based polling engine, but
|
||||
the data it collects may be used in alerts. Here's an example of an alert
|
||||
which detects when a Ruckus wireless controller reports meshing disabled on an
|
||||
access point:
|
||||
<http://libertysys.com.au/imagebin/3btw98DR.png>
|
||||
|
||||
# Adding/testing other device types
|
||||
|
||||
One of the goals of this work is to help take out the heavy lifting of adding
|
||||
new device types. Even if you want fully-customised graphs or tables, you can
|
||||
still use the MIB-based poller to make it easy to gather the data you want to
|
||||
graph.
|
||||
|
||||
## How to add a new device MIB
|
||||
|
||||
1. Ensure the manufacturer's MIB is present in the mibs directory. If you
|
||||
plan to submit your work to LibreNMS, make sure you attribute the source
|
||||
of the MIB, including the exact download URL if possible, or explicit
|
||||
instructions about how to obtain it.
|
||||
1. Check that `snmptranslate -Ts -M mibs -m MODULE | grep mibName` produces
|
||||
a named list of OIDs. See the comments on `snmp_mib_walk()` in
|
||||
`includes/snmp.inc.php` for an example.
|
||||
1. Check that `snmptranslate -Td -On -M mibs -m MODULE MODULE::mibName`
|
||||
produces a parsed description of the OID values. An example can be
|
||||
found in the comments for `snmp_mib_parse()` in `includes/snmp.inc.php`.
|
||||
1. Get the `sysObjectID` from a device, for example:
|
||||
`snmpget -v2c -c public -OUsb -m SNMPv2-MIB -M /opt/librenms/mibs
|
||||
-t 30 hostname sysObjectID.0`
|
||||
1. Ensure `snmptranslate -m all -M /opt/librenms/mibs OID 2>/dev/null`
|
||||
(where OID is the value returned for sysObjectID above) results in a
|
||||
valid name for the MIB. See the comments for `snmp_translate()` in
|
||||
`includes/snmp.inc.php` for an example. If this step fails, it means
|
||||
there is something wrong with the MIB and `net-snmp` cannot parse it.
|
||||
1. Add any additional MIBs you wish to poll for specific device types to
|
||||
`includes/discovery/os/OSNAME.inc.php` by calling `poll_mibs()` with the
|
||||
MIB module and name. See `includes/discovery/os/ruckuswireless.inc.php`
|
||||
for an example.
|
||||
1. That should be all you need to see MIB graphs!
|
||||
1. If you want to develop more customised support for a particular OS, you
|
||||
can follow the above process, then use the resultant data collected by
|
||||
LibreNMS in the RRD files or the database tables `device_oids`
|
||||
|
||||
# Configuration
|
||||
|
||||
## Main Configuration
|
||||
|
||||
In `/opt/librenms/config.php` add `$config['poller_modules']['mib'] =
|
||||
true;` to enable MIB polling globally. Alternatively you can enable
|
||||
MIB polling per device by enabling it within the modules section for
|
||||
the specific device.
|
||||
|
||||
## Discovery
|
||||
|
||||
You need to add your desired MIBs to `/opt/librenms/mibs` folder. You
|
||||
will then need to create a list of the OIDs you wish to use in the OS
|
||||
definition.
|
||||
|
||||
### Example
|
||||
|
||||
`/opt/librenms/includes/definitions/ruckuswireless.yaml`
|
||||
|
||||
```yaml
|
||||
register_mibs:
|
||||
ruckusZDSystemStats: RUCKUS-ZD-SYSTEM-MIB
|
||||
ruckusZDWLANTable: RUCKUS-ZD-WLAN-MIB
|
||||
ruckusZDWLANAPTable: RUCKUS-ZD-WLAN-MIB
|
||||
ruckusZDWLANAPRadioStatsTable: RUCKUS-ZD-WLAN-MIB
|
||||
```
|
||||
|
||||
These OIDs and MIBs will then be registered as part of the OS
|
||||
discovery ready for mib polling to work.
|
||||
|
||||
# TODO
|
||||
|
||||
What's not included in MIB-based polling at present? These may be present in
|
||||
future versions. Pull requests gratefully accepted!
|
||||
|
||||
- Parse and save integer and timetick data types.
|
||||
- Filter MIBs/OIDs from being polled and/or saved.
|
||||
- Move graphs from the MIB section to elsewhere. e.g. If a device uses a
|
||||
unique MIB for CPU utilisation, we should display it under the relevant
|
||||
health tab.
|
||||
- Combine multiple MIB values into graphs automatically on a predefined or
|
||||
user-defined basis.
|
||||
- Include MIB types in stats submissions.
|
@ -100,7 +100,6 @@ $config['poller_modules']['entity-physical'] = true;
|
||||
$config['poller_modules']['entity-state'] = false;
|
||||
$config['poller_modules']['applications'] = true;
|
||||
$config['poller_modules']['availability'] = true;
|
||||
$config['poller_modules']['mib'] = false;
|
||||
$config['poller_modules']['stp'] = true;
|
||||
$config['poller_modules']['ntp'] = true;
|
||||
$config['poller_modules']['services'] = true;
|
||||
|
@ -603,16 +603,6 @@ function c_echo($string, $enabled = true)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @return true if the given graph type is a dynamic MIB graph
|
||||
*/
|
||||
function is_mib_graph($type, $subtype)
|
||||
{
|
||||
return \LibreNMS\Util\Graph::isMibGraph($type, $subtype);
|
||||
} // is_mib_graph
|
||||
|
||||
|
||||
/*
|
||||
* @return true if client IP address is authorized to access graphs
|
||||
*/
|
||||
@ -656,29 +646,10 @@ function get_graph_subtypes($type, $device = null)
|
||||
closedir($handle);
|
||||
}
|
||||
|
||||
if ($device != null) {
|
||||
// find the MIB subtypes
|
||||
$graphs = get_device_graphs($device);
|
||||
|
||||
foreach (Config::get('graph_types') as $type => $unused1) {
|
||||
foreach (Config::get("graph_types.$type") as $subtype => $unused2) {
|
||||
if (is_mib_graph($type, $subtype) && in_array($subtype, $graphs)) {
|
||||
$types[] = $subtype;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sort($types);
|
||||
return $types;
|
||||
} // get_graph_subtypes
|
||||
|
||||
function get_device_graphs($device)
|
||||
{
|
||||
$query = 'SELECT `graph` FROM `device_graphs` WHERE `device_id` = ?';
|
||||
return dbFetchColumn($query, array($device['device_id']));
|
||||
}
|
||||
|
||||
function get_smokeping_files($device)
|
||||
{
|
||||
$smokeping = new \LibreNMS\Util\Smokeping(DeviceCache::get($device['device_id']));
|
||||
@ -710,112 +681,6 @@ function round_Nth($val, $round_to)
|
||||
} // end round_Nth
|
||||
|
||||
|
||||
/*
|
||||
* @return true if this device should be polled with MIB-based discovery
|
||||
*/
|
||||
function is_mib_poller_enabled($device)
|
||||
{
|
||||
$val = get_dev_attrib($device, 'poll_mib');
|
||||
if ($val == null) {
|
||||
return Config::get("poller_modules.mib", false);
|
||||
}
|
||||
return $val;
|
||||
} // is_mib_poller_enabled
|
||||
|
||||
|
||||
/*
|
||||
* FIXME: Dummy implementation
|
||||
*/
|
||||
function count_mib_mempools($device)
|
||||
{
|
||||
if (is_mib_poller_enabled($device) && $device['os'] == 'ruckuswireless') {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
} // count_mib_mempools
|
||||
|
||||
|
||||
/*
|
||||
* FIXME: Dummy implementation
|
||||
*/
|
||||
function count_mib_processors($device)
|
||||
{
|
||||
if (is_mib_poller_enabled($device) && $device['os'] == 'ruckuswireless') {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
} // count_mib_processors
|
||||
|
||||
|
||||
function count_mib_health($device)
|
||||
{
|
||||
return count_mib_mempools($device) + count_mib_processors($device);
|
||||
} // count_mib_health
|
||||
|
||||
|
||||
function get_mibval($device, $oid)
|
||||
{
|
||||
$sql = 'SELECT * FROM `device_oids` WHERE `device_id` = ? AND `oid` = ?';
|
||||
return dbFetchRow($sql, array($device['device_id'], $oid));
|
||||
} // get_mibval
|
||||
|
||||
|
||||
/*
|
||||
* FIXME: Dummy implementation - needs an abstraction for each device
|
||||
*/
|
||||
function get_mib_mempools($device)
|
||||
{
|
||||
$mempools = array();
|
||||
if (is_mib_poller_enabled($device) && $device['os'] == 'ruckuswireless') {
|
||||
$mempool = array();
|
||||
$mibvals = get_mibval($device, '.1.3.6.1.4.1.25053.1.2.1.1.1.15.14.0');
|
||||
$mempool['mempool_descr'] = $mibvals['object_type'];
|
||||
$mempool['mempool_id'] = 0;
|
||||
$mempool['mempool_total'] = 100;
|
||||
$mempool['mempool_used'] = $mibvals['numvalue'];
|
||||
$mempool['mempool_free'] = 100 - $mibvals['numvalue'];
|
||||
$mempool['percentage'] = true;
|
||||
$mempools[] = $mempool;
|
||||
}
|
||||
return $mempools;
|
||||
} // get_mib_mempools
|
||||
|
||||
|
||||
/*
|
||||
* FIXME: Dummy implementation - needs an abstraction for each device
|
||||
*/
|
||||
function get_mib_processors($device)
|
||||
{
|
||||
$processors = array();
|
||||
if (is_mib_poller_enabled($device) && $device['os'] == 'ruckuswireless') {
|
||||
$proc = array();
|
||||
$mibvals = get_mibval($device, '.1.3.6.1.4.1.25053.1.2.1.1.1.15.13.0');
|
||||
$proc['processor_descr'] = $mibvals['object_type'];
|
||||
$proc['processor_id'] = 0;
|
||||
$proc['processor_usage'] = $mibvals['numvalue'];
|
||||
$processors[] = $proc;
|
||||
}
|
||||
return $processors;
|
||||
} // get_mib_processors
|
||||
|
||||
|
||||
/*
|
||||
* FIXME: Dummy implementation - needs an abstraction for each device
|
||||
* @return true if there is a custom graph defined for this type, subtype, and device
|
||||
*/
|
||||
function is_custom_graph($type, $subtype, $device)
|
||||
{
|
||||
if (is_mib_poller_enabled($device) && $device['os'] == 'ruckuswireless' && $type == 'device') {
|
||||
switch ($subtype) {
|
||||
case 'cpumem':
|
||||
case 'mempool':
|
||||
case 'processor':
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} // is_custom_graph
|
||||
|
||||
function is_customoid_graph($type, $subtype)
|
||||
{
|
||||
if (!empty($subtype) && $type == 'customoid') {
|
||||
@ -824,37 +689,6 @@ function is_customoid_graph($type, $subtype)
|
||||
return false;
|
||||
} // is_customoid_graph
|
||||
|
||||
/*
|
||||
* FIXME: Dummy implementation
|
||||
* Set section/graph entries in $graph_enable for graphs specific to $os.
|
||||
*/
|
||||
function enable_os_graphs($os, &$graph_enable)
|
||||
{
|
||||
/*
|
||||
foreach (dbFetchRows("SELECT * FROM graph_conditions WHERE graph_type = 'device' AND condition_name = 'os' AND condition_value = ?", array($os)) as $graph) {
|
||||
$graph_enable[$graph['graph_section']][$graph['graph_subtype']] = "device_".$graph['graph_subtype'];
|
||||
}
|
||||
*/
|
||||
} // enable_os_graphs
|
||||
|
||||
|
||||
/*
|
||||
* For each os-based or global graph relevant to $device, set its section/graph entry in $graph_enable.
|
||||
*/
|
||||
function enable_graphs($device, &$graph_enable)
|
||||
{
|
||||
// These are standard graphs we should have for (almost) all systems
|
||||
$graph_enable['poller']['poller_perf'] = 'device_poller_perf';
|
||||
if (!$device['snmp_disable']) {
|
||||
$graph_enable['poller']['poller_modules_perf'] = 'device_poller_modules_perf';
|
||||
}
|
||||
if (get_dev_attrib($device, "override_icmp_disable") != "true" && can_ping_device($device) === true) {
|
||||
$graph_enable['poller']['ping_perf'] = 'device_ping_perf';
|
||||
}
|
||||
|
||||
enable_os_graphs($device['os'], $graph_enable);
|
||||
} // enable_graphs
|
||||
|
||||
|
||||
//
|
||||
// maintain a simple cache of objects
|
||||
@ -909,40 +743,12 @@ function begins_with($str, $arr)
|
||||
return true;
|
||||
} // begins_with
|
||||
|
||||
|
||||
/*
|
||||
* @return the longest starting portion of $str that matches everything in $arr
|
||||
*/
|
||||
function longest_matching_prefix($str, $arr)
|
||||
{
|
||||
$len = strlen($str);
|
||||
while ($len > 0) {
|
||||
$prefix = substr($str, 0, $len);
|
||||
if (begins_with($prefix, $arr)) {
|
||||
return $prefix;
|
||||
}
|
||||
$len -= 1;
|
||||
}
|
||||
return '';
|
||||
} // longest_matching_prefix
|
||||
|
||||
|
||||
function search_phrase_column($c)
|
||||
{
|
||||
global $searchPhrase;
|
||||
return "$c LIKE '%$searchPhrase%'";
|
||||
} // search_phrase_column
|
||||
|
||||
|
||||
function print_mib_poller_disabled()
|
||||
{
|
||||
echo '<h4>MIB polling is not enabled</h4>
|
||||
<p>
|
||||
Set \'poller_modules.mib\' in your config or enable for this device specifically to enable.
|
||||
</p>';
|
||||
} // print_mib_poller_disabled
|
||||
|
||||
|
||||
/**
|
||||
* Constructs the path to an RRD for the Ceph application
|
||||
* @param string $gtype The type of rrd we're looking for
|
||||
@ -1298,32 +1104,6 @@ function get_sql_filter_min_severity($min_severity, $alert_rules_name)
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* Print a list of items up to a max amount
|
||||
* If over that number, a line will print the total items
|
||||
*
|
||||
* @param array $list
|
||||
* @param string $format format as consumed by printf()
|
||||
* @param int $max the max amount of items to print, default 10
|
||||
*/
|
||||
function print_list($list, $format, $max = 10)
|
||||
{
|
||||
if (is_array(current($list))) {
|
||||
$list = array_map(function ($item) {
|
||||
return implode(' ', $item);
|
||||
}, $list);
|
||||
}
|
||||
|
||||
foreach (array_slice($list, 0, $max) as $item) {
|
||||
printf($format, $item);
|
||||
}
|
||||
|
||||
$extra = count($list) - $max;
|
||||
if ($extra > 0) {
|
||||
printf($format, " and $extra more...");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $value
|
||||
* @param bool $strip_tags
|
||||
@ -1465,78 +1245,6 @@ function get_vm_parent_id($device)
|
||||
return dbFetchCell("SELECT `device_id` FROM `vminfo` WHERE `vmwVmDisplayName` = ? OR `vmwVmDisplayName` = ?", [$device['hostname'], $device['hostname'] . '.' . Config::get('mydomain')]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch a user preference from the database
|
||||
* Do not use strict comparison as results could be strings
|
||||
*
|
||||
* @param string $name preference name
|
||||
* @param mixed $default value to return if the preference is not set
|
||||
* @param int $user_id for this user_id otherwise, the currently logged in user
|
||||
* @return mixed value of this preference
|
||||
*/
|
||||
function get_user_pref($name, $default = null, $user_id = null)
|
||||
{
|
||||
global $user_prefs;
|
||||
|
||||
if (is_array($user_prefs) && array_key_exists($name, $user_prefs)) {
|
||||
return $user_prefs[$name];
|
||||
}
|
||||
|
||||
if (is_null($user_id)) {
|
||||
$user_id = Auth::id();
|
||||
}
|
||||
|
||||
$pref = dbFetchCell(
|
||||
'SELECT `value` FROM `users_prefs` WHERE `user_id`=? AND `pref`=?',
|
||||
array($user_id, $name)
|
||||
);
|
||||
|
||||
if (!is_null($pref)) {
|
||||
$pref = json_decode($pref, true);
|
||||
$user_prefs[$name] = $pref;
|
||||
return $pref;
|
||||
}
|
||||
|
||||
return $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a user preference value
|
||||
*
|
||||
* @param string $name preference name
|
||||
* @param mixed $value value of this preference
|
||||
* @param int $user_id for this user_id otherwise, the currently logged in user
|
||||
* @return bool whether the setting was changed or not
|
||||
*/
|
||||
function set_user_pref($name, $value, $user_id = null)
|
||||
{
|
||||
global $user_prefs;
|
||||
if (is_null($user_id)) {
|
||||
$user_id = Auth::id();
|
||||
}
|
||||
|
||||
$pref = array(
|
||||
'user_id' => $user_id,
|
||||
'pref' => $name,
|
||||
'value' => json_encode($value),
|
||||
);
|
||||
|
||||
if (dbFetchCell('SELECT count(*) FROM `users_prefs` WHERE `user_id`=? AND `pref`=?', array($user_id, $name))) {
|
||||
$update = array('value' => json_encode($value));
|
||||
$params = array($user_id, $name);
|
||||
|
||||
$result = dbUpdate($update, 'users_prefs', '`user_id`=? AND `pref`=?', $params) > 0;
|
||||
} else {
|
||||
$result = dbInsert($pref, 'users_prefs') !== null;
|
||||
}
|
||||
|
||||
if ($result) {
|
||||
$user_prefs[$name] = $value;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a class name from a lowercase string containing - or _
|
||||
* Remove - and _ and camel case words
|
||||
|
@ -12,8 +12,3 @@ over:
|
||||
- { graph: device_bits, text: 'Device Traffic' }
|
||||
- { graph: device_processor, text: 'Processor Usage' }
|
||||
- { graph: device_mempool, text: 'Memory Usage' }
|
||||
poller_modules:
|
||||
mib: true
|
||||
register_mibs:
|
||||
bTWagNumGrePmip6Tunnels: BENU-TWAG-STATS-MIB
|
||||
bWagNumCurrentL2tpv3TunnelsIPv4: BENU-WAG-STATS-MIB
|
||||
|
@ -37,5 +37,3 @@ discovery:
|
||||
-
|
||||
sysObjectID:
|
||||
- .1.3.6.1.4.1.42229.6.22
|
||||
register_mibs:
|
||||
mefServiceEvcCfgTable: MEF-UNI-EVC-MIB
|
||||
|
@ -48,5 +48,3 @@ discovery_modules:
|
||||
cisco-pw: true
|
||||
vrf: true
|
||||
cisco-vrf-lite: true
|
||||
register_mibs:
|
||||
ciscoAAASessionMIB: CISCO-AAA-SESSION-MIB
|
||||
|
@ -34,8 +34,6 @@ discovery_modules:
|
||||
vrf: true
|
||||
cisco-vrf-lite: true
|
||||
cisco-qfp: true
|
||||
register_mibs:
|
||||
ciscoAAASessionMIB: CISCO-AAA-SESSION-MIB
|
||||
discovery:
|
||||
-
|
||||
sysDescr:
|
||||
|
@ -32,8 +32,6 @@ discovery_modules:
|
||||
cisco-pw: true
|
||||
vrf: true
|
||||
cisco-vrf-lite: true
|
||||
register_mibs:
|
||||
ciscoAAASessionMIB: CISCO-AAA-SESSION-MIB
|
||||
discovery:
|
||||
-
|
||||
sysDescr:
|
||||
|
@ -9,11 +9,6 @@ over:
|
||||
- { graph: device_bits, text: 'Device Traffic' }
|
||||
- { graph: device_processor, text: 'CPU Usage' }
|
||||
- { graph: device_mempool, text: 'Memory Usage' }
|
||||
register_mibs:
|
||||
fanValue: IOMEGANAS-MIB
|
||||
tempValue: IOMEGANAS-MIB
|
||||
raidStatus: IOMEGANAS-MIB
|
||||
diskStatus: IOMEGANAS-MIB
|
||||
discovery:
|
||||
-
|
||||
sysDescr:
|
||||
|
@ -8,15 +8,6 @@ over:
|
||||
- { graph: device_processor, text: 'Processor Usage' }
|
||||
- { graph: device_mempool, text: 'Memory Usage' }
|
||||
processor_stacked: true
|
||||
register_mibs:
|
||||
rxCounter: GANDI-MIB
|
||||
txCounter: GANDI-MIB
|
||||
dropCounter: GANDI-MIB
|
||||
acldropCounter: GANDI-MIB
|
||||
ratedropCounter: GANDI-MIB
|
||||
KNIrxCounter: GANDI-MIB
|
||||
KNItxCounter: GANDI-MIB
|
||||
KNIdropCounter: GANDI-MIB
|
||||
discovery:
|
||||
-
|
||||
sysDescr_regex: '/^Linux/'
|
||||
|
@ -10,8 +10,6 @@ over:
|
||||
- { graph: device_bits, text: 'Device Traffic' }
|
||||
- { graph: device_processor, text: 'CPU Usage' }
|
||||
- { graph: device_mempool, text: 'Memory Usage' }
|
||||
register_mibs:
|
||||
ciscoAAASessionMIB: CISCO-AAA-SESSION-MIB
|
||||
discovery:
|
||||
-
|
||||
sysObjectID:
|
||||
|
@ -8,11 +8,6 @@ over:
|
||||
- { graph: device_bits, text: Traffic }
|
||||
- { graph: device_wireless_ap-count, text: 'Number of APs' }
|
||||
- { graph: device_wireless_clients, text: 'Number of Clients' }
|
||||
register_mibs:
|
||||
ruckusZDSystemStats: RUCKUS-ZD-SYSTEM-MIB
|
||||
ruckusZDWLANTable: RUCKUS-ZD-WLAN-MIB
|
||||
ruckusZDWLANAPTable: RUCKUS-ZD-WLAN-MIB
|
||||
ruckusZDWLANAPRadioStatsTable: RUCKUS-ZD-WLAN-MIB
|
||||
discovery:
|
||||
-
|
||||
sysObjectID: .1.3.6.1.4.1.25053.3.1.5
|
||||
|
@ -12,11 +12,3 @@ discovery:
|
||||
-
|
||||
sysDescr:
|
||||
- ServerIron
|
||||
register_mibs:
|
||||
snL4slbTotalConnections: FOUNDRY-SN-SW-L4-SWITCH-GROUP-MIB
|
||||
snL4slbLimitExceeds: FOUNDRY-SN-SW-L4-SWITCH-GROUP-MIB
|
||||
snL4slbForwardTraffic: FOUNDRY-SN-SW-L4-SWITCH-GROUP-MIB
|
||||
snL4slbReverseTraffic: FOUNDRY-SN-SW-L4-SWITCH-GROUP-MIB
|
||||
snL4slbFinished: FOUNDRY-SN-SW-L4-SWITCH-GROUP-MIB
|
||||
snL4FreeSessionCount: FOUNDRY-SN-SW-L4-SWITCH-GROUP-MIB
|
||||
snL4unsuccessfulConn: FOUNDRY-SN-SW-L4-SWITCH-GROUP-MIB
|
||||
|
@ -34,6 +34,4 @@ $os = OS::make($device);
|
||||
|
||||
echo "OS: " . Config::getOsSetting($device['os'], 'text') . " ({$device['os']})\n\n";
|
||||
|
||||
register_mibs($device, Config::getOsSetting($device['os'], 'register_mibs', []), 'includes/discovery/os/' . $device['os'] . '.inc.php');
|
||||
|
||||
unset($snmpdata, $attribute, $value, $deviceModel);
|
||||
|
@ -182,11 +182,6 @@ function discover_device(&$device, $force_module = false)
|
||||
}
|
||||
}
|
||||
|
||||
if (is_mib_poller_enabled($device)) {
|
||||
$devicemib = array($device['sysObjectID'] => 'all');
|
||||
register_mibs($device, $devicemib, "includes/discovery/functions.inc.php");
|
||||
}
|
||||
|
||||
$device_time = round(microtime(true) - $device_start, 3);
|
||||
|
||||
dbUpdate(array('last_discovered' => array('NOW()'), 'last_discovered_timetaken' => $device_time), 'devices', '`device_id` = ?', array($device['device_id']));
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use App\Models\UserPref;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/*
|
||||
@ -150,7 +151,7 @@ if ($sub_type == 'new-maintenance') {
|
||||
}
|
||||
|
||||
$item = dbInsert(['schedule_id' => $alert_schedule->schedule_id, 'alert_schedulable_type' => $type, 'alert_schedulable_id' => $target], 'alert_schedulables');
|
||||
if ($notes && $type = 'device' && get_user_pref('add_schedule_note_to_device', false)) {
|
||||
if ($notes && $type = 'device' && UserPref::getPref(Auth::user(), 'add_schedule_note_to_device')) {
|
||||
$device_notes = dbFetchCell('SELECT `notes` FROM `devices` WHERE `device_id` = ?;', [$target]);
|
||||
$device_notes.= ((empty($device_notes)) ? '' : PHP_EOL) . date("Y-m-d H:i") . ' Alerts delayed: ' . $notes;
|
||||
dbUpdate(['notes' => $device_notes], 'devices', '`device_id` = ?', [$target]);
|
||||
|
@ -1315,29 +1315,6 @@ function get_arrays_with_application($device, $app_id, $app_name, $category = nu
|
||||
return $entries;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all dashboards the user can access
|
||||
* adds in the keys:
|
||||
* username - the username of the owner of each dashboard
|
||||
* default - the default dashboard for the logged in user
|
||||
*
|
||||
* @param int $user_id optionally get list for another user
|
||||
* @return array list of dashboards
|
||||
*/
|
||||
function get_dashboards($user_id = null)
|
||||
{
|
||||
$user = is_null($user_id) ? Auth::user() : \App\Models\User::find($user_id);
|
||||
$default = get_user_pref('dashboard');
|
||||
|
||||
return \App\Models\Dashboard::allAvailable($user)->with('user')->get()->map(function ($dashboard) use ($default) {
|
||||
$dash = $dashboard->toArray();
|
||||
$dash['username'] = $dashboard->user ? $dashboard->user->username : '';
|
||||
$dash['default'] = $default == $dashboard->dashboard_id;
|
||||
|
||||
return $dash;
|
||||
})->keyBy('dashboard_id')->all();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return stacked graphs information
|
||||
*
|
||||
|
@ -1,43 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS custom graphing
|
||||
*
|
||||
* Author: Paul Gear
|
||||
* Copyright (c) 2015 Gear Consulting Pty Ltd <github@libertysys.com.au>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
// FIXME: Dummy implementation which only supports ruckuswireless processor & mempool
|
||||
|
||||
$i = 0;
|
||||
$rrd_list = array();
|
||||
if ($subtype == 'processor') {
|
||||
$rrd_list[0] = array(
|
||||
'area' => 1,
|
||||
'ds' => 'mibval',
|
||||
'descr' => 'CPU Utilization',
|
||||
'filename' => rrd_name($device['hostname'], array('ruckusZDSystemStats-CPUUtil-0')),
|
||||
);
|
||||
}
|
||||
|
||||
if ($subtype == 'mempool') {
|
||||
$rrd_list[0] = array(
|
||||
'area' => 1,
|
||||
'ds' => 'mibval',
|
||||
'descr' => 'Memory Utilization',
|
||||
'filename' => rrd_name($device['hostname'], array('ruckusZDSystemStats-MemoryUtil-0')),
|
||||
);
|
||||
}
|
||||
|
||||
$units = '%%';
|
||||
$colours = 'mixed';
|
||||
$scale_min = '0';
|
||||
$scale_max = '100';
|
||||
$nototal = 1;
|
||||
|
||||
require_once 'includes/html/graphs/generic_multi_line.inc.php';
|
@ -1,46 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS MIB-based polling
|
||||
*
|
||||
* Author: Paul Gear
|
||||
* Copyright (c) 2015 Gear Consulting Pty Ltd <github@libertysys.com.au>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
$rrd_list = array();
|
||||
$prefix = rrd_name($device['hostname'], array($subtype, ''), '');
|
||||
$filenames = glob($prefix."*.rrd");
|
||||
$count = count($filenames);
|
||||
foreach ($filenames as $filename) {
|
||||
// find out what * expanded to
|
||||
$globpart = str_replace($prefix, '', $filename); // take off the prefix
|
||||
$instance = substr($globpart, 0, -4); // take off ".rrd"
|
||||
$ds = array();
|
||||
$mibparts = explode('-', $subtype);
|
||||
$mibvar = end($mibparts);
|
||||
$ds['ds'] = 'mibval';
|
||||
$ds['descr'] = "$mibvar-$instance";
|
||||
$ds['filename'] = $filename;
|
||||
$rrd_list[] = $ds;
|
||||
}
|
||||
|
||||
$scale_min = '0';
|
||||
$simple_rrd = true;
|
||||
|
||||
// If there are multiple matching files, use a stacked graph instead of a line graph
|
||||
if ($count > 1) {
|
||||
$nototal = 1;
|
||||
$divider = $count;
|
||||
$text_orig = 1;
|
||||
$colours = 'manycolours';
|
||||
include "includes/html/graphs/generic_multi_simplex_seperated.inc.php";
|
||||
} else {
|
||||
$colours = 'mixed';
|
||||
$nototal = 0;
|
||||
include "includes/html/graphs/generic_multi_line.inc.php";
|
||||
}
|
@ -37,13 +37,9 @@ require Config::get('install_dir') . "/includes/html/graphs/$type/auth.inc.php";
|
||||
//set default graph title
|
||||
$graph_title = format_hostname($device);
|
||||
|
||||
if ($auth && is_custom_graph($type, $subtype, $device)) {
|
||||
include(Config::get('install_dir') . "/includes/html/graphs/custom.inc.php");
|
||||
} elseif ($auth && is_customoid_graph($type, $subtype)) {
|
||||
if ($auth && is_customoid_graph($type, $subtype)) {
|
||||
$unit = $vars['unit'];
|
||||
include(Config::get('install_dir') . "/includes/html/graphs/customoid/customoid.inc.php");
|
||||
} elseif ($auth && is_mib_graph($type, $subtype)) {
|
||||
include Config::get('install_dir') . "/includes/html/graphs/$type/mib.inc.php";
|
||||
} elseif ($auth && is_file(Config::get('install_dir') . "/includes/html/graphs/$type/$subtype.inc.php")) {
|
||||
include Config::get('install_dir') . "/includes/html/graphs/$type/$subtype.inc.php";
|
||||
} else {
|
||||
|
@ -22,8 +22,6 @@ foreach (dbFetchRows('SELECT * FROM device_graphs WHERE device_id = ? ORDER BY g
|
||||
}
|
||||
}
|
||||
|
||||
enable_graphs($device, $graph_enable);
|
||||
|
||||
$sep = '';
|
||||
foreach ($graph_enable as $section => $nothing) {
|
||||
if (isset($graph_enable) && is_array($graph_enable[$section])) {
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
$storage = dbFetchCell('select count(*) from storage WHERE device_id = ?', array($device['device_id']));
|
||||
$diskio = get_disks($device['device_id']);
|
||||
$mempools = dbFetchCell('select count(*) from mempools WHERE device_id = ?', array($device['device_id'])) + count_mib_mempools($device);
|
||||
$processor = dbFetchCell('select count(*) from processors WHERE device_id = ?', array($device['device_id'])) + count_mib_processors($device);
|
||||
$mempools = dbFetchCell('select count(*) from mempools WHERE device_id = ?', array($device['device_id']));
|
||||
$processor = dbFetchCell('select count(*) from processors WHERE device_id = ?', array($device['device_id']));
|
||||
|
||||
/*
|
||||
* QFP count for cisco devices
|
||||
|
@ -1,15 +1,8 @@
|
||||
<?php
|
||||
|
||||
$graph_type = 'mempool_usage';
|
||||
|
||||
$i = '1';
|
||||
|
||||
if (count_mib_mempools($device) > 0) {
|
||||
$mempools = get_mib_mempools($device);
|
||||
$graph_type = 'device_mempool';
|
||||
} else {
|
||||
$mempools = dbFetchRows('SELECT * FROM `mempools` WHERE device_id = ?', array($device['device_id']));
|
||||
}
|
||||
$mempools = dbFetchRows('SELECT * FROM `mempools` WHERE device_id = ?', array($device['device_id']));
|
||||
|
||||
// FIXME css alternating colours
|
||||
foreach ($mempools as $mempool) {
|
||||
@ -21,18 +14,13 @@ foreach ($mempools as $mempool) {
|
||||
|
||||
$text_descr = rewrite_entity_descr($mempool['mempool_descr']);
|
||||
|
||||
if ($graph_type == 'device_mempool') {
|
||||
$id = 'device';
|
||||
$val = $device['device_id'];
|
||||
} else {
|
||||
$id = 'id';
|
||||
$val = $mempool['mempool_id'];
|
||||
}
|
||||
$mempool_url = 'graphs/'.$id.'='.$val.'/type='.$graph_type.'/';
|
||||
$mini_url = 'graph.php?' . $id . '=' . $val . '&type=' . $graph_type . '&from=' . \LibreNMS\Config::get('time.day') . '&to=' . \LibreNMS\Config::get('time.now') . '&width=80&height=20&bg=f4f4f4';
|
||||
$id = 'id';
|
||||
$val = $mempool['mempool_id'];
|
||||
$mempool_url = 'graphs/'.$id.'='.$val.'/type=mempool_usage/';
|
||||
$mini_url = 'graph.php?' . $id . '=' . $val . '&type=mempool_usage&from=' . \LibreNMS\Config::get('time.day') . '&to=' . \LibreNMS\Config::get('time.now') . '&width=80&height=20&bg=f4f4f4';
|
||||
|
||||
$mempool_popup = "onmouseover=\"return overlib('<div class=list-large>".$device['hostname'].' - '.$text_descr;
|
||||
$mempool_popup .= "</div><img src=\'graph.php?'.$id.'=" . $val . '&type=' . $graph_type . '&from=' . \LibreNMS\Config::get('time.month') . '&to=' . \LibreNMS\Config::get('time.now') . "&width=400&height=125\'>";
|
||||
$mempool_popup .= "</div><img src=\'graph.php?'.$id.'=" . $val . '&type=mempool_usage&from=' . \LibreNMS\Config::get('time.month') . '&to=' . \LibreNMS\Config::get('time.now') . "&width=400&height=125\'>";
|
||||
$mempool_popup .= "', RIGHT" . \LibreNMS\Config::get('overlib_defaults') . ');" onmouseout="return nd();"';
|
||||
|
||||
$total = formatStorage($mempool['mempool_total']);
|
||||
@ -51,7 +39,7 @@ foreach ($mempools as $mempool) {
|
||||
$left_background = $background['left'];
|
||||
|
||||
$graph_array[$id] = $val;
|
||||
$graph_array['type'] = $graph_type;
|
||||
$graph_array['type'] = 'mempool_usage';
|
||||
|
||||
echo "<div class='panel panel-default'>
|
||||
<div class='panel-heading'>";
|
||||
|
@ -1,26 +1,14 @@
|
||||
<?php
|
||||
|
||||
$graph_type = 'processor_usage';
|
||||
|
||||
$i = '1';
|
||||
|
||||
if (count_mib_processors($device) > 0) {
|
||||
$processors = get_mib_processors($device);
|
||||
$graph_type = 'device_processor';
|
||||
} else {
|
||||
$processors = dbFetchRows('SELECT * FROM `processors` WHERE device_id = ?', array($device['device_id']));
|
||||
}
|
||||
$processors = dbFetchRows('SELECT * FROM `processors` WHERE device_id = ?', array($device['device_id']));
|
||||
|
||||
foreach ($processors as $proc) {
|
||||
if ($graph_type == 'device_processor') {
|
||||
$id = 'device';
|
||||
$val = $device['device_id'];
|
||||
} else {
|
||||
$id = 'id';
|
||||
$val = $proc['processor_id'];
|
||||
}
|
||||
$proc_url = 'graphs/'.$id.'='.$val.'/type='.$graph_type.'/';
|
||||
$base_url = 'graph.php?' . $id . '=' . $val . '&type=' . $graph_type . '&from=' . \LibreNMS\Config::get('time.day') . '&to=' . \LibreNMS\Config::get('time.now');
|
||||
$id = 'id';
|
||||
$val = $proc['processor_id'];
|
||||
$proc_url = 'graphs/'.$id.'='.$val.'/type=processor_usage/';
|
||||
$base_url = 'graph.php?' . $id . '=' . $val . '&type=processor_usage&from=' . \LibreNMS\Config::get('time.day') . '&to=' . \LibreNMS\Config::get('time.now');
|
||||
$mini_url = $base_url.'&width=80&height=20&bg=f4f4f4';
|
||||
|
||||
$text_descr = rewrite_entity_descr($proc['processor_descr']);
|
||||
@ -31,7 +19,7 @@ foreach ($processors as $proc) {
|
||||
$percent = round($proc['processor_usage']);
|
||||
|
||||
$graph_array[$id] = $val;
|
||||
$graph_array['type'] = $graph_type;
|
||||
$graph_array['type'] = 'processor_usage';
|
||||
|
||||
echo "<div class='panel panel-default'>
|
||||
<div class='panel-heading'>
|
||||
|
@ -1,93 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS device MIB browser
|
||||
*
|
||||
* Copyright (c) 2015 Gear Consulting Pty Ltd <github@libertysys.com.au>
|
||||
*
|
||||
* Author: Paul Gear
|
||||
*
|
||||
* 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 (!isset($vars['section'])) {
|
||||
$vars['section'] = "mib";
|
||||
}
|
||||
if (is_mib_poller_enabled($device)) {
|
||||
?>
|
||||
|
||||
<h4><i class="fa fa-file-text-o"></i> Device MIB associations</h4>
|
||||
<div class="table-responsive">
|
||||
<table id="mibs" class="table table-hover table-condensed mibs">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-column-id="module">Module</th>
|
||||
<th data-column-id="mib">MIB</th>
|
||||
<th data-column-id="included_by">Included by</th>
|
||||
<th data-column-id="last_modified">Last Modified</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h4><i class="fa fa-file-text-o"></i> Device MIB values</h4>
|
||||
<div class="table-responsive">
|
||||
<table id="oids" class="table table-hover table-condensed mibs">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-column-id="module">Module</th>
|
||||
<th data-column-id="mib">MIB</th>
|
||||
<th data-column-id="object_type">Object type</th>
|
||||
<th data-column-id="oid">OID</th>
|
||||
<th data-column-id="value">Value</th>
|
||||
<th data-column-id="numvalue">Numeric Value</th>
|
||||
<th data-column-id="last_modified">Last Modified</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var grid = $("#mibs").bootgrid({
|
||||
ajax: true,
|
||||
rowCount: [50, 100, 250, -1],
|
||||
post: function ()
|
||||
{
|
||||
return {
|
||||
id: "device_mibs",
|
||||
device_id: '<?php echo htmlspecialchars($device['device_id']); ?>',
|
||||
};
|
||||
},
|
||||
url: "ajax_table.php",
|
||||
formatters: {
|
||||
},
|
||||
templates: {
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var grid2 = $("#oids").bootgrid({
|
||||
ajax: true,
|
||||
rowCount: [50,100,250,-1],
|
||||
post: function ()
|
||||
{
|
||||
return {
|
||||
id: "device_oids",
|
||||
device_id: '<?php echo htmlspecialchars($device['device_id']); ?>',
|
||||
};
|
||||
},
|
||||
url: "ajax_table.php",
|
||||
formatters: {
|
||||
},
|
||||
templates: {
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
} else {
|
||||
print_mib_poller_disabled();
|
||||
}
|
@ -67,7 +67,7 @@ foreach ($menu_options as $option => $text) {
|
||||
$headeroptions = '<select name="type" id="type" onchange="window.open(this.options[this.selectedIndex].value,\'_top\')" class="devices-graphs-select">';
|
||||
$type = 'device';
|
||||
foreach (get_graph_subtypes($type) as $avail_type) {
|
||||
$display_type = is_mib_graph($type, $avail_type) ? $avail_type : nicecase($avail_type);
|
||||
$display_type = nicecase($avail_type);
|
||||
if ('graph_' . $avail_type == $vars['format']) {
|
||||
$is_selected = 'selected';
|
||||
} else {
|
||||
|
@ -71,7 +71,7 @@ if (!$auth) {
|
||||
if ($avail_type == $subtype) {
|
||||
echo(" selected");
|
||||
}
|
||||
$display_type = is_mib_graph($type, $avail_type) ? $avail_type : nicecase($avail_type);
|
||||
$display_type = nicecase($avail_type);
|
||||
echo ">$display_type</option>";
|
||||
}
|
||||
echo '</select></form></div>';
|
||||
|
@ -1,54 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS global MIB association viewer
|
||||
*
|
||||
* Copyright (c) 2015 Gear Consulting Pty Ltd <github@libertysys.com.au>
|
||||
*
|
||||
* Author: Paul Gear
|
||||
*
|
||||
* 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 (\LibreNMS\Config::get("poller_modules.mib")) {
|
||||
?>
|
||||
|
||||
<h4>MIB associations for all devices</h4>
|
||||
<div class="table-responsive">
|
||||
<table id="mibs" class="table table-hover table-condensed mibs">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-column-id="hostname">Hostname</th>
|
||||
<th data-column-id="module">Module</th>
|
||||
<th data-column-id="mib">MIB</th>
|
||||
<th data-column-id="included_by">Included by</th>
|
||||
<th data-column-id="last_modified">Last Modified</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var grid = $("#mibs").bootgrid({
|
||||
ajax: true,
|
||||
rowCount: [50, 100, 250, -1],
|
||||
post: function ()
|
||||
{
|
||||
return {
|
||||
id: "device_mibs",
|
||||
};
|
||||
},
|
||||
url: "ajax_table.php",
|
||||
formatters: {
|
||||
},
|
||||
templates: {
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
} else {
|
||||
print_mib_poller_disabled();
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS global MIB viewer
|
||||
*
|
||||
* Copyright (c) 2015 Gear Consulting Pty Ltd <github@libertysys.com.au>
|
||||
*
|
||||
* Author: Paul Gear
|
||||
*
|
||||
* 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 (\LibreNMS\Config::get("poller_modules.mib")) {
|
||||
?>
|
||||
|
||||
<h4><i class="fa fa-file-text-o"></i> All MIB definitions</h4>
|
||||
<div class="table-responsive">
|
||||
<table id="mibs" class="table table-hover table-condensed mibs">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-column-id="module">Module</th>
|
||||
<th data-column-id="mib">MIB</th>
|
||||
<th data-column-id="object_type">Object Type</th>
|
||||
<th data-column-id="oid">Object Id</th>
|
||||
<th data-column-id="syntax">Syntax</th>
|
||||
<th data-column-id="description">Description</th>
|
||||
<!-- th data-column-id="max_access">Maximum Access</th>
|
||||
<th data-column-id="status">Status</th -->
|
||||
<th data-column-id="included_by">Included by</th>
|
||||
<th data-column-id="last_modified">Last modified</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
var grid = $("#mibs").bootgrid({
|
||||
ajax: true,
|
||||
rowCount: [50, 100, 250, -1],
|
||||
post: function ()
|
||||
{
|
||||
return {
|
||||
id: "mibs",
|
||||
view: '<?php echo $vars['view']; ?>'
|
||||
};
|
||||
},
|
||||
url: "ajax_table.php",
|
||||
formatters: {
|
||||
},
|
||||
templates: {
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
} else {
|
||||
print_mib_poller_disabled();
|
||||
}
|
@ -1,98 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS device MIB association browser
|
||||
*
|
||||
* Copyright (c) 2015 Gear Consulting Pty Ltd <github@libertysys.com.au>
|
||||
*
|
||||
* by Paul Gear
|
||||
* based on code by Søren Friis Rosiak <sorenrosiak@gmail.com>
|
||||
* in commit 054bf3ae209f34a2c3bc8968300722004903df1b
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
$columns = array(
|
||||
'module',
|
||||
'mib',
|
||||
'included_by',
|
||||
'last_modified',
|
||||
);
|
||||
|
||||
if (isset($vars['device_id'])) {
|
||||
// device_id supplied - get details for a single device
|
||||
// used by device MIB page
|
||||
$params = array(
|
||||
$vars['device_id'],
|
||||
);
|
||||
$sql = 'SELECT * FROM `device_mibs`';
|
||||
$wheresql = ' WHERE `device_id` = ?';
|
||||
$sortcolumns = 3;
|
||||
$count_sql = "SELECT COUNT(*) FROM `device_mibs`".$wheresql;
|
||||
} else {
|
||||
// device_id not supplied - get details for a all devices
|
||||
// used by all device MIBs page
|
||||
$params = array();
|
||||
$sql = 'SELECT `d`.`hostname` as `hostname`, `dm`.* FROM `devices` `d`, `device_mibs` `dm`';
|
||||
$wheresql = ' WHERE `d`.`device_id` = `dm`.`device_id`';
|
||||
array_unshift($columns, 'hostname');
|
||||
$sortcolumns = 4;
|
||||
$count_sql = "SELECT COUNT(*) FROM `devices` `d`, `device_mibs` `dm`".$wheresql;
|
||||
}
|
||||
|
||||
// all columns are searchable - search across them
|
||||
if (isset($searchPhrase) && !empty($searchPhrase)) {
|
||||
$searchsql = implode(' OR ', array_map("search_phrase_column", array_map("mres", $columns)));
|
||||
$wheresql .= " AND ( $searchsql )";
|
||||
}
|
||||
$sql .= $wheresql;
|
||||
|
||||
// get total
|
||||
$total = dbFetchCell($count_sql, $params);
|
||||
if (empty($total)) {
|
||||
$total = 0;
|
||||
}
|
||||
|
||||
// set up default sort
|
||||
if (!isset($sort) || empty($sort)) {
|
||||
$sort = implode(', ', array_map("mres", array_slice($columns, 0, $sortcolumns)));
|
||||
}
|
||||
$sql .= " ORDER BY $sort";
|
||||
|
||||
// select only the required rows
|
||||
if (isset($current)) {
|
||||
$limit_low = (($current * $rowCount) - ($rowCount));
|
||||
$limit_high = $rowCount;
|
||||
}
|
||||
if ($rowCount != -1) {
|
||||
$sql .= " LIMIT $limit_low,$limit_high";
|
||||
}
|
||||
|
||||
// load data from database into response array
|
||||
$response = array();
|
||||
foreach (dbFetchRows($sql, $params) as $mib) {
|
||||
$mibrow = array();
|
||||
foreach ($columns as $col) {
|
||||
$mibrow[$col] = $mib[$col];
|
||||
}
|
||||
if (!isset($vars['device_id'])) {
|
||||
$device = device_by_id_cache($mib['device_id']);
|
||||
$mibrow['hostname'] = generate_device_link(
|
||||
$device,
|
||||
$mib['hostname'],
|
||||
array('tab' => 'mib')
|
||||
);
|
||||
}
|
||||
$response[] = $mibrow;
|
||||
}
|
||||
|
||||
$output = array(
|
||||
'current' => $current,
|
||||
'rowCount' => $rowCount,
|
||||
'rows' => $response,
|
||||
'total' => $total,
|
||||
);
|
||||
echo _json_encode($output);
|
@ -1,83 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS device MIB OID browser
|
||||
*
|
||||
* Copyright (c) 2015 Gear Consulting Pty Ltd <github@libertysys.com.au>
|
||||
*
|
||||
* by Paul Gear
|
||||
* based on code by Søren Friis Rosiak <sorenrosiak@gmail.com>
|
||||
* in commit 054bf3ae209f34a2c3bc8968300722004903df1b
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
$columns = array(
|
||||
'module',
|
||||
'mib',
|
||||
'object_type',
|
||||
'oid',
|
||||
'value',
|
||||
'numvalue',
|
||||
'last_modified',
|
||||
);
|
||||
|
||||
|
||||
$params = array(
|
||||
$vars['device_id'],
|
||||
);
|
||||
|
||||
// start of sql definition
|
||||
$sql = 'SELECT * FROM `device_oids`';
|
||||
|
||||
$wheresql = ' WHERE `device_id` = ?';
|
||||
|
||||
// all columns are searchable - search across them
|
||||
if (isset($searchPhrase) && !empty($searchPhrase)) {
|
||||
$searchsql = implode(' OR ', array_map("search_phrase_column", array_map("mres", $columns)));
|
||||
$wheresql .= " AND ( $searchsql )";
|
||||
}
|
||||
$sql .= $wheresql;
|
||||
|
||||
// get total
|
||||
$count_sql = "SELECT COUNT(*) FROM `device_oids`".$wheresql;
|
||||
$total = dbFetchCell($count_sql, $params);
|
||||
if (empty($total)) {
|
||||
$total = 0;
|
||||
}
|
||||
|
||||
// sort by first three columns by default
|
||||
if (!isset($sort) || empty($sort)) {
|
||||
$sort = implode(', ', array_map("mres", array_slice($columns, 0, 3)));
|
||||
}
|
||||
$sql .= " ORDER BY $sort";
|
||||
|
||||
// select only the required rows
|
||||
if (isset($current)) {
|
||||
$limit_low = (($current * $rowCount) - ($rowCount));
|
||||
$limit_high = $rowCount;
|
||||
}
|
||||
if ($rowCount != -1) {
|
||||
$sql .= " LIMIT $limit_low,$limit_high";
|
||||
}
|
||||
|
||||
// load data from database into response array
|
||||
$response = array();
|
||||
foreach (dbFetchRows($sql, $params) as $mib) {
|
||||
$mibrow = array();
|
||||
foreach ($columns as $col) {
|
||||
$mibrow[$col] = $mib[$col];
|
||||
}
|
||||
$response[] = $mibrow;
|
||||
}
|
||||
|
||||
$output = array(
|
||||
'current' => $current,
|
||||
'rowCount' => $rowCount,
|
||||
'rows' => $response,
|
||||
'total' => $total,
|
||||
);
|
||||
echo _json_encode($output);
|
@ -1,81 +0,0 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* LibreNMS MIB definition browser
|
||||
*
|
||||
* Copyright (c) 2015 Gear Consulting Pty Ltd <github@libertysys.com.au>
|
||||
*
|
||||
* by Paul Gear
|
||||
* based on code by Søren Friis Rosiak <sorenrosiak@gmail.com>
|
||||
* in commit 054bf3ae209f34a2c3bc8968300722004903df1b
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
$columns = array(
|
||||
'module',
|
||||
'mib',
|
||||
'object_type',
|
||||
'oid',
|
||||
'syntax',
|
||||
'description',
|
||||
'max_access',
|
||||
'status',
|
||||
'included_by',
|
||||
'last_modified',
|
||||
);
|
||||
|
||||
|
||||
// start of sql definition
|
||||
$sql = 'SELECT * FROM `mibdefs`';
|
||||
|
||||
// all columns are searchable - search across them
|
||||
if (isset($searchPhrase) && !empty($searchPhrase)) {
|
||||
$searchsql = implode(' OR ', array_map("search_phrase_column", array_map("mres", $columns)));
|
||||
$wheresql .= " WHERE ( $searchsql )";
|
||||
$sql .= $wheresql;
|
||||
}
|
||||
|
||||
// get total
|
||||
$count_sql = "SELECT COUNT(`object_type`) FROM `mibdefs`".$wheresql;
|
||||
$total = dbFetchCell($count_sql);
|
||||
if (empty($total)) {
|
||||
$total = 0;
|
||||
}
|
||||
|
||||
// sort by first three columns by default
|
||||
if (!isset($sort) || empty($sort)) {
|
||||
$sort = implode(', ', array_map("mres", array_slice($columns, 0, 3)));
|
||||
}
|
||||
$sql .= " ORDER BY $sort";
|
||||
|
||||
// select only the required rows
|
||||
if (isset($current)) {
|
||||
$limit_low = (($current * $rowCount) - ($rowCount));
|
||||
$limit_high = $rowCount;
|
||||
}
|
||||
if ($rowCount != -1) {
|
||||
$sql .= " LIMIT $limit_low,$limit_high";
|
||||
}
|
||||
|
||||
// load data from database into response array
|
||||
$response = array();
|
||||
foreach (dbFetchRows($sql) as $mib) {
|
||||
$mibrow = array();
|
||||
foreach ($columns as $col) {
|
||||
$mibrow[$col] = $mib[$col];
|
||||
}
|
||||
$response[] = $mibrow;
|
||||
}
|
||||
|
||||
$output = array(
|
||||
'current' => $current,
|
||||
'rowCount' => $rowCount,
|
||||
'rows' => $response,
|
||||
'total' => $total,
|
||||
);
|
||||
echo _json_encode($output);
|
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
use LibreNMS\Config;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
if (isset($device['uptime']) && ($device['uptime'] > 0 )) {
|
||||
$graphs['availability'] = true;
|
||||
$os->enableGraph('availability');
|
||||
|
||||
$col = dbFetchColumn('SELECT duration FROM availability WHERE device_id = ?', array($device['device_id']));
|
||||
foreach (Config::get('graphing.availability') as $duration) {
|
||||
|
@ -115,7 +115,7 @@ if ($device['os_group'] == 'cisco') {
|
||||
$tags = compact('address', 'rrd_name', 'rrd_def');
|
||||
data_update($device, 'ipsectunnel', $tags, $fields);
|
||||
|
||||
// $graphs['ipsec_tunnels'] = TRUE;
|
||||
// $os->enableGraph('ipsec_tunnels');
|
||||
}
|
||||
}//end foreach
|
||||
|
||||
|
@ -39,7 +39,7 @@ if ($device['os_group'] == 'cisco' && ( $device['os'] == 'asa' || $device['os']
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'asa_conns', $tags, $fields);
|
||||
|
||||
$graphs['asa_conns'] = true;
|
||||
$os->enableGraph('asa_conns');
|
||||
echo ' ASA Connections';
|
||||
}
|
||||
|
||||
|
@ -105,10 +105,10 @@ if ($device['os_group'] == 'cisco') {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cipsec_flow', $tags, $fields);
|
||||
|
||||
$graphs['cipsec_flow_tunnels'] = true;
|
||||
$graphs['cipsec_flow_pkts'] = true;
|
||||
$graphs['cipsec_flow_bits'] = true;
|
||||
$graphs['cipsec_flow_stats'] = true;
|
||||
$os->enableGraph('cipsec_flow_tunnels');
|
||||
$os->enableGraph('cipsec_flow_pkts');
|
||||
$os->enableGraph('cipsec_flow_bits');
|
||||
$os->enableGraph('cipsec_flow_stats');
|
||||
|
||||
echo ' cipsec_flow';
|
||||
}//end if
|
||||
|
@ -64,7 +64,7 @@ if ($device['os_group'] == 'cisco') {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cras_sessions', $tags, $fields);
|
||||
|
||||
$graphs['cras_sessions'] = true;
|
||||
$os->enableGraph('cras_sessions');
|
||||
}
|
||||
|
||||
unset($data, $rrd_def, $fields, $oid_list);
|
||||
|
@ -41,7 +41,7 @@ if ($device['os_group'] == "cisco") {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cisco-iosdsp', $tags, $fields);
|
||||
|
||||
$graphs['cisco-iosdsp'] = true;
|
||||
$os->enableGraph('cisco-iosdsp');
|
||||
echo(" Cisco IOS DSP ");
|
||||
}
|
||||
unset($rrd_def, $total, $active, $tags, $fields);
|
||||
|
@ -38,7 +38,7 @@ if ($device['os_group'] == "cisco") {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cisco-iosmtp', $tags, $fields);
|
||||
|
||||
$graphs['cisco-iosmtp'] = true;
|
||||
$os->enableGraph('cisco-iosmtp');
|
||||
echo (" Cisco IOS MTP ");
|
||||
}
|
||||
unset($rrd_def, $total, $active, $available, $fields, $tags);
|
||||
|
@ -48,7 +48,7 @@ if ($device['os_group'] == "cisco") {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cisco-iospri', $tags, $fields);
|
||||
|
||||
$graphs['cisco-iospri'] = true;
|
||||
$os->enableGraph('cisco-iospri');
|
||||
echo(" Cisco IOS PRI ");
|
||||
}
|
||||
unset($rrd_def, $total, $active, $fields, $tags);
|
||||
|
@ -38,7 +38,7 @@ if ($device['os_group'] == "cisco") {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cisco-iosxcode', $tags, $fields);
|
||||
|
||||
$graphs['cisco-iosxcode'] = true;
|
||||
$os->enableGraph('cisco-iosxcode');
|
||||
echo (" Cisco IOS Transcoder ");
|
||||
}
|
||||
unset($rrd_def, $total, $active, $available, $fields, $tags);
|
||||
|
@ -35,7 +35,7 @@ if ($device['os_group'] == "cisco") {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cisco-voice-ip', $tags, $fields);
|
||||
|
||||
$graphs['cisco-voice-ip'] = true;
|
||||
$os->enableGraph('cisco-voice-ip');
|
||||
echo(" Cisco IOS Voice IP ");
|
||||
unset($rrd_def, $active, $fields, $tags);
|
||||
}
|
||||
|
@ -30,8 +30,8 @@ if ($device['os_group'] == 'cisco') {
|
||||
$tags = compact('type', 'rrd_name', 'rrd_def');
|
||||
data_update($device, 'vpdn', $tags, $fields);
|
||||
|
||||
$graphs['vpdn_sessions_'.$type] = true;
|
||||
$graphs['vpdn_tunnels_'.$type] = true;
|
||||
$os->enableGraph("vpdn_sessions_$type");
|
||||
$os->enableGraph("vpdn_tunnels_$type");
|
||||
|
||||
echo " Cisco VPDN ($type) ";
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ if ($uptime != 0 && Config::get("os.{$device['os']}.bad_uptime") !== true) {
|
||||
);
|
||||
data_update($device, 'uptime', $tags, $uptime);
|
||||
|
||||
$graphs['uptime'] = true;
|
||||
$os->enableGraph('uptime');
|
||||
|
||||
echo 'Uptime: ' . Time::formatInterval($uptime) . PHP_EOL;
|
||||
|
||||
|
@ -8,7 +8,7 @@ foreach (dbFetchRows("SELECT * FROM `customoids` WHERE `customoid_passed` = 1 AN
|
||||
$prev_oid_value = $customoid['customoid_current'];
|
||||
|
||||
$rawdata = snmp_get($device, $customoid['customoid_oid'], '-Oqv');
|
||||
|
||||
|
||||
$user_funcs = array(
|
||||
"celsius_to_fahrenheit",
|
||||
"fahrenheit_to_celsius",
|
||||
@ -16,7 +16,7 @@ foreach (dbFetchRows("SELECT * FROM `customoids` WHERE `customoid_passed` = 1 AN
|
||||
);
|
||||
|
||||
if (is_numeric($rawdata)) {
|
||||
$graphs['customoid'] = true;
|
||||
$os->enableGraph('customoid');
|
||||
$oid_value = $rawdata;
|
||||
} else {
|
||||
$oid_value = 0;
|
||||
|
@ -230,15 +230,15 @@ function record_sensor_data($device, $all_sensors)
|
||||
*/
|
||||
function poll_device($device, $force_module = false)
|
||||
{
|
||||
global $device, $graphs;
|
||||
global $device;
|
||||
|
||||
$device_start = microtime(true);
|
||||
|
||||
$graphs = [];
|
||||
$attribs = DeviceCache::getPrimary()->getAttribs();
|
||||
$device['attribs'] = $attribs;
|
||||
|
||||
load_os($device);
|
||||
$os = \LibreNMS\OS::make($device);
|
||||
|
||||
unset($array);
|
||||
|
||||
@ -336,6 +336,7 @@ function poll_device($device, $force_module = false)
|
||||
'poller' => $module_time,
|
||||
);
|
||||
data_update($device, 'poller-perf', $tags, $fields);
|
||||
$os->enableGraph('poller_perf');
|
||||
|
||||
// remove old rrd
|
||||
$oldrrd = rrd_name($device['hostname'], array('poller', $module, 'perf'));
|
||||
@ -351,18 +352,6 @@ function poll_device($device, $force_module = false)
|
||||
echo "Module [ $module ] disabled globally.\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
if (!$force_module && !empty($graphs)) {
|
||||
echo "Enabling graphs: ";
|
||||
$graphs = collect($graphs)->keys();
|
||||
DeviceCache::getPrimary()->graphs->keyBy('graph')->collect()->except($graphs)->each->delete(); // delete extra graphs
|
||||
DeviceCache::getPrimary()->graphs() // create missing graphs
|
||||
->saveMany($graphs->diff(DeviceCache::getPrimary()->graphs->pluck('graph'))->map(function ($graph) {
|
||||
echo '+';
|
||||
return new DeviceGraph(['graph' => $graph]);
|
||||
}));
|
||||
echo PHP_EOL;
|
||||
}
|
||||
|
||||
// Ping response
|
||||
if (can_ping_device($attribs) === true && !empty($response['ping_time'])) {
|
||||
@ -377,6 +366,7 @@ function poll_device($device, $force_module = false)
|
||||
$update_array['last_ping_timetaken'] = $response['ping_time'];
|
||||
|
||||
data_update($device, 'ping-perf', $tags, $fields);
|
||||
$os->enableGraph('ping_perf');
|
||||
}
|
||||
|
||||
$device_time = round(microtime(true) - $device_start, 3);
|
||||
@ -392,12 +382,24 @@ function poll_device($device, $force_module = false)
|
||||
);
|
||||
|
||||
data_update($device, 'poller-perf', $tags, $fields);
|
||||
$os->enableGraph('poller_modules_perf');
|
||||
}
|
||||
|
||||
if (!$force_module) {
|
||||
// don't update last_polled time if we are forcing a specific module to be polled
|
||||
$update_array['last_polled'] = array('NOW()');
|
||||
$update_array['last_polled_timetaken'] = $device_time;
|
||||
|
||||
echo "Enabling graphs: ";
|
||||
DeviceGraph::deleted(function ($graph) {
|
||||
echo '-';
|
||||
});
|
||||
DeviceGraph::created(function ($graph) {
|
||||
echo '+';
|
||||
});
|
||||
|
||||
$os->persistGraphs();
|
||||
echo PHP_EOL;
|
||||
}
|
||||
|
||||
$updated = dbUpdate($update_array, 'devices', '`device_id` = ?', array($device['device_id']));
|
||||
@ -424,89 +426,6 @@ function poll_device($device, $force_module = false)
|
||||
return false; // device not polled
|
||||
}//end poll_device()
|
||||
|
||||
/**
|
||||
* if no rrd_name parameter is passed, the MIB name is used as the rrd_file_name
|
||||
*/
|
||||
function poll_mib_def($device, $mib_name_table, $mib_subdir, $mib_oids, $mib_graphs, &$graphs, $rrd_name = null)
|
||||
{
|
||||
echo "This is poll_mib_def Processing\n";
|
||||
$mib = null;
|
||||
|
||||
list($mib, $file) = explode(':', $mib_name_table, 2);
|
||||
|
||||
if (is_null($rrd_name)) {
|
||||
if (str_i_contains($mib_name_table, 'UBNT')) {
|
||||
$rrd_name = strtolower($mib);
|
||||
} else {
|
||||
$rrd_name = strtolower($file);
|
||||
}
|
||||
}
|
||||
|
||||
$rrd_def = new RrdDefinition();
|
||||
$oidglist = array();
|
||||
$oidnamelist = array();
|
||||
foreach ($mib_oids as $oid => $param) {
|
||||
$oidindex = $param[0];
|
||||
$oiddsname = $param[1];
|
||||
$oiddsdesc = $param[2];
|
||||
$oiddstype = $param[3];
|
||||
$oiddsopts = $param[4];
|
||||
|
||||
if (empty($oiddsopts)) {
|
||||
$rrd_def->addDataset($oiddsname, $oiddstype, null, 100000000000);
|
||||
} else {
|
||||
$min = array_key_exists('min', $oiddsopts) ? $oiddsopts['min'] : null;
|
||||
$max = array_key_exists('max', $oiddsopts) ? $oiddsopts['max'] : null;
|
||||
$heartbeat = array_key_exists('heartbeat', $oiddsopts) ? $oiddsopts['heartbeat'] : null;
|
||||
$rrd_def->addDataset($oiddsname, $oiddstype, $min, $max, $heartbeat);
|
||||
}
|
||||
|
||||
if ($oidindex != '') {
|
||||
$fulloid = $oid.'.'.$oidindex;
|
||||
} else {
|
||||
$fulloid = $oid;
|
||||
}
|
||||
|
||||
// Add to oid GET list
|
||||
$oidglist[] = $fulloid;
|
||||
$oidnamelist[] = $oiddsname;
|
||||
}//end foreach
|
||||
|
||||
// Implde for LibreNMS Version
|
||||
$oidilist = implode(' ', $oidglist);
|
||||
|
||||
$snmpdata = snmp_get_multi($device, $oidilist, '-OQUs', $mib);
|
||||
if (isset($GLOBALS['exec_status']['exitcode']) && $GLOBALS['exec_status']['exitcode'] !== 0) {
|
||||
print_debug(' ERROR, bad snmp response');
|
||||
return false;
|
||||
}
|
||||
|
||||
$oid_count = 0;
|
||||
$fields = array();
|
||||
foreach ($oidglist as $fulloid) {
|
||||
list($splitoid, $splitindex) = explode('.', $fulloid, 2);
|
||||
$val = $snmpdata[$splitindex][$splitoid];
|
||||
if (is_numeric($val)) {
|
||||
$fields[$oidnamelist[$oid_count]] = $val;
|
||||
} elseif (preg_match("/^\"(.*)\"$/", $val, $number) && is_numeric($number[1])) {
|
||||
$fields[$oidnamelist[$oid_count]] = $number[1];
|
||||
} else {
|
||||
$fields[$oidnamelist[$oid_count]] = 'U';
|
||||
}
|
||||
$oid_count++;
|
||||
}
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, $rrd_name, $tags, $fields);
|
||||
|
||||
foreach ($mib_graphs as $graphtoenable) {
|
||||
$graphs[$graphtoenable] = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}//end poll_mib_def()
|
||||
|
||||
|
||||
function get_main_serial($device)
|
||||
{
|
||||
if ($device['os_group'] == 'cisco') {
|
||||
|
@ -17,7 +17,7 @@ if (is_numeric($hrSystem[0]['hrSystemProcesses'])) {
|
||||
|
||||
data_update($device, 'hr_processes', $tags, $fields);
|
||||
|
||||
$graphs['hr_processes'] = true;
|
||||
$os->enableGraph('hr_processes');
|
||||
echo ' Processes';
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ if (is_numeric($hrSystem[0]['hrSystemNumUsers'])) {
|
||||
|
||||
data_update($device, 'hr_users', $tags, $fields);
|
||||
|
||||
$graphs['hr_users'] = true;
|
||||
$os->enableGraph('hr_users');
|
||||
echo ' Users';
|
||||
}
|
||||
|
||||
|
@ -112,8 +112,8 @@ if ($data) {
|
||||
data_update($device, 'ipSystemStats', $tags, $fields);
|
||||
|
||||
// FIXME per-AF?
|
||||
$graphs['ipsystemstats_'.$af] = true;
|
||||
$graphs['ipsystemstats_'.$af.'_frag'] = true;
|
||||
$os->enableGraph("ipsystemstats_$af");
|
||||
$os->enableGraph("ipsystemstats_{$af}_frag");
|
||||
}//end foreach
|
||||
}//end if
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* LibreNMS MIB-based polling
|
||||
*
|
||||
* Author: Paul Gear
|
||||
* Copyright (c) 2015 Gear Consulting Pty Ltd <github@libertysys.com.au>
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
poll_mibs($device, $graphs);
|
@ -1,88 +0,0 @@
|
||||
<?php
|
||||
|
||||
echo ' Siklu Wireless ';
|
||||
|
||||
// Poll interface statistics
|
||||
$mib_oids = array(
|
||||
'rfInPkts' => array(
|
||||
'1',
|
||||
'rfInPkts',
|
||||
'In Packets',
|
||||
'DERIVE',
|
||||
array('min' => 0, 'max' => 12500000000),
|
||||
),
|
||||
'rfOutPkts' => array(
|
||||
'1',
|
||||
'rfOutPkts',
|
||||
'Out Packets',
|
||||
'DERIVE',
|
||||
array('min' => 0, 'max' => 12500000000),
|
||||
),
|
||||
'rfInGoodPkts' => array(
|
||||
'1',
|
||||
'rfInGoodPkts',
|
||||
'Good Packets',
|
||||
'DERIVE',
|
||||
),
|
||||
'rfInErroredPkts' => array(
|
||||
'1',
|
||||
'rfInErroredPkts',
|
||||
'Errored Packets',
|
||||
'DERIVE',
|
||||
),
|
||||
'rfInLostPkts' => array(
|
||||
'1',
|
||||
'rfInLostPkts',
|
||||
'Lost Packets',
|
||||
'DERIVE',
|
||||
),
|
||||
'rfInOctets' => array(
|
||||
'1',
|
||||
'rfInOctets',
|
||||
'In Packets',
|
||||
'DERIVE',
|
||||
array('min' => 0, 'max' => 12500000000),
|
||||
),
|
||||
'rfOutOctets' => array(
|
||||
'1',
|
||||
'rfOutOctets',
|
||||
'Out Packets',
|
||||
'DERIVE',
|
||||
array('min' => 0, 'max' => 12500000000),
|
||||
),
|
||||
'rfInGoodOctets' => array(
|
||||
'1',
|
||||
'rfInGoodOctets',
|
||||
'Good Packets',
|
||||
'DERIVE',
|
||||
),
|
||||
'rfInErroredOctets' => array(
|
||||
'1',
|
||||
'rfInErroredOctets',
|
||||
'Errored Packets',
|
||||
'DERIVE',
|
||||
),
|
||||
'rfInIdleOctets' => array(
|
||||
'1',
|
||||
'rfInIdleOctets',
|
||||
'Lost Packets',
|
||||
'DERIVE',
|
||||
),
|
||||
'rfOutIdleOctets' => array(
|
||||
'1',
|
||||
'rfOutIdleOctets',
|
||||
'Lost Packets',
|
||||
'DERIVE',
|
||||
),
|
||||
);
|
||||
|
||||
$mib_graphs = array(
|
||||
'siklu_rfinterfacePkts',
|
||||
'siklu_rfinterfaceOtherPkts',
|
||||
'siklu_rfinterfaceOctets',
|
||||
'siklu_rfinterfaceOtherOctets',
|
||||
);
|
||||
|
||||
unset($graph, $oids, $oid);
|
||||
|
||||
poll_mib_def($device, 'RADIO-BRIDGE-MIB:siklu-interface', 'siklu', $mib_oids, $mib_graphs, $graphs);
|
@ -1,55 +0,0 @@
|
||||
<?php
|
||||
|
||||
echo ' Sub10 Systems';
|
||||
|
||||
$mib_oids = array(
|
||||
'sub10RadioLclTxPower' => array(
|
||||
'0',
|
||||
'sub10RadioLclTxPower',
|
||||
'Transmit Power',
|
||||
'GAUGE',
|
||||
),
|
||||
'sub10RadioLclRxPower' => array(
|
||||
'0',
|
||||
'sub10RadioLclRxPower',
|
||||
'Receive Power',
|
||||
'GAUGE',
|
||||
),
|
||||
'sub10RadioLclVectErr' => array(
|
||||
'0',
|
||||
'sub10RadioLclVectErr',
|
||||
'Vector Error',
|
||||
'GAUGE',
|
||||
),
|
||||
'sub10RadioLclLnkLoss' => array(
|
||||
'0',
|
||||
'sub10RadioLclLnkLoss',
|
||||
'Link Loss',
|
||||
'GAUGE',
|
||||
),
|
||||
'sub10RadioLclAFER' => array(
|
||||
'0',
|
||||
'sub10RadioLclAFER',
|
||||
'Air Frame Error Rate',
|
||||
'GAUGE',
|
||||
),
|
||||
'sub10RadioLclDataRate' => array(
|
||||
'0',
|
||||
'sub10RadioLclDataRate',
|
||||
'Data Rate on Airside interface',
|
||||
'GAUGE',
|
||||
),
|
||||
);
|
||||
|
||||
$mib_graphs = array(
|
||||
'sub10_sub10RadioLclTxPower',
|
||||
'sub10_sub10RadioLclRxPower',
|
||||
'sub10_sub10RadioLclVectErr',
|
||||
'sub10_sub10RadioLclLnkLoss',
|
||||
'sub10_sub10RadioLclAFER',
|
||||
'sub10RadioLclDataRate'
|
||||
);
|
||||
|
||||
unset($graph, $oids, $oid);
|
||||
|
||||
poll_mib_def($device, 'SUB10SYSTEMS-MIB:sub10Systems', 'sub10', $mib_oids, $mib_graphs, $graphs);
|
@ -1,211 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @copyright (C) 2015 Mark Gibbons
|
||||
*/
|
||||
|
||||
// Polling of AirFIBER MIB AP for Ubiquiti AirFIBER Radios
|
||||
//
|
||||
// UBNT-AirFIBER-MIB
|
||||
echo ' UBNT-AirFIBER-MIB ';
|
||||
|
||||
// $mib_oids (oidindex,dsname,dsdescription,dstype)
|
||||
$mib_oids = array(
|
||||
'txFrequency' => array(
|
||||
'1',
|
||||
'txFrequency',
|
||||
'Tx Frequency',
|
||||
'GAUGE',
|
||||
),
|
||||
'rxFrequency' => array(
|
||||
'1',
|
||||
'rxFrequency',
|
||||
'Rx Frequency',
|
||||
'GAUGE',
|
||||
),
|
||||
'txPower' => array(
|
||||
'1',
|
||||
'txPower',
|
||||
'Tx Power',
|
||||
'GAUGE',
|
||||
),
|
||||
'radioLinkDistM' => array(
|
||||
'1',
|
||||
'radioLinkDistM',
|
||||
'Link Distance',
|
||||
'GAUGE',
|
||||
),
|
||||
'rxCapacity' => array(
|
||||
'1',
|
||||
'rxCapacity',
|
||||
'Rx Capacity',
|
||||
'GAUGE',
|
||||
),
|
||||
'txCapacity' => array(
|
||||
'1',
|
||||
'txCapacity',
|
||||
'Tx Capacity',
|
||||
'GAUGE',
|
||||
),
|
||||
'radio0TempC' => array(
|
||||
'1',
|
||||
'radio0TempC',
|
||||
'Radio 0 Temp',
|
||||
'GAUGE',
|
||||
),
|
||||
'radio1TempC' => array(
|
||||
'1',
|
||||
'radio1TempC',
|
||||
'Radio 1 Temp',
|
||||
'GAUGE',
|
||||
),
|
||||
// above here is duplicated in wireless
|
||||
'txOctetsOK' => array(
|
||||
'1',
|
||||
'txOctetsOK',
|
||||
'Tx Octets OK',
|
||||
'COUNTER',
|
||||
),
|
||||
'rxOctetsOK' => array(
|
||||
'1',
|
||||
'rxOctetsOK',
|
||||
'Rx Octets OK',
|
||||
'COUNTER',
|
||||
),
|
||||
'rxValidUnicastFrames' => array(
|
||||
'1',
|
||||
'rxValUnicastFrms',
|
||||
'TODOa',
|
||||
'COUNTER',
|
||||
),
|
||||
'rxValidMulticastFrames' => array(
|
||||
'1',
|
||||
'rxValMulticastFrms',
|
||||
'TODOa',
|
||||
'COUNTER',
|
||||
),
|
||||
'rxValidBroadcastFrames' => array(
|
||||
'1',
|
||||
'rxValBroadcastFrms',
|
||||
'TODO',
|
||||
'COUNTER',
|
||||
),
|
||||
'txValidUnicastFrames' => array(
|
||||
'1',
|
||||
'txValUnicastFrms',
|
||||
'TODO',
|
||||
'COUNTER',
|
||||
),
|
||||
'txValidMulticastFrames' => array(
|
||||
'1',
|
||||
'txValMulticastFrms',
|
||||
'TODO',
|
||||
'COUNTER',
|
||||
),
|
||||
'txValidBroadcastFrames' => array(
|
||||
'1',
|
||||
'txValBroadcastFrms',
|
||||
'TODO',
|
||||
'COUNTER',
|
||||
),
|
||||
'rxTotalOctets' => array(
|
||||
'1',
|
||||
'rxTotalOctets',
|
||||
'TODO',
|
||||
'COUNTER',
|
||||
),
|
||||
'rxTotalFrames' => array(
|
||||
'1',
|
||||
'rxTotalFrms',
|
||||
'TODO',
|
||||
'COUNTER',
|
||||
),
|
||||
'rx64BytePackets' => array(
|
||||
'1',
|
||||
'rx64BytePkts',
|
||||
'TODO',
|
||||
'COUNTER',
|
||||
),
|
||||
'rx65-127BytePackets' => array(
|
||||
'1',
|
||||
'rx65-127BytePkts',
|
||||
'TODO',
|
||||
'COUNTER',
|
||||
),
|
||||
'rx128-255BytePackets' => array(
|
||||
'1',
|
||||
'rx128-255BytePkts',
|
||||
'TODO',
|
||||
'COUNTER',
|
||||
),
|
||||
'rx256-511BytePackets' => array(
|
||||
'1',
|
||||
'rx256-511BytePkts',
|
||||
'TODO',
|
||||
'COUNTER',
|
||||
),
|
||||
'rx512-1023BytePackets' => array(
|
||||
'1',
|
||||
'rx512-1023BytePkts',
|
||||
'TODO',
|
||||
'COUNTER',
|
||||
),
|
||||
'rx1024-1518BytesPackets' => array(
|
||||
'1',
|
||||
'rx1024-1518BytePkts',
|
||||
'TODO',
|
||||
'COUNTER',
|
||||
),
|
||||
'rx1519PlusBytePackets' => array(
|
||||
'1',
|
||||
'rx1519PlusBytePkts',
|
||||
'TODO',
|
||||
'COUNTER',
|
||||
),
|
||||
'txoctetsAll' => array(
|
||||
'1',
|
||||
'txoctetsAll',
|
||||
'TODO',
|
||||
'COUNTER',
|
||||
),
|
||||
'txpktsAll' => array(
|
||||
'1',
|
||||
'txpktsAll',
|
||||
'TODO',
|
||||
'COUNTER',
|
||||
),
|
||||
'rxoctetsAll' => array(
|
||||
'1',
|
||||
'rxoctetsAll',
|
||||
'TODO',
|
||||
'COUNTER',
|
||||
),
|
||||
'rxpktsAll' => array(
|
||||
'1',
|
||||
'rxpktsAll',
|
||||
'TODO',
|
||||
'COUNTER',
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
$mib_graphs = array(
|
||||
'ubnt_airfiber_RadioFreqs',
|
||||
'ubnt_airfiber_TxPower',
|
||||
'ubnt_airfiber_LinkDist',
|
||||
'ubnt_airfiber_Capacity',
|
||||
'ubnt_airfiber_RadioTemp',
|
||||
'AF1',
|
||||
'AF2',
|
||||
'AF3',
|
||||
'AF4',
|
||||
'AF5',
|
||||
'ubnt_airfiber_RFTotOctetsTx',
|
||||
'ubnt_airfiber_RFTotPktsTx',
|
||||
'ubnt_airfiber_RFTotOctetsRx',
|
||||
'ubnt_airfiber_RFTotPktsRx',
|
||||
);
|
||||
|
||||
unset($graph, $oids, $oid);
|
||||
|
||||
poll_mib_def($device, 'UBNT-AirFIBER-MIB:UBNT', 'ubiquiti', $mib_oids, $mib_graphs, $graphs);
|
@ -50,8 +50,8 @@ if (!Str::startsWith($device['os'], array('Snom', 'asa'))) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'netstats-icmp', $tags, $fields);
|
||||
|
||||
$graphs['netstat_icmp'] = true;
|
||||
$graphs['netstat_icmp_info'] = true;
|
||||
$os->enableGraph('netstat_icmp');
|
||||
$os->enableGraph('netstat_icmp_info');
|
||||
}
|
||||
|
||||
unset($oids, $data, $rrd_def, $fields, $tags);
|
||||
|
@ -37,8 +37,8 @@ if (!Str::startsWith($device['os'], ['Snom', 'asa'])) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'netstats-ip', $tags, $fields);
|
||||
|
||||
$graphs['netstat_ip'] = true;
|
||||
$graphs['netstat_ip_frag'] = true;
|
||||
$os->enableGraph('netstat_ip');
|
||||
$os->enableGraph('netstat_ip_frag');
|
||||
|
||||
unset($rrd_def, $fields, $tags, $oid);
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ if (!Str::startsWith($device['os'], array('Snom', 'asa'))) {
|
||||
$fields[$oid] = $value;
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'netstats-ip_forward', $tags, $fields);
|
||||
$graphs['netstat_ip_forward'] = true;
|
||||
$os->enableGraph('netstat_ip_forward');
|
||||
}
|
||||
}
|
||||
unset($oid, $rrd_def, $data, $fields, $tags);
|
||||
|
@ -51,8 +51,8 @@ if ($device['os'] != 'Snom') {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'netstats-snmp', $tags, $fields);
|
||||
|
||||
$graphs['netstat_snmp'] = true;
|
||||
$graphs['netstat_snmp_pkt'] = true;
|
||||
$os->enableGraph('netstat_snmp');
|
||||
$os->enableGraph('netstat_snmp_pkt');
|
||||
}
|
||||
|
||||
unset($oids, $data, $rrd_def, $fields, $tags);
|
||||
|
@ -37,11 +37,11 @@ if (!Str::startsWith($device['os'], ['Snom', 'asa'])) {
|
||||
// Replace Segs with HC Segs if we have them.
|
||||
$fields['tcpInSegs'] = !empty($hc_data['tcpHCInSegs']) ? $hc_data['tcpHCInSegs'] : $fields['tcpInSegs'];
|
||||
$fields['tcpOutSegs'] = !empty($hc_data['tcpHCOutSegs']) ? $hc_data['tcpHCOutSegs'] : $fields['tcpOutSegs'];
|
||||
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'netstats-tcp', $tags, $fields);
|
||||
|
||||
$graphs['netstat_tcp'] = true;
|
||||
$os->enableGraph('netstat_tcp');
|
||||
|
||||
unset($rrd_def, $fields, $tags, $oid);
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ if (!Str::startsWith($device['os'], ['Snom', 'asa'])) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'netstats-udp', $tags, $fields);
|
||||
|
||||
$graphs['netstat_udp'] = true;
|
||||
$os->enableGraph('netstat_udp');
|
||||
|
||||
unset($rrd_def, $fields, $tags, $oid);
|
||||
}
|
||||
|
@ -16,5 +16,5 @@ if (is_numeric($flows)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'arbos_flows', $tags, $fields);
|
||||
|
||||
$graphs['arbos_flows'] = true;
|
||||
$os->enableGraph('arbos_flows');
|
||||
}
|
||||
|
@ -42,6 +42,6 @@ if (strcmp($device['sysObjectID'], '.1.3.6.1.4.1.15497.1.2') == 0) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'asyncos_conns', $tags, $fields);
|
||||
|
||||
$graphs['asyncos_conns'] = true;
|
||||
$os->enableGraph('asyncos_conns');
|
||||
}
|
||||
}
|
||||
|
@ -27,5 +27,5 @@ if (is_numeric($sessions)) {
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'barracuda_firewall_sessions', $tags, $fields);
|
||||
$graphs['barracuda_firewall_sessions'] = true;
|
||||
$os->enableGraph('barracuda_firewall_sessions');
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ if (is_numeric($cambiumGPSNumTrackedSat) && is_numeric($cambiumGPSNumVisibleSat)
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-epmp-gps', $tags, $fields);
|
||||
$graphs['cambium_epmp_gps'] = true;
|
||||
$os->enableGraph('cambium_epmp_gps');
|
||||
}
|
||||
|
||||
$cambiumSTAUplinkMCSMode = snmp_get($device, "cambiumSTAUplinkMCSMode.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
@ -57,7 +57,7 @@ if (is_numeric($cambiumSTAUplinkMCSMode) && is_numeric($cambiumSTADownlinkMCSMod
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-epmp-modulation', $tags, $fields);
|
||||
$graphs['cambium_epmp_modulation'] = true;
|
||||
$os->enableGraph('cambium_epmp_modulation');
|
||||
}
|
||||
|
||||
$sysNetworkEntryAttempt = snmp_get($device, "sysNetworkEntryAttempt.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
@ -75,7 +75,7 @@ if (is_numeric($sysNetworkEntryAttempt) && is_numeric($sysNetworkEntrySuccess) &
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-epmp-access', $tags, $fields);
|
||||
$graphs['cambium_epmp_access'] = true;
|
||||
$os->enableGraph('cambium_epmp_access');
|
||||
}
|
||||
|
||||
|
||||
@ -100,6 +100,6 @@ if (is_numeric($ulWLanTotalAvailableFrameTimePerSecond) && is_numeric($ulWLanTot
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-epmp-frameUtilization', $tags, $fields);
|
||||
$graphs['cambium-epmp-frameUtilization'] = true;
|
||||
$os->enableGraph('cambium-epmp-frameUtilization');
|
||||
}
|
||||
unset($multi_get_array, $ulWlanFrameUtilization, $ulWLanTotalAvailableFrameTimePerSecond, $ulWLanTotalUsedFrameTimePerSecond, $dlWlanFrameUtilization, $dlWLanTotalAvailableFrameTimePerSecond, $dlWLanTotalUsedFrameTimePerSecond);
|
||||
|
@ -85,7 +85,7 @@ if (is_numeric($data[0]['sysClientsslStatTotNativeConns']) && is_numeric($data[0
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'bigip_system_tps', $tags, $fields);
|
||||
$graphs['bigip_system_tps'] = true;
|
||||
$os->enableGraph('bigip_system_tps');
|
||||
}
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@ if (is_numeric($sessions)) {
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'fortigate_sessions', $tags, $fields);
|
||||
$graphs['fortigate_sessions'] = true;
|
||||
$os->enableGraph('fortigate_sessions');
|
||||
}
|
||||
|
||||
$cpu_usage = snmp_get($device, 'FORTINET-FORTIGATE-MIB::fgSysCpuUsage.0', '-Ovq');
|
||||
@ -38,5 +38,5 @@ if (is_numeric($cpu_usage)) {
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'fortigate_cpu', $tags, $fields);
|
||||
$graphs['fortigate_cpu'] = true;
|
||||
$os->enableGraph('fortigate_cpu');
|
||||
}
|
||||
|
@ -21,6 +21,6 @@ if ($temp_data['fmDeviceEntMode.1'] == 'fmg-faz') {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'fortios_lograte', $tags, $fields);
|
||||
$graphs['fortios_lograte'] = true;
|
||||
$os->enableGraph('fortios_lograte');
|
||||
}
|
||||
unset($temp_data);
|
||||
|
@ -15,7 +15,7 @@ if (is_numeric($srx_sess_data[0]['jnxJsSPUMonitoringCurrentFlowSession'])) {
|
||||
|
||||
data_update($device, 'junos_jsrx_spu_sessions', $tags, $fields);
|
||||
|
||||
$graphs['junos_jsrx_spu_sessions'] = true;
|
||||
$os->enableGraph('junos_jsrx_spu_sessions');
|
||||
echo ' Flow Sessions';
|
||||
unset($srx_sess_data);
|
||||
}
|
||||
|
@ -136,9 +136,9 @@ if ($device['os'] == 'netscaler') {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'netscaler-stats-tcp', $tags, $fields);
|
||||
|
||||
$graphs['netscaler_tcp_conn'] = true;
|
||||
$graphs['netscaler_tcp_bits'] = true;
|
||||
$graphs['netscaler_tcp_pkts'] = true;
|
||||
$os->enableGraph('netscaler_tcp_conn');
|
||||
$os->enableGraph('netscaler_tcp_bits');
|
||||
$os->enableGraph('netscaler_tcp_pkts');
|
||||
}//end if
|
||||
|
||||
unset($oids_gauge, $oids_counter, $oids, $data, $tags, $fields, $rrd_def, $shorten, $short_replacement);
|
||||
|
@ -35,7 +35,7 @@ $fields = array(
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'ib_dns_dyn_updates', $tags, $fields);
|
||||
$graphs['ib_dns_dyn_updates'] = true;
|
||||
$os->enableGraph('ib_dns_dyn_updates');
|
||||
|
||||
|
||||
##################
|
||||
@ -60,7 +60,7 @@ $fields = array(
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'ib_dns_performance', $tags, $fields);
|
||||
$graphs['ib_dns_performance'] = true;
|
||||
$os->enableGraph('ib_dns_performance');
|
||||
|
||||
##################
|
||||
# Create dns request return code graph
|
||||
@ -90,7 +90,7 @@ $fields = array(
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'ib_dns_request_return_codes', $tags, $fields);
|
||||
$graphs['ib_dns_request_return_codes'] = true;
|
||||
$os->enableGraph('ib_dns_request_return_codes');
|
||||
|
||||
|
||||
##################
|
||||
@ -136,4 +136,4 @@ $fields = array(
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'ib_dhcp_messages', $tags, $fields);
|
||||
$graphs['ib_dhcp_messages'] = true;
|
||||
$os->enableGraph('ib_dhcp_messages');
|
||||
|
@ -22,7 +22,7 @@ if (is_numeric($states)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pf_states', $tags, $fields);
|
||||
|
||||
$graphs['pf_states'] = true;
|
||||
$os->enableGraph('pf_states');
|
||||
}
|
||||
|
||||
if (is_numeric($searches)) {
|
||||
@ -35,7 +35,7 @@ if (is_numeric($searches)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pf_searches', $tags, $fields);
|
||||
|
||||
$graphs['pf_searches'] = true;
|
||||
$os->enableGraph('pf_searches');
|
||||
}
|
||||
|
||||
if (is_numeric($inserts)) {
|
||||
@ -48,7 +48,7 @@ if (is_numeric($inserts)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pf_inserts', $tags, $fields);
|
||||
|
||||
$graphs['pf_inserts'] = true;
|
||||
$os->enableGraph('pf_inserts');
|
||||
}
|
||||
|
||||
if (is_numeric($removals)) {
|
||||
@ -61,5 +61,5 @@ if (is_numeric($removals)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pf_removals', $tags, $fields);
|
||||
|
||||
$graphs['pf_removals'] = true;
|
||||
$os->enableGraph('pf_removals');
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ if (is_numeric($sessions)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'panos-sessions', $tags, $fields);
|
||||
|
||||
$graphs['panos_sessions'] = true;
|
||||
$os->enableGraph('panos_sessions');
|
||||
}
|
||||
|
||||
if (is_numeric($sessions_tcp)) {
|
||||
@ -38,7 +38,7 @@ if (is_numeric($sessions_tcp)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'panos-sessions-tcp', $tags, $fields);
|
||||
|
||||
$graphs['panos_sessions_tcp'] = true;
|
||||
$os->enableGraph('panos_sessions_tcp');
|
||||
}
|
||||
|
||||
if (is_numeric($sessions_udp)) {
|
||||
@ -51,7 +51,7 @@ if (is_numeric($sessions_udp)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'panos-sessions-udp', $tags, $fields);
|
||||
|
||||
$graphs['panos_sessions_udp'] = true;
|
||||
$os->enableGraph('panos_sessions_udp');
|
||||
}
|
||||
|
||||
if (is_numeric($sessions_icmp)) {
|
||||
@ -64,7 +64,7 @@ if (is_numeric($sessions_icmp)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'panos-sessions-icmp', $tags, $fields);
|
||||
|
||||
$graphs['panos_sessions_icmp'] = true;
|
||||
$os->enableGraph('panos_sessions_icmp');
|
||||
}
|
||||
|
||||
if (is_numeric($sessions_ssl)) {
|
||||
@ -77,7 +77,7 @@ if (is_numeric($sessions_ssl)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'panos-sessions-ssl', $tags, $fields);
|
||||
|
||||
$graphs['panos_sessions_ssl'] = true;
|
||||
$os->enableGraph('panos_sessions_ssl');
|
||||
}
|
||||
|
||||
if (is_numeric($sessions_sslutil)) {
|
||||
@ -90,7 +90,7 @@ if (is_numeric($sessions_sslutil)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'panos-sessions-sslutil', $tags, $fields);
|
||||
|
||||
$graphs['panos_sessions_sslutil'] = true;
|
||||
$os->enableGraph('panos_sessions_sslutil');
|
||||
}
|
||||
|
||||
if (is_numeric($activetunnels)) {
|
||||
@ -103,5 +103,5 @@ if (is_numeric($activetunnels)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'panos-activetunnels', $tags, $fields);
|
||||
|
||||
$graphs['panos_activetunnels'] = true;
|
||||
$os->enableGraph('panos_activetunnels');
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ if (is_numeric($states)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pf_states', $tags, $fields);
|
||||
|
||||
$graphs['pf_states'] = true;
|
||||
$os->enableGraph('pf_states');
|
||||
}
|
||||
|
||||
if (is_numeric($searches)) {
|
||||
@ -39,7 +39,7 @@ if (is_numeric($searches)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pf_searches', $tags, $fields);
|
||||
|
||||
$graphs['pf_searches'] = true;
|
||||
$os->enableGraph('pf_searches');
|
||||
}
|
||||
|
||||
if (is_numeric($inserts)) {
|
||||
@ -52,7 +52,7 @@ if (is_numeric($inserts)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pf_inserts', $tags, $fields);
|
||||
|
||||
$graphs['pf_inserts'] = true;
|
||||
$os->enableGraph('pf_inserts');
|
||||
}
|
||||
|
||||
if (is_numeric($removals)) {
|
||||
@ -65,7 +65,7 @@ if (is_numeric($removals)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pf_removals', $tags, $fields);
|
||||
|
||||
$graphs['pf_removals'] = true;
|
||||
$os->enableGraph('pf_removals');
|
||||
}
|
||||
|
||||
if (is_numeric($matches)) {
|
||||
@ -78,7 +78,7 @@ if (is_numeric($matches)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pf_matches', $tags, $fields);
|
||||
|
||||
$graphs['pf_matches'] = true;
|
||||
$os->enableGraph('pf_matches');
|
||||
}
|
||||
|
||||
if (is_numeric($badoffset)) {
|
||||
@ -91,7 +91,7 @@ if (is_numeric($badoffset)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pf_badoffset', $tags, $fields);
|
||||
|
||||
$graphs['pf_badoffset'] = true;
|
||||
$os->enableGraph('pf_badoffset');
|
||||
}
|
||||
|
||||
if (is_numeric($fragmented)) {
|
||||
@ -104,7 +104,7 @@ if (is_numeric($fragmented)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pf_fragmented', $tags, $fields);
|
||||
|
||||
$graphs['pf_fragmented'] = true;
|
||||
$os->enableGraph('pf_fragmented');
|
||||
}
|
||||
|
||||
if (is_numeric($short)) {
|
||||
@ -117,7 +117,7 @@ if (is_numeric($short)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pf_short', $tags, $fields);
|
||||
|
||||
$graphs['pf_short'] = true;
|
||||
$os->enableGraph('pf_short');
|
||||
}
|
||||
|
||||
if (is_numeric($normalized)) {
|
||||
@ -130,7 +130,7 @@ if (is_numeric($normalized)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pf_normalized', $tags, $fields);
|
||||
|
||||
$graphs['pf_normalized'] = true;
|
||||
$os->enableGraph('pf_normalized');
|
||||
}
|
||||
|
||||
if (is_numeric($memdropped)) {
|
||||
@ -143,5 +143,5 @@ if (is_numeric($memdropped)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pf_memdropped', $tags, $fields);
|
||||
|
||||
$graphs['pf_memdropped'] = true;
|
||||
$os->enableGraph('pf_memdropped');
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ if (is_numeric($fecInErrorsCount) && is_numeric($fecOutErrorsCount)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-errorCount', $tags, $fields);
|
||||
$graphs['canopy_generic_errorCount'] = true;
|
||||
$os->enableGraph('canopy_generic_errorCount');
|
||||
unset($rrd_filename, $fecInErrorsCount, $fecOutErrorsCount);
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ if (is_numeric($crcErrors)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-crcErrors', $tags, $fields);
|
||||
$graphs['canopy_generic_crcErrors'] = true;
|
||||
$os->enableGraph('canopy_generic_crcErrors');
|
||||
unset($crcErrors);
|
||||
}
|
||||
|
||||
@ -117,7 +117,7 @@ if (is_numeric($jitter)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-jitter', $tags, $fields);
|
||||
$graphs['canopy_generic_jitter'] = true;
|
||||
$os->enableGraph('canopy_generic_jitter');
|
||||
unset($rrd_filename, $jitter);
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ if (is_numeric($registered) && is_numeric($failed)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-regCount', $tags, $fields);
|
||||
$graphs['canopy_generic_regCount'] = true;
|
||||
$os->enableGraph('canopy_generic_regCount');
|
||||
unset($rrd_filename, $registered, $failed);
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@ if (is_numeric($visible) && is_numeric($tracked)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-gpsStats', $tags, $fields);
|
||||
$graphs['canopy_generic_gpsStats'] = true;
|
||||
$os->enableGraph('canopy_generic_gpsStats');
|
||||
unset($rrd_filename, $visible, $tracked);
|
||||
}
|
||||
|
||||
@ -176,7 +176,7 @@ if (is_numeric($dbmRadio) && is_numeric($minRadio) && is_numeric($maxRadio) && i
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-radioDbm', $tags, $fields);
|
||||
$graphs['canopy_generic_radioDbm'] = true;
|
||||
$os->enableGraph('canopy_generic_radioDbm');
|
||||
unset($rrd_filename, $dbmRadio, $minRadio, $maxRadio, $avgRadio);
|
||||
}
|
||||
|
||||
@ -192,7 +192,7 @@ if (is_numeric($horizontal) && is_numeric($vertical)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-450-linkRadioDbm', $tags, $fields);
|
||||
$graphs['canopy_generic_450_linkRadioDbm'] = true;
|
||||
$os->enableGraph('canopy_generic_450_linkRadioDbm');
|
||||
unset($rrd_filename, $horizontal, $horizontal);
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ if (is_numeric($lastLevel)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-450-powerlevel', $tags, $fields);
|
||||
$graphs['canopy_generic_450_powerlevel'] = true;
|
||||
$os->enableGraph('canopy_generic_450_powerlevel');
|
||||
unset($lastLevel);
|
||||
}
|
||||
|
||||
@ -223,7 +223,7 @@ if (is_numeric($vertical) && is_numeric($horizontal) && is_numeric($combined)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-signalHV', $tags, $fields);
|
||||
$graphs['canopy_generic_signalHV'] = true;
|
||||
$os->enableGraph('canopy_generic_signalHV');
|
||||
unset($rrd_filename, $vertical, $horizontal, $combined);
|
||||
}
|
||||
|
||||
@ -240,6 +240,6 @@ if (is_numeric($horizontal) && is_numeric($vertical)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-450-slaveHV', $tags, $fields);
|
||||
$graphs['canopy_generic_450_slaveHV'] = true;
|
||||
$os->enableGraph('canopy_generic_450_slaveHV');
|
||||
unset($rrd_filename, $horizontal, $vertical);
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ if (is_numeric($FdbAddressCount)) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'fdb_count', $tags, $fields);
|
||||
|
||||
$graphs['fdb_count'] = true;
|
||||
$os->enableGraph('fdb_count');
|
||||
|
||||
echo 'FDB Count ';
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ if (is_numeric($users)) {
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pulse_users', $tags, $fields);
|
||||
$graphs['pulse_users'] = true;
|
||||
$os->enableGraph('pulse_users');
|
||||
}
|
||||
|
||||
$sessions = snmp_get($device, 'iveConcurrentUsers.0', '-OQv', 'PULSESECURE-PSG-MIB');
|
||||
@ -41,5 +41,5 @@ if (is_numeric($sessions)) {
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'pulse_sessions', $tags, $fields);
|
||||
$graphs['pulse_sessions'] = true;
|
||||
$os->enableGraph('pulse_sessions');
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ if ($conn_half_open >= 0 && $conn_half_closed >= 0 && $conn_established >= 0 &&
|
||||
$tags = compact('rrd_def');
|
||||
|
||||
data_update($device, 'riverbed_connections', $tags, $fields);
|
||||
$graphs['riverbed_connections'] = true;
|
||||
$os->enableGraph('riverbed_connections');
|
||||
}
|
||||
|
||||
/* datastore oids
|
||||
@ -93,7 +93,7 @@ if ($datastore_hits >= 0 && $datastore_miss >= 0) {
|
||||
$tags = compact('rrd_def');
|
||||
|
||||
data_update($device, 'riverbed_datastore', $tags, $fields);
|
||||
$graphs['riverbed_datastore'] = true;
|
||||
$os->enableGraph('riverbed_datastore');
|
||||
}
|
||||
|
||||
/* optimization oids
|
||||
@ -125,7 +125,7 @@ if ($conn_optimized >= 0 && $conn_passthrough >= 0) {
|
||||
$tags = compact('rrd_def');
|
||||
|
||||
data_update($device, 'riverbed_optimization', $tags, $fields);
|
||||
$graphs['riverbed_optimization'] = true;
|
||||
$os->enableGraph('riverbed_optimization');
|
||||
}
|
||||
|
||||
/* bandwidth passthrough
|
||||
@ -163,5 +163,5 @@ if ($bw_in >= 0 && $bw_out >= 0 && $bw_total >= 0) {
|
||||
$tags = compact('rrd_def');
|
||||
|
||||
data_update($device, 'riverbed_passthrough', $tags, $fields);
|
||||
$graphs['riverbed_passthrough'] = true;
|
||||
$os->enableGraph('riverbed_passthrough');
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ if (is_numeric($leases)) {
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'routeros_leases', $tags, $fields);
|
||||
$graphs['routeros_leases'] = true;
|
||||
$os->enableGraph('routeros_leases');
|
||||
}
|
||||
|
||||
unset($leases);
|
||||
@ -38,7 +38,7 @@ if (is_numeric($pppoe_sessions)) {
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'routeros_pppoe_sessions', $tags, $fields);
|
||||
$graphs['routeros_pppoe_sessions'] = true;
|
||||
$os->enableGraph('routeros_pppoe_sessions');
|
||||
}
|
||||
|
||||
unset($pppoe_sessions);
|
||||
|
@ -22,7 +22,7 @@ if ($usage_sent >= 0 && $usage_received >= 0) {
|
||||
$rrd_def = RrdDefinition::make()
|
||||
->addDataset('usage_sent', 'GAUGE', 0)
|
||||
->addDataset('usage_received', 'GAUGE', 0);
|
||||
|
||||
|
||||
$fields = array(
|
||||
'usage_sent' => $usage_sent,
|
||||
'usage_received' => $usage_received,
|
||||
@ -30,5 +30,5 @@ if ($usage_sent >= 0 && $usage_received >= 0) {
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'rutos_2xx_mobileDataUsage', $tags, $fields);
|
||||
$graphs['rutos_2xx_mobileDataUsage'] = true;
|
||||
$os->enableGraph('rutos_2xx_mobileDataUsage');
|
||||
}
|
||||
|
@ -27,4 +27,4 @@ $fields = array(
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'screenos_sessions', $tags, $fields);
|
||||
|
||||
$graphs['screenos_sessions'] = true;
|
||||
$os->enableGraph('screenos_sessions');
|
||||
|
@ -24,7 +24,7 @@ if (is_numeric($connections)) {
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'secureplatform_sessions', $tags, $fields);
|
||||
$graphs['secureplatform_sessions'] = true;
|
||||
$os->enableGraph('secureplatform_sessions');
|
||||
}
|
||||
|
||||
unset($connections);
|
||||
|
@ -19,7 +19,7 @@ if (is_numeric($sgos[0]['sgProxyHttpClientRequestRate'])) {
|
||||
|
||||
data_update($device, 'sgos_average_requests', $tags, $fields);
|
||||
|
||||
$graphs['sgos_average_requests'] = true;
|
||||
$os->enableGraph('sgos_average_requests');
|
||||
echo ' HTTP Req Rate';
|
||||
}
|
||||
|
||||
@ -33,7 +33,7 @@ if (is_numeric($sgos[0]['sgProxyHttpClientConnections'])) {
|
||||
|
||||
data_update($device, 'sgos_client_connections', $tags, $fields);
|
||||
|
||||
$graphs['sgos_client_connections'] = true;
|
||||
$os->enableGraph('sgos_client_connections');
|
||||
echo ' Client Conn';
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ if (is_numeric($sgos[0]['sgProxyHttpServerConnections'])) {
|
||||
|
||||
data_update($device, 'sgos_server_connections', $tags, $fields);
|
||||
|
||||
$graphs['sgos_server_connections'] = true;
|
||||
$os->enableGraph('sgos_server_connections');
|
||||
echo ' Server Conn';
|
||||
}
|
||||
|
||||
@ -61,7 +61,7 @@ if (is_numeric($sgos[0]['sgProxyHttpClientConnectionsActive'])) {
|
||||
|
||||
data_update($device, 'sgos_client_connections_active', $tags, $fields);
|
||||
|
||||
$graphs['sgos_client_connections_active'] = true;
|
||||
$os->enableGraph('sgos_client_connections_active');
|
||||
echo ' Client Conn Active';
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ if (is_numeric($sgos[0]['sgProxyHttpServerConnectionsActive'])) {
|
||||
|
||||
data_update($device, 'sgos_server_connections_active', $tags, $fields);
|
||||
|
||||
$graphs['sgos_server_connections_active'] = true;
|
||||
$os->enableGraph('sgos_server_connections_active');
|
||||
echo ' Server Conn Active';
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ if (is_numeric($sgos[0]['sgProxyHttpClientConnectionsIdle'])) {
|
||||
|
||||
data_update($device, 'sgos_client_connections_idle', $tags, $fields);
|
||||
|
||||
$graphs['sgos_client_connections_idle'] = true;
|
||||
$os->enableGraph('sgos_client_connections_idle');
|
||||
echo ' Client Conne Idle';
|
||||
}
|
||||
|
||||
@ -103,6 +103,6 @@ if (is_numeric($sgos[0]['sgProxyHttpServerConnectionsIdle'])) {
|
||||
|
||||
data_update($device, 'sgos_server_connections_idle', $tags, $fields);
|
||||
|
||||
$graphs['sgos_server_connections_idle'] = true;
|
||||
$os->enableGraph('sgos_server_connections_idle');
|
||||
echo ' Server Conn Idle';
|
||||
}
|
||||
|
@ -29,5 +29,5 @@ if (is_numeric($data)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'sonicwall_sessions', $tags, $fields);
|
||||
$graphs['sonicwall_sessions'] = true;
|
||||
$os->enableGraph('sonicwall_sessions');
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ if (is_numeric($cmtotal)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'topvision_cmtotal', $tags, $fields);
|
||||
$graphs['topvision_cmtotal'] = true;
|
||||
$os->enableGraph('topvision_cmtotal');
|
||||
}
|
||||
|
||||
if (is_numeric($cmreg)) {
|
||||
@ -35,7 +35,7 @@ if (is_numeric($cmreg)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'topvision_cmreg', $tags, $fields);
|
||||
$graphs['topvision_cmreg'] = true;
|
||||
$os->enableGraph('topvision_cmreg');
|
||||
}
|
||||
|
||||
if (is_numeric($cmoffline)) {
|
||||
@ -45,5 +45,5 @@ if (is_numeric($cmoffline)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'topvision_cmoffline', $tags, $fields);
|
||||
$graphs['topvision_cmoffline'] = true;
|
||||
$os->enableGraph('topvision_cmoffline');
|
||||
}
|
||||
|
@ -37,5 +37,5 @@ if (is_numeric($connections)) {
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'waas_cwotfostatsactiveoptconn', $tags, $fields);
|
||||
$graphs['waas_cwotfostatsactiveoptconn'] = true;
|
||||
$os->enableGraph('waas_cwotfostatsactiveoptconn');
|
||||
}
|
||||
|
@ -16,5 +16,5 @@ if (is_numeric($sessions)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'zywall-sessions', $tags, $fields);
|
||||
$graphs['zywall_sessions'] = true;
|
||||
$os->enableGraph('zywall_sessions');
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ if (is_numeric($ss['ssCpuRawUser']) && is_numeric($ss['ssCpuRawNice']) && is_num
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'ucd_cpu', $tags, $fields);
|
||||
|
||||
$graphs['ucd_cpu'] = true;
|
||||
$os->enableGraph('ucd_cpu');
|
||||
}
|
||||
|
||||
// This is how we'll collect in the future, start now so people don't have zero data.
|
||||
@ -86,33 +86,33 @@ foreach ($collect_oids as $oid) {
|
||||
$tags = compact('oid', 'rrd_name', 'rrd_def');
|
||||
data_update($device, 'ucd_cpu', $tags, $fields);
|
||||
|
||||
$graphs['ucd_cpu'] = true;
|
||||
$os->enableGraph('ucd_cpu');
|
||||
}
|
||||
}
|
||||
|
||||
// Set various graphs if we've seen the right OIDs.
|
||||
if (is_numeric($ss['ssRawSwapIn'])) {
|
||||
$graphs['ucd_swap_io'] = true;
|
||||
$os->enableGraph('ucd_swap_io');
|
||||
}
|
||||
|
||||
if (is_numeric($ss['ssIORawSent'])) {
|
||||
$graphs['ucd_io'] = true;
|
||||
$os->enableGraph('ucd_io');
|
||||
}
|
||||
|
||||
if (is_numeric($ss['ssRawContexts'])) {
|
||||
$graphs['ucd_contexts'] = true;
|
||||
$os->enableGraph('ucd_contexts');
|
||||
}
|
||||
|
||||
if (is_numeric($ss['ssRawInterrupts'])) {
|
||||
$graphs['ucd_interrupts'] = true;
|
||||
$os->enableGraph('ucd_interrupts');
|
||||
}
|
||||
|
||||
if (is_numeric($ss['ssCpuRawWait'])) {
|
||||
$graphs['ucd_io_wait'] = true;
|
||||
$os->enableGraph('ucd_io_wait');
|
||||
}
|
||||
|
||||
if (is_numeric($ss['ssCpuRawSteal'])) {
|
||||
$graphs['ucd_cpu_steal'] = true;
|
||||
$os->enableGraph('ucd_cpu_steal');
|
||||
}
|
||||
|
||||
// #
|
||||
@ -132,7 +132,7 @@ if (is_numeric($ss['ssCpuRawSteal'])) {
|
||||
|
||||
$snmpdata = snmp_get_multi($device, ['memTotalSwap.0', 'memAvailSwap.0', 'memTotalReal.0', 'memAvailReal.0', 'memTotalFree.0', 'memShared.0', 'memBuffer.0', 'memCached.0'], '-OQUs', 'UCD-SNMP-MIB');
|
||||
if (is_array($snmpdata[0])) {
|
||||
list($memTotalSwap, $memAvailSwap, $memTotalReal, $memAvailReal, $memTotalFree, $memShared, $memBuffer, $memCached) = $snmpdata[0];
|
||||
[$memTotalSwap, $memAvailSwap, $memTotalReal, $memAvailReal, $memTotalFree, $memShared, $memBuffer, $memCached] = $snmpdata[0];
|
||||
foreach (array_keys($snmpdata[0]) as $key) {
|
||||
$$key = $snmpdata[0][$key];
|
||||
}
|
||||
@ -165,7 +165,7 @@ if (is_numeric($memTotalReal) && is_numeric($memAvailReal) && is_numeric($memTot
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'ucd_mem', $tags, $fields);
|
||||
|
||||
$graphs['ucd_memory'] = true;
|
||||
$os->enableGraph('ucd_memory');
|
||||
}
|
||||
|
||||
//
|
||||
@ -191,7 +191,7 @@ if (is_numeric($load_raw[2]['laLoadInt'])) {
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'ucd_load', $tags, $fields);
|
||||
|
||||
$graphs['ucd_load'] = 'TRUE';
|
||||
$os->enableGraph('ucd_load');
|
||||
}
|
||||
|
||||
unset($ss, $load_raw, $snmpdata);
|
||||
|
@ -47,7 +47,7 @@ if ($device['os_group'] == 'unix' || $device['os'] == 'windows') {
|
||||
);
|
||||
data_update($device, 'agent', $tags, $fields);
|
||||
|
||||
$graphs['agent'] = true;
|
||||
$os->enableGraph('agent');
|
||||
|
||||
$agentapps = array(
|
||||
"apache",
|
||||
|
@ -21,7 +21,7 @@ use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
// $tags = compact('rrd_def');
|
||||
// data_update($device, 'cambium-250-transmitPower', $tags, $fields);
|
||||
// $graphs['cambium_250_transmitPower'] = true;
|
||||
// $os->enableGraph('cambium_250_transmitPower');
|
||||
// }
|
||||
|
||||
// $receivePower = snmp_get($device, "receivePower.0", "-Ovqn", "CAMBIUM-PTP250-MIB");
|
||||
@ -37,7 +37,7 @@ use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
// $tags = compact('rrd_def');
|
||||
// data_update($device, 'cambium-250-receivePower', $tags, $fields);
|
||||
// $graphs['cambium_250_receivePower'] = true;
|
||||
// $os->enableGraph('cambium_250_receivePower');
|
||||
// }
|
||||
|
||||
$txModulation = snmp_get($device, ".1.3.6.1.4.1.17713.250.5.9.0", "-Ovqn", "");
|
||||
@ -53,7 +53,7 @@ if (is_numeric($txModulation) && is_numeric($rxModulation)) {
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-250-modulationMode', $tags, $fields);
|
||||
$graphs['cambium_250_modulationMode'] = true;
|
||||
$os->enableGraph('cambium_250_modulationMode');
|
||||
}
|
||||
|
||||
// $receiveDataRate = snmp_get($device, "receiveDataRate.0", "-Ovqn", "CAMBIUM-PTP250-MIB");
|
||||
@ -72,7 +72,7 @@ if (is_numeric($txModulation) && is_numeric($rxModulation)) {
|
||||
|
||||
// $tags = compact('rrd_def');
|
||||
// data_update($device, 'cambium-250-dataRate', $tags, $fields);
|
||||
// $graphs['cambium_250_dataRate'] = true;
|
||||
// $os->enableGraph('cambium_250_dataRate');
|
||||
// }
|
||||
|
||||
$ssr = snmp_get($device, "signalStrengthRatio.0", "-Ovqn", "CAMBIUM-PTP250-MIB");
|
||||
@ -84,5 +84,5 @@ if (is_numeric($ssr)) {
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-250-ssr', $tags, $fields);
|
||||
$graphs['cambium_250_ssr'] = true;
|
||||
$os->enableGraph('cambium_250_ssr');
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ use LibreNMS\RRD\RrdDefinition;
|
||||
// );
|
||||
// $tags = compact('rrd_def');
|
||||
// data_update($device, 'cambium-650-transmitPower', $tags, $fields);
|
||||
// $graphs['cambium_650_transmitPower'] = true;
|
||||
// $os->enableGraph('cambium_650_transmitPower');
|
||||
// }
|
||||
|
||||
// $rawReceivePower = snmp_get($device, "rawReceivePower.0", "-Ovqn", "CAMBIUM-PTP650-MIB");
|
||||
@ -30,7 +30,7 @@ use LibreNMS\RRD\RrdDefinition;
|
||||
// );
|
||||
// $tags = compact('rrd_def');
|
||||
// data_update($device, 'cambium-650-rawReceivePower', $tags, $fields);
|
||||
// $graphs['cambium_650_rawReceivePower'] = true;
|
||||
// $os->enableGraph('cambium_650_rawReceivePower');
|
||||
// }
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ if (is_numeric($txModulation) && is_numeric($rxModulation)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-650-modulationMode', $tags, $fields);
|
||||
$graphs['cambium_650_modulationMode'] = true;
|
||||
$os->enableGraph('cambium_650_modulationMode');
|
||||
}
|
||||
|
||||
// $receiveDataRate = snmp_get($device, "receiveDataRate.0", "-Ovqn", "CAMBIUM-PTP650-MIB");
|
||||
@ -64,7 +64,7 @@ if (is_numeric($txModulation) && is_numeric($rxModulation)) {
|
||||
// );
|
||||
// $tags = compact('rrd_def');
|
||||
// data_update($device, 'cambium-650-dataRate', $tags, $fields);
|
||||
// $graphs['cambium_650_dataRate'] = true;
|
||||
// $os->enableGraph('cambium_650_dataRate');
|
||||
// }
|
||||
|
||||
$ssr = snmp_get($device, "signalStrengthRatio.0", "-Ovqn", "CAMBIUM-PTP650-MIB");
|
||||
@ -75,7 +75,7 @@ if (is_numeric($ssr)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-650-ssr', $tags, $fields);
|
||||
$graphs['cambium_650_ssr'] = true;
|
||||
$os->enableGraph('cambium_650_ssr');
|
||||
}
|
||||
|
||||
// $gps = snmp_get($device, "tDDSynchronizationStatus.0", "-Ovqn", "CAMBIUM-PTP650-MIB");
|
||||
@ -107,5 +107,5 @@ if (is_numeric($ssr)) {
|
||||
// );
|
||||
// $tags = compact('rrd_def');
|
||||
// data_update($device, 'cambium-650-gps', $tags, $fields);
|
||||
// $graphs['cambium_650_gps'] = true;
|
||||
// $os->enableGraph('cambium_650_gps');
|
||||
// }
|
||||
|
@ -20,7 +20,7 @@ use LibreNMS\RRD\RrdDefinition;
|
||||
// );
|
||||
// $tags = compact('rrd_def');
|
||||
// data_update($device, 'cambium-epmp-RFStatus', $tags, $fields);
|
||||
// $graphs['cambium_epmp_RFStatus'] = true;
|
||||
// $os->enableGraph('cambium_epmp_RFStatus');
|
||||
// }
|
||||
|
||||
$cambiumGPSNumTrackedSat = snmp_get($device, "cambiumGPSNumTrackedSat.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
@ -35,7 +35,7 @@ if (is_numeric($cambiumGPSNumTrackedSat) && is_numeric($cambiumGPSNumVisibleSat)
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-epmp-gps', $tags, $fields);
|
||||
$graphs['cambium_epmp_gps'] = true;
|
||||
$os->enableGraph('cambium_epmp_gps');
|
||||
}
|
||||
|
||||
$cambiumSTAUplinkMCSMode = snmp_get($device, "cambiumSTAUplinkMCSMode.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
@ -50,7 +50,7 @@ if (is_numeric($cambiumSTAUplinkMCSMode) && is_numeric($cambiumSTADownlinkMCSMod
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-epmp-modulation', $tags, $fields);
|
||||
$graphs['cambium_epmp_modulation'] = true;
|
||||
$os->enableGraph('cambium_epmp_modulation');
|
||||
}
|
||||
|
||||
// $registeredSM = snmp_get($device, "cambiumAPNumberOfConnectedSTA.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
@ -61,7 +61,7 @@ if (is_numeric($cambiumSTAUplinkMCSMode) && is_numeric($cambiumSTADownlinkMCSMod
|
||||
// );
|
||||
// $tags = compact('rrd_def');
|
||||
// data_update($device, 'cambium-epmp-registeredSM', $tags, $fields);
|
||||
// $graphs['cambium_epmp_registeredSM'] = true;
|
||||
// $os->enableGraph('cambium_epmp_registeredSM');
|
||||
// }
|
||||
|
||||
$sysNetworkEntryAttempt = snmp_get($device, "sysNetworkEntryAttempt.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
@ -79,7 +79,7 @@ if (is_numeric($sysNetworkEntryAttempt) && is_numeric($sysNetworkEntrySuccess) &
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-epmp-access', $tags, $fields);
|
||||
$graphs['cambium_epmp_access'] = true;
|
||||
$os->enableGraph('cambium_epmp_access');
|
||||
}
|
||||
|
||||
$gpsSync = snmp_get($device, "cambiumEffectiveSyncSource.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
@ -90,7 +90,7 @@ if (is_numeric($gpsSync)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-epmp-gpsSync', $tags, $fields);
|
||||
$graphs['cambium_epmp_gpsSync'] = true;
|
||||
$os->enableGraph('cambium_epmp_gpsSync');
|
||||
}
|
||||
|
||||
// $freq = snmp_get($device, "cambiumSTAConnectedRFFrequency.0", "-Ovqn", "CAMBIUM-PMP80211-MIB");
|
||||
@ -101,7 +101,7 @@ if (is_numeric($gpsSync)) {
|
||||
// );
|
||||
// $tags = compact('rrd_def');
|
||||
// data_update($device, 'cambium-epmp-freq', $tags, $fields);
|
||||
// $graphs['cambium_epmp_freq'] = true;
|
||||
// $os->enableGraph('cambium_epmp_freq');
|
||||
// }
|
||||
|
||||
$multi_get_array = snmp_get_multi($device, ['ulWLanTotalAvailableFrameTimePerSecond.0', 'ulWLanTotalUsedFrameTimePerSecond.0', 'dlWLanTotalAvailableFrameTimePerSecond.0', 'dlWLanTotalUsedFrameTimePerSecond.0'], "-OQU", "CAMBIUM-PMP80211-MIB");
|
||||
@ -125,6 +125,6 @@ if (is_numeric($ulWLanTotalAvailableFrameTimePerSecond) && is_numeric($ulWLanTot
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-epmp-frameUtilization', $tags, $fields);
|
||||
$graphs['cambium-epmp-frameUtilization'] = true;
|
||||
$os->enableGraph('cambium-epmp-frameUtilization');
|
||||
}
|
||||
unset($multi_get_array, $ulWlanFrameUtilization, $ulWLanTotalAvailableFrameTimePerSecond, $ulWLanTotalUsedFrameTimePerSecond, $dlWlanFrameUtilization, $dlWLanTotalAvailableFrameTimePerSecond, $dlWLanTotalUsedFrameTimePerSecond);
|
||||
|
@ -23,7 +23,7 @@ if (strstr($hardware, 'CMM') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-generic-errorCount', $tags, $fields);
|
||||
$graphs['cambium_generic_errorCount'] = true;
|
||||
$os->enableGraph('cambium_generic_errorCount');
|
||||
unset($rrd_filename, $fecInErrorsCount, $fecOutErrorsCount);
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ if (strstr($hardware, 'CMM') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-generic-crcErrors', $tags, $fields);
|
||||
$graphs['cambium_generic_crcErrors'] = true;
|
||||
$os->enableGraph('cambium_generic_crcErrors');
|
||||
}
|
||||
|
||||
$vertical = str_replace('"', "", snmp_get($device, ".1.3.6.1.4.1.161.19.3.2.2.117.0", "-Ovqn", ""));
|
||||
@ -53,7 +53,7 @@ if (strstr($hardware, 'CMM') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-generic-signalHV', $tags, $fields);
|
||||
$graphs['cambium_generic_signalHV'] = true;
|
||||
$os->enableGraph('cambium_generic_signalHV');
|
||||
unset($rrd_filename, $vertical, $horizontal, $combined);
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ if (strstr($hardware, 'CMM') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-generic-rssi', $tags, $fields);
|
||||
$graphs['cambium_generic_rssi'] = true;
|
||||
$os->enableGraph('cambium_generic_rssi');
|
||||
unset($rrd_filename, $rssi);
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ if (strstr($hardware, 'CMM') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-generic-jitter', $tags, $fields);
|
||||
$graphs['cambium_generic_jitter'] = true;
|
||||
$os->enableGraph('cambium_generic_jitter');
|
||||
unset($rrd_filename, $jitter);
|
||||
}
|
||||
|
||||
@ -93,7 +93,7 @@ if (strstr($hardware, 'CMM') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-generic-450-slaveHV', $tags, $fields);
|
||||
$graphs['cambium_generic_450_slaveHV'] = true;
|
||||
$os->enableGraph('cambium_generic_450_slaveHV');
|
||||
unset($rrd_filename, $horizontal, $vertical);
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ if (strstr($hardware, 'CMM') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-generic-450-slaveSSR', $tags, $fields);
|
||||
$graphs['cambium_generic_450_slaveSSR'] = true;
|
||||
$os->enableGraph('cambium_generic_450_slaveSSR');
|
||||
unset($rrd_filename, $ssr);
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ if (strstr($hardware, 'CMM') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-generic-450-slaveSNR', $tags, $fields);
|
||||
$graphs['cambium_generic_450_slaveSNR'] = true;
|
||||
$os->enableGraph('cambium_generic_450_slaveSNR');
|
||||
unset($rrd_filename, $horizontal, $vertical);
|
||||
}
|
||||
}
|
||||
@ -142,7 +142,7 @@ if (strstr($hardware, 'AP') || strstr($hardware, 'Master') || strstr($hardware,
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-generic-whispGPSStats', $tags, $fields);
|
||||
$graphs['cambium_generic_whispGPSStats'] = true;
|
||||
$os->enableGraph('cambium_generic_whispGPSStats');
|
||||
unset($rrd_filename, $gpsStatus);
|
||||
}
|
||||
|
||||
@ -158,7 +158,7 @@ if (strstr($hardware, 'AP') || strstr($hardware, 'Master') || strstr($hardware,
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-generic-gpsStats', $tags, $fields);
|
||||
$graphs['cambium_generic_gpsStats'] = true;
|
||||
$os->enableGraph('cambium_generic_gpsStats');
|
||||
unset($rrd_filename, $visible, $tracked);
|
||||
}
|
||||
}
|
||||
@ -171,10 +171,10 @@ if (is_numeric($lastLevel)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-generic-450-powerlevel', $tags, $fields);
|
||||
$graphs['cambium_generic_450_powerlevel'] = true;
|
||||
$os->enableGraph('cambium_generic_450_powerlevel');
|
||||
unset($lastLevel);
|
||||
}
|
||||
|
||||
|
||||
if (strstr($version, 'AP') == false) {
|
||||
$horizontal = str_replace('"', "", snmp_get($device, "linkRadioDbmHorizontal.2", "-Ovqn", "WHISP-APS-MIB"));
|
||||
$vertical = str_replace('"', "", snmp_get($device, "linkRadioDbmVertical.2", "-Ovqn", "WHISP-APS-MIB"));
|
||||
@ -188,7 +188,7 @@ if (strstr($version, 'AP') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-generic-450-linkRadioDbm', $tags, $fields);
|
||||
$graphs['cambium_generic_450_linkRadioDbm'] = true;
|
||||
$os->enableGraph('cambium_generic_450_linkRadioDbm');
|
||||
unset($rrd_filename, $horizontal, $horizontal);
|
||||
}
|
||||
|
||||
@ -204,7 +204,7 @@ if (strstr($version, 'AP') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-generic-450-ptpSNR', $tags, $fields);
|
||||
$graphs['cambium_generic_450_ptpSNR'] = true;
|
||||
$os->enableGraph('cambium_generic_450_ptpSNR');
|
||||
unset($rrd_filename, $horizontal, $horizontal);
|
||||
}
|
||||
|
||||
@ -216,7 +216,7 @@ if (strstr($version, 'AP') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-generic-450-masterSSR', $tags, $fields);
|
||||
$graphs['cambium_generic_450_masterSSR'] = true;
|
||||
$os->enableGraph('cambium_generic_450_masterSSR');
|
||||
unset($rrd_filename, $ssr);
|
||||
}
|
||||
|
||||
@ -240,7 +240,7 @@ if (strstr($version, 'AP') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-generic-radioDbm', $tags, $fields);
|
||||
$graphs['cambium_generic_radioDbm'] = true;
|
||||
$os->enableGraph('cambium_generic_radioDbm');
|
||||
unset($rrd_filename, $dbmRadio, $minRadio, $maxRadio, $avgRadio);
|
||||
}
|
||||
}
|
||||
@ -260,10 +260,10 @@ if (strstr($version, 'AP')) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-generic-regCount', $tags, $fields);
|
||||
$graphs['cambium_generic_regCount'] = true;
|
||||
$os->enableGraph('cambium_generic_regCount');
|
||||
unset($rrd_filename, $registered, $failed);
|
||||
}
|
||||
|
||||
|
||||
$freq = str_replace('"', "", snmp_get($device, "currentRadioFreqCarrier.0", "-Ovqn", "WHISP-APS-MIB"));
|
||||
if (is_numeric($freq)) {
|
||||
$rrd_def = RrdDefinition::make()->addDataset('freq', 'GAUGE', 0, 100000);
|
||||
@ -277,7 +277,7 @@ if (strstr($version, 'AP')) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cambium-generic-freq', $tags, $fields);
|
||||
$graphs['cambium_generic_freq'] = true;
|
||||
$os->enableGraph('cambium_generic_freq');
|
||||
unset($rrd_filename, $freq);
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ if (strstr($hardware, 'CMM') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-errorCount', $tags, $fields);
|
||||
$graphs['canopy_generic_errorCount'] = true;
|
||||
$os->enableGraph('canopy_generic_errorCount');
|
||||
unset($rrd_filename, $fecInErrorsCount, $fecOutErrorsCount);
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ if (strstr($hardware, 'CMM') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-crcErrors', $tags, $fields);
|
||||
$graphs['canopy_generic_crcErrors'] = true;
|
||||
$os->enableGraph('canopy_generic_crcErrors');
|
||||
}
|
||||
|
||||
$vertical = str_replace('"', "", snmp_get($device, ".1.3.6.1.4.1.161.19.3.2.2.117.0", "-Ovqn", ""));
|
||||
@ -54,7 +54,7 @@ if (strstr($hardware, 'CMM') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-signalHV', $tags, $fields);
|
||||
$graphs['canopy_generic_signalHV'] = true;
|
||||
$os->enableGraph('canopy_generic_signalHV');
|
||||
unset($rrd_filename, $vertical, $horizontal, $combined);
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ if (strstr($hardware, 'CMM') == false) {
|
||||
// );
|
||||
// $tags = compact('rrd_def');
|
||||
// data_update($device, 'canopy-generic-rssi', $tags, $fields);
|
||||
// $graphs['canopy_generic_rssi'] = true;
|
||||
// $os->enableGraph('canopy_generic_rssi');
|
||||
// unset($rrd_filename, $rssi);
|
||||
// }
|
||||
|
||||
@ -79,7 +79,7 @@ if (strstr($hardware, 'CMM') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-jitter', $tags, $fields);
|
||||
$graphs['canopy_generic_jitter'] = true;
|
||||
$os->enableGraph('canopy_generic_jitter');
|
||||
unset($rrd_filename, $jitter);
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ if (strstr($hardware, 'CMM') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-450-slaveHV', $tags, $fields);
|
||||
$graphs['canopy_generic_450_slaveHV'] = true;
|
||||
$os->enableGraph('canopy_generic_450_slaveHV');
|
||||
unset($rrd_filename, $horizontal, $vertical);
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ if (strstr($hardware, 'CMM') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-450-slaveSSR', $tags, $fields);
|
||||
$graphs['canopy_generic_450_slaveSSR'] = true;
|
||||
$os->enableGraph('canopy_generic_450_slaveSSR');
|
||||
unset($rrd_filename, $ssr);
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ if (strstr($hardware, 'CMM') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-450-slaveSNR', $tags, $fields);
|
||||
$graphs['canopy_generic_450_slaveSNR'] = true;
|
||||
$os->enableGraph('canopy_generic_450_slaveSNR');
|
||||
unset($rrd_filename, $horizontal, $vertical);
|
||||
}
|
||||
}
|
||||
@ -146,7 +146,7 @@ if (strstr($hardware, 'AP') || strstr($hardware, 'Master') || strstr($hardware,
|
||||
// );
|
||||
// $tags = compact('rrd_def');
|
||||
// data_update($device, 'canopy-generic-whispGPSStats', $tags, $fields);
|
||||
// $graphs['canopy_generic_whispGPSStats'] = true;
|
||||
// $os->enableGraph('canopy_generic_whispGPSStats');
|
||||
// unset($rrd_filename, $gpsStatus);
|
||||
// }
|
||||
|
||||
@ -162,7 +162,7 @@ if (strstr($hardware, 'AP') || strstr($hardware, 'Master') || strstr($hardware,
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-gpsStats', $tags, $fields);
|
||||
$graphs['canopy_generic_gpsStats'] = true;
|
||||
$os->enableGraph('canopy_generic_gpsStats');
|
||||
unset($rrd_filename, $visible, $tracked);
|
||||
}
|
||||
}
|
||||
@ -180,7 +180,7 @@ if (strstr($version, 'AP') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-450-linkRadioDbm', $tags, $fields);
|
||||
$graphs['canopy_generic_450_linkRadioDbm'] = true;
|
||||
$os->enableGraph('canopy_generic_450_linkRadioDbm');
|
||||
unset($rrd_filename, $horizontal, $horizontal);
|
||||
}
|
||||
|
||||
@ -192,10 +192,10 @@ if (strstr($version, 'AP') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-450-powerlevel', $tags, $fields);
|
||||
$graphs['canopy_generic_450_powerlevel'] = true;
|
||||
$os->enableGraph('canopy_generic_450_powerlevel');
|
||||
unset($lastLevel);
|
||||
}
|
||||
|
||||
|
||||
// Implemented
|
||||
// $horizontal = str_replace('"', "", snmp_get($device, "signalToNoiseRatioHorizontal.2", "-Ovqn", "WHISP-APS-MIB"));
|
||||
// $vertical = str_replace('"', "", snmp_get($device, "signalToNoiseRatioVertical.2", "-Ovqn", "WHISP-APS-MIB"));
|
||||
@ -209,7 +209,7 @@ if (strstr($version, 'AP') == false) {
|
||||
// );
|
||||
// $tags = compact('rrd_def');
|
||||
// data_update($device, 'canopy-generic-450-ptpSNR', $tags, $fields);
|
||||
// $graphs['canopy_generic_450_ptpSNR'] = true;
|
||||
// $os->enableGraph('canopy_generic_450_ptpSNR');
|
||||
// unset($rrd_filename, $horizontal, $horizontal);
|
||||
// }
|
||||
|
||||
@ -221,7 +221,7 @@ if (strstr($version, 'AP') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-450-masterSSR', $tags, $fields);
|
||||
$graphs['canopy_generic_450_masterSSR'] = true;
|
||||
$os->enableGraph('canopy_generic_450_masterSSR');
|
||||
unset($rrd_filename, $ssr);
|
||||
}
|
||||
|
||||
@ -246,7 +246,7 @@ if (strstr($version, 'AP') == false) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-radioDbm', $tags, $fields);
|
||||
$graphs['canopy_generic_radioDbm'] = true;
|
||||
$os->enableGraph('canopy_generic_radioDbm');
|
||||
unset($rrd_filename, $dbmRadio, $minRadio, $maxRadio, $avgRadio);
|
||||
}
|
||||
}
|
||||
@ -261,7 +261,7 @@ if (strstr($version, 'AP')) {
|
||||
$freq = $multi_get_array[0]["WHISP-APS-MIB::currentRadioFreqCarrier"];
|
||||
$downlinkutilization = $multi_get_array[0]["WHISP-APS-MIB::frUtlLowTotalDownlinkUtilization"];
|
||||
$uplinkutilization = $multi_get_array[0]["WHISP-APS-MIB::frUtlLowTotalUplinkUtilization"];
|
||||
|
||||
|
||||
if (is_numeric($registered) && is_numeric($failed)) {
|
||||
$rrd_def = RrdDefinition::make()
|
||||
->addDataset('regCount', 'GAUGE', 0, 15000)
|
||||
@ -272,7 +272,7 @@ if (strstr($version, 'AP')) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'canopy-generic-regCount', $tags, $fields);
|
||||
$graphs['canopy_generic_regCount'] = true;
|
||||
$os->enableGraph('canopy_generic_regCount');
|
||||
unset($rrd_filename, $registered, $failed);
|
||||
}
|
||||
|
||||
@ -289,7 +289,7 @@ if (strstr($version, 'AP')) {
|
||||
// );
|
||||
// $tags = compact('rrd_def');
|
||||
// data_update($device, 'canopy-generic-freq', $tags, $fields);
|
||||
// $graphs['canopy_generic_freq'] = true;
|
||||
// $os->enableGraph('canopy_generic_freq');
|
||||
// unset($rrd_filename, $freq);
|
||||
// }
|
||||
|
||||
@ -304,7 +304,7 @@ if (strstr($version, 'AP')) {
|
||||
// );
|
||||
// $tags = compact('rrd_def');
|
||||
// data_update($device, 'canopy-generic-frameUtilization', $tags, $fields);
|
||||
// $graphs['canopy-generic-frameUtilization'] = true;
|
||||
// $os->enableGraph('canopy-generic-frameUtilization');
|
||||
// unset($rrd_filename, $downlinkutilization, $uplinkutilization);
|
||||
// }
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ if (is_numeric($rssi)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cisco-wwan-rssi', $tags, $fields);
|
||||
$graphs['cisco_wwan_rssi'] = true;
|
||||
$os->enableGraph('cisco_wwan_rssi');
|
||||
}
|
||||
|
||||
$mnc = snmp_get($device, "CISCO-WAN-3G-MIB::c3gGsmMnc.13", "-Ovqn", "CISCO-WAN-3G-MIB");
|
||||
@ -30,6 +30,6 @@ if (is_numeric($mnc)) {
|
||||
);
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'cisco-wwan-rssi', $tags, $fields);
|
||||
$graphs['cisco-wwan-mnc'] = true;
|
||||
$os->enableGraph('cisco-wwan-mnc');
|
||||
}
|
||||
unset($rrd_def, $rssi, $mnc, $fields, $tags);
|
||||
|
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
$associations=array();
|
||||
@ -27,9 +28,7 @@ if (\LibreNMS\Config::get('xirrus_disable_stations') != true) {
|
||||
$tags = compact('radio', 'rrd_name', 'rrd_def');
|
||||
data_update($device, $measurement, $tags, $fields);
|
||||
}
|
||||
$graphs['xirrus_stations'] = true;
|
||||
} else {
|
||||
$graphs['xirrus_stations'] = false;
|
||||
$os->enableGraph('xirrus_stations');
|
||||
}
|
||||
|
||||
// cleanup
|
||||
|
@ -725,58 +725,12 @@ function snmpwalk_cache_threepart_oid($device, $oid, $array, $mib = 0)
|
||||
}//end snmpwalk_cache_threepart_oid()
|
||||
|
||||
|
||||
function snmp_cache_slotport_oid($oid, $device, $array, $mib = 0)
|
||||
{
|
||||
$cmd = gen_snmpwalk_cmd($device, $oid, '-OQUs', $mib);
|
||||
$data = trim(external_exec($cmd));
|
||||
|
||||
foreach (explode("\n", $data) as $entry) {
|
||||
$entry = str_replace($oid.'.', '', $entry);
|
||||
[$slotport, $value] = explode('=', $entry, 2);
|
||||
$slotport = trim($slotport);
|
||||
$value = trim($value);
|
||||
if ($array[$slotport]['ifIndex']) {
|
||||
$ifIndex = $array[$slotport]['ifIndex'];
|
||||
$array[$ifIndex][$oid] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $array;
|
||||
}//end snmp_cache_slotport_oid()
|
||||
|
||||
|
||||
function snmp_cache_oid($oid, $device, $array, $mib = 0)
|
||||
{
|
||||
$array = snmpwalk_cache_oid($device, $oid, $array, $mib);
|
||||
return $array;
|
||||
}//end snmp_cache_oid()
|
||||
|
||||
|
||||
function snmp_cache_port_oids($oids, $port, $device, $array, $mib = 0)
|
||||
{
|
||||
$string = '';
|
||||
foreach ($oids as $oid) {
|
||||
$string .= " $oid.$port";
|
||||
}
|
||||
|
||||
$cmd = gen_snmpget_cmd($device, $string, '-Ovq', $mib);
|
||||
$data = trim(external_exec($cmd));
|
||||
|
||||
$x = 0;
|
||||
$values = explode("\n", $data);
|
||||
// echo("Caching: ifIndex $port\n");
|
||||
foreach ($oids as $oid) {
|
||||
if (!strstr($values[$x], 'at this OID')) {
|
||||
$array[$port][$oid] = $values[$x];
|
||||
}
|
||||
|
||||
$x++;
|
||||
}
|
||||
|
||||
return $array;
|
||||
}//end snmp_cache_port_oids()
|
||||
|
||||
|
||||
/**
|
||||
* generate snmp auth arguments
|
||||
* @param array $device
|
||||
@ -815,226 +769,6 @@ function snmp_gen_auth(&$device, $cmd = [], $strIndexing = null)
|
||||
return $cmd;
|
||||
}//end snmp_gen_auth()
|
||||
|
||||
|
||||
/*
|
||||
* Translate the given MIB into a PHP array. Each keyword becomes an array index.
|
||||
*
|
||||
* Example:
|
||||
* snmptranslate -Td -On -M mibs -m RUCKUS-ZD-SYSTEM-MIB RUCKUS-ZD-SYSTEM-MIB::ruckusZDSystemStatsNumSta
|
||||
* .1.3.6.1.4.1.25053.1.2.1.1.1.15.30
|
||||
* ruckusZDSystemStatsAllNumSta OBJECT-TYPE
|
||||
* -- FROM RUCKUS-ZD-SYSTEM-MIB
|
||||
* SYNTAX Unsigned32
|
||||
* MAX-ACCESS read-only
|
||||
* STATUS current
|
||||
* DESCRIPTION "Number of All client devices"
|
||||
* ::= { iso(1) org(3) dod(6) internet(1) private(4) enterprises(1) ruckusRootMIB(25053) ruckusObjects(1) ruckusZD(2) ruckusZDSystemModule(1) ruckusZDSystemMIB(1) ruckusZDSystemObjects(1)
|
||||
* ruckusZDSystemStats(15) 30 }
|
||||
*/
|
||||
function snmp_mib_parse($oid, $mib, $module, $mibdir = null, $device = array())
|
||||
{
|
||||
$fulloid = explode('.', $oid);
|
||||
$lastpart = end($fulloid);
|
||||
|
||||
$cmd = 'snmptranslate -Td -On';
|
||||
$cmd .= ' -M ' . mibdir($mibdir, $device);
|
||||
$cmd .= ' -m '.$module.' '.$module.'::';
|
||||
$cmd .= $lastpart;
|
||||
|
||||
$result = array();
|
||||
$lines = preg_split('/\n+/', trim(shell_exec($cmd)));
|
||||
foreach ($lines as $l) {
|
||||
$f = preg_split('/\s+/', trim($l));
|
||||
// first line is all numeric
|
||||
if (preg_match('/^[\d.]+$/', $f[0])) {
|
||||
$result['oid'] = $f[0];
|
||||
continue;
|
||||
}
|
||||
|
||||
// then the name of the object type
|
||||
if ($f[1] && $f[1] == 'OBJECT-TYPE') {
|
||||
$result['object_type'] = $f[0];
|
||||
continue;
|
||||
}
|
||||
|
||||
// then the other data elements
|
||||
if ($f[0] == '--' && $f[1] == 'FROM') {
|
||||
$result['module'] = $f[2];
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($f[0] == 'MAX-ACCESS') {
|
||||
$result['max_access'] = $f[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($f[0] == 'STATUS') {
|
||||
$result[strtolower($f[0])] = $f[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($f[0] == 'SYNTAX') {
|
||||
$result[strtolower($f[0])] = $f[1];
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($f[0] == 'DESCRIPTION') {
|
||||
$desc = explode('"', $l);
|
||||
if ($desc[1]) {
|
||||
$str = preg_replace('/^[\s.]*/', '', $desc[1]);
|
||||
$str = preg_replace('/[\s.]*$/', '', $str);
|
||||
$result[strtolower($f[0])] = $str;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
}//end foreach
|
||||
|
||||
// The main mib entry doesn't have any useful data in it - only return items that have the syntax specified.
|
||||
if (isset($result['syntax']) && isset($result['object_type'])) {
|
||||
$result['mib'] = $mib;
|
||||
return $result;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} // snmp_mib_parse
|
||||
|
||||
|
||||
/*
|
||||
* Walks through the given MIB module, looking for the given MIB.
|
||||
* NOTE: different from snmp walk - this doesn't touch the device.
|
||||
* NOTE: There's probably a better way to do this with snmptranslate.
|
||||
*
|
||||
* Example:
|
||||
* snmptranslate -Ts -M mibs -m RUCKUS-ZD-SYSTEM-MIB | grep ruckusZDSystemStats
|
||||
* .iso.org.dod.internet.private.enterprises.ruckusRootMIB.ruckusObjects.ruckusZD.ruckusZDSystemModule.ruckusZDSystemMIB.ruckusZDSystemObjects.ruckusZDSystemStats
|
||||
* .iso.org.dod.internet.private.enterprises.ruckusRootMIB.ruckusObjects.ruckusZD.ruckusZDSystemModule.ruckusZDSystemMIB.ruckusZDSystemObjects.ruckusZDSystemStats.ruckusZDSystemStatsNumAP
|
||||
* .iso.org.dod.internet.private.enterprises.ruckusRootMIB.ruckusObjects.ruckusZD.ruckusZDSystemModule.ruckusZDSystemMIB.ruckusZDSystemObjects.ruckusZDSystemStats.ruckusZDSystemStatsNumSta
|
||||
* ...
|
||||
*/
|
||||
|
||||
|
||||
function snmp_mib_walk($mib, $module, $mibdir = null, $device = array())
|
||||
{
|
||||
$cmd = 'snmptranslate -Ts';
|
||||
$cmd .= ' -M ' . mibdir($mibdir, $device);
|
||||
$cmd .= ' -m '.$module;
|
||||
$result = array();
|
||||
$data = preg_split('/\n+/', shell_exec($cmd));
|
||||
foreach ($data as $oid) {
|
||||
// only include oids which are part of this mib
|
||||
if (strstr($oid, $mib)) {
|
||||
$obj = snmp_mib_parse($oid, $mib, $module, $mibdir, $device);
|
||||
if ($obj) {
|
||||
$result[] = $obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $result;
|
||||
} // snmp_mib_walk
|
||||
|
||||
|
||||
function quote_column($a)
|
||||
{
|
||||
return '`'.$a.'`';
|
||||
} // quote_column
|
||||
|
||||
|
||||
function join_array($a, $b)
|
||||
{
|
||||
return quote_column($a).'='.$b;
|
||||
} // join_array
|
||||
|
||||
|
||||
/*
|
||||
* Update the given table in the database with the given row & column data.
|
||||
* @param tablename The table to update
|
||||
* @param columns An array of column names
|
||||
* @param numkeys The number of columns which are in the primary key of the table; these primary keys must be first in the list of columns
|
||||
* @param rows Row data to insert, an array of arrays with column names as the second-level keys
|
||||
*/
|
||||
function update_db_table($tablename, $columns, $numkeys, $rows)
|
||||
{
|
||||
dbBeginTransaction();
|
||||
foreach ($rows as $nothing => $obj) {
|
||||
// create a parameter list based on the columns
|
||||
$params = array();
|
||||
foreach ($columns as $column) {
|
||||
$params[] = $obj[$column];
|
||||
}
|
||||
$column_placeholders = array_fill(0, count($columns), '?');
|
||||
|
||||
// build the "ON DUPLICATE KEY" part
|
||||
$non_key_columns = array_slice($columns, $numkeys);
|
||||
$non_key_placeholders = array_slice($column_placeholders, $numkeys);
|
||||
$update_definitions = array_map("join_array", $non_key_columns, $non_key_placeholders);
|
||||
$non_key_params = array_slice($params, $numkeys);
|
||||
|
||||
$sql = 'INSERT INTO `' . $tablename . '` (' .
|
||||
implode(',', array_map("quote_column", $columns)) .
|
||||
') VALUES (' . implode(',', $column_placeholders) .
|
||||
') ON DUPLICATE KEY UPDATE ' . implode(',', $update_definitions);
|
||||
$result = dbQuery($sql, array_merge($params, $non_key_params));
|
||||
d_echo("Result: $result\n");
|
||||
}
|
||||
dbCommitTransaction();
|
||||
} // update_db_table
|
||||
|
||||
/*
|
||||
* Load the given MIB into the database.
|
||||
* @return count of objects loaded
|
||||
*/
|
||||
function snmp_mib_load($mib, $module, $included_by, $mibdir = null, $device = array())
|
||||
{
|
||||
$mibs = array();
|
||||
foreach (snmp_mib_walk($mib, $module, $mibdir, $device) as $obj) {
|
||||
$mibs[$obj['object_type']] = $obj;
|
||||
$mibs[$obj['object_type']]['included_by'] = $included_by;
|
||||
}
|
||||
d_echo($mibs);
|
||||
// NOTE: `last_modified` omitted due to being automatically maintained by MySQL
|
||||
$columns = array('module', 'mib', 'object_type', 'oid', 'syntax', 'description', 'max_access', 'status', 'included_by');
|
||||
update_db_table('mibdefs', $columns, 3, $mibs);
|
||||
return count($mibs);
|
||||
} // snmp_mib_load
|
||||
|
||||
|
||||
/*
|
||||
* Turn the given oid (name or numeric value) into a MODULE::mib name.
|
||||
* @return an array consisting of the module and mib names, or null if no matching MIB is found.
|
||||
* Example:
|
||||
* snmptranslate -m all -M mibs .1.3.6.1.4.1.8072.3.2.10 2>/dev/null
|
||||
* NET-SNMP-TC::linux
|
||||
*/
|
||||
function snmp_mib_translate($oid, $module, $mibdir = null, $device = array())
|
||||
{
|
||||
if ($module !== 'all') {
|
||||
$oid = "$module::$oid";
|
||||
}
|
||||
|
||||
// load all the MIBs looking for our object (-IR)
|
||||
$cmd = [Config::get('snmptranslate', 'snmptranslate'), '-M', mibdir($mibdir, $device), '-IR', '-m', $module, $oid];
|
||||
// ignore invalid MIBs
|
||||
$lines = preg_split('/\n+/', external_exec($cmd));
|
||||
if (empty($lines)) {
|
||||
d_echo("No results from snmptranslate\n");
|
||||
return null;
|
||||
}
|
||||
|
||||
$matches = array();
|
||||
if (!preg_match('/(.*)::(.*)/', $lines[0], $matches)) {
|
||||
d_echo("This doesn't look like a MIB: $lines[0]\n");
|
||||
return null;
|
||||
}
|
||||
|
||||
d_echo("SNMP translated: $module::$oid -> $matches[1]::$matches[2]\n");
|
||||
return array(
|
||||
$matches[1],
|
||||
$matches[2],
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* SNMP translate between numeric and textual oids
|
||||
*
|
||||
@ -1068,257 +802,6 @@ function snmp_translate($oid, $mib = 'ALL', $mibdir = null, $options = null, $de
|
||||
return trim(external_exec($cmd));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* check if the type of the oid is a numeric type, and if so,
|
||||
* return the correct RrdDefinition
|
||||
*
|
||||
* @param string $oid
|
||||
* @param array $mibdef
|
||||
* @return RrdDefinition|false
|
||||
*/
|
||||
function oid_rrd_def($oid, $mibdef)
|
||||
{
|
||||
if (!isset($mibdef[$oid])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch ($mibdef[$oid]['syntax']) {
|
||||
case 'OCTET':
|
||||
case 'IpAddress':
|
||||
return false;
|
||||
|
||||
case 'TimeTicks':
|
||||
// FIXME
|
||||
return false;
|
||||
|
||||
case 'INTEGER':
|
||||
case 'Integer32':
|
||||
return RrdDefinition::make()->addDataset('mibval', 'GAUGE');
|
||||
|
||||
case 'Counter32':
|
||||
case 'Counter64':
|
||||
return RrdDefinition::make()->addDataset('mibval', 'COUNTER', 0);
|
||||
|
||||
case 'Gauge32':
|
||||
case 'Unsigned32':
|
||||
return RrdDefinition::make()->addDataset('mibval', 'GAUGE', 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
} // oid_rrd_type
|
||||
|
||||
|
||||
/*
|
||||
* Construct a graph names for use in the database.
|
||||
* Tag each as in use on this device in &$graphs.
|
||||
* Update the database with graph definitions as needed.
|
||||
* We don't include the index in the graph name - that is handled at display time.
|
||||
*/
|
||||
function tag_graphs($mibname, $oids, $mibdef, &$graphs)
|
||||
{
|
||||
foreach ($oids as $index => $array) {
|
||||
foreach ($array as $oid => $val) {
|
||||
$graphname = $mibname.'-'.$mibdef[$oid]['shortname'];
|
||||
$graphs[$graphname] = true;
|
||||
}
|
||||
}
|
||||
} // tag_graphs
|
||||
|
||||
|
||||
/*
|
||||
* Ensure a graph_type definition exists in the database for the entities in this MIB
|
||||
*/
|
||||
function update_mib_graph_types($mibname, $oids, $mibdef, $graphs)
|
||||
{
|
||||
$seengraphs = array();
|
||||
|
||||
// Get the list of graphs currently in the database
|
||||
// FIXME: there's probably a more efficient way to do this
|
||||
foreach (dbFetch('SELECT DISTINCT `graph_subtype` FROM `graph_types` WHERE `graph_subtype` LIKE ?', array("$mibname-%")) as $graph) {
|
||||
$seengraphs[$graph['graph_subtype']] = true;
|
||||
}
|
||||
|
||||
foreach ($oids as $index => $array) {
|
||||
$i = 1;
|
||||
foreach ($array as $oid => $val) {
|
||||
$graphname = "$mibname-".$mibdef[$oid]['shortname'];
|
||||
|
||||
// add the graph if it's not in the database already
|
||||
if ($graphs[$graphname] && !$seengraphs[$graphname]) {
|
||||
// construct a graph definition based on the MIB definition
|
||||
$graphdef = array();
|
||||
$graphdef['graph_type'] = 'device';
|
||||
$graphdef['graph_subtype'] = $graphname;
|
||||
$graphdef['graph_section'] = 'mib';
|
||||
$graphdef['graph_descr'] = $mibdef[$oid]['description'];
|
||||
$graphdef['graph_order'] = $i++;
|
||||
// TODO: add colours, unit_text, and ds
|
||||
// add graph to the database
|
||||
dbInsert($graphdef, 'graph_types');
|
||||
}
|
||||
}
|
||||
}
|
||||
} // update_mib_graph_types
|
||||
|
||||
|
||||
/*
|
||||
* Save all of the measurable oids for the device in their own RRDs.
|
||||
* Save the current value of all the oids in the database.
|
||||
*/
|
||||
function save_mibs($device, $mibname, $oids, $mibdef, &$graphs)
|
||||
{
|
||||
$usedoids = array();
|
||||
$deviceoids = array();
|
||||
foreach ($oids as $index => $array) {
|
||||
foreach ($array as $obj => $val) {
|
||||
// build up the device_oid row for saving into the database
|
||||
$numvalue = is_numeric($val) ? $val + 0 : 0;
|
||||
$deviceoids[] = array(
|
||||
'device_id' => $device['device_id'],
|
||||
'oid' => $mibdef[$obj]['oid'].".".$index,
|
||||
'module' => $mibdef[$obj]['module'],
|
||||
'mib' => $mibdef[$obj]['mib'],
|
||||
'object_type' => $obj,
|
||||
'value' => $val,
|
||||
'numvalue' => $numvalue,
|
||||
);
|
||||
|
||||
$rrd_def = oid_rrd_def($obj, $mibdef);
|
||||
if ($rrd_def === false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$usedoids[$index][$obj] = $val;
|
||||
|
||||
$tags = array(
|
||||
'rrd_def' => $rrd_def,
|
||||
'rrd_name' => array($mibname, $mibdef[$obj]['shortname'], $index),
|
||||
'rrd_oldname' => array($mibname, $mibdef[$obj]['object_type'], $index),
|
||||
'index' => $index,
|
||||
'oid' => $mibdef[$obj]['oid'],
|
||||
'module' => $mibdef[$obj]['module'],
|
||||
'mib' => $mibdef[$obj]['mib'],
|
||||
'object_type' => $obj,
|
||||
);
|
||||
data_update($device, 'mibval', $tags, $val);
|
||||
}
|
||||
}
|
||||
|
||||
tag_graphs($mibname, $usedoids, $mibdef, $graphs);
|
||||
update_mib_graph_types($mibname, $usedoids, $mibdef, $graphs);
|
||||
|
||||
// update database
|
||||
$columns = array('device_id', 'oid', 'module', 'mib', 'object_type', 'value', 'numvalue');
|
||||
update_db_table('device_oids', $columns, 2, $deviceoids);
|
||||
} // save_mibs
|
||||
|
||||
|
||||
/*
|
||||
* @return an array of MIB objects matching $module, $name, keyed by object_type
|
||||
*/
|
||||
function load_mibdefs($module, $name)
|
||||
{
|
||||
$params = array($module, $name);
|
||||
$result = array();
|
||||
$object_types = array();
|
||||
foreach (dbFetchRows("SELECT * FROM `mibdefs` WHERE `module` = ? AND `mib` = ?", $params) as $row) {
|
||||
$mib = $row['object_type'];
|
||||
$object_types[] = $mib;
|
||||
$result[$mib] = $row;
|
||||
}
|
||||
|
||||
// add shortname to each element
|
||||
$prefix = longest_matching_prefix($name, $object_types);
|
||||
foreach ($result as $mib => $m) {
|
||||
if (strlen($prefix) > 2) {
|
||||
$result[$mib]['shortname'] = preg_replace("/^$prefix/", '', $m['object_type'], 1);
|
||||
} else {
|
||||
$result[$mib]['shortname'] = $m['object_type'];
|
||||
}
|
||||
}
|
||||
|
||||
d_echo($result);
|
||||
return $result;
|
||||
} // load_mibdefs
|
||||
|
||||
/*
|
||||
* @return an array of MIB names and modules for $device from the database
|
||||
*/
|
||||
function load_device_mibs($device)
|
||||
{
|
||||
$params = array($device['device_id']);
|
||||
$result = array();
|
||||
foreach (dbFetchRows("SELECT `mib`, `module` FROM device_mibs WHERE device_id = ?", $params) as $row) {
|
||||
$result[$row['mib']] = $row['module'];
|
||||
}
|
||||
return $result;
|
||||
} // load_device_mibs
|
||||
|
||||
|
||||
/*
|
||||
* Run MIB-based polling for $device. Update $graphs with the results.
|
||||
*/
|
||||
function poll_mibs($device, &$graphs)
|
||||
{
|
||||
if (!is_mib_poller_enabled($device)) {
|
||||
return;
|
||||
}
|
||||
|
||||
echo 'MIB: polling ';
|
||||
d_echo("\n");
|
||||
|
||||
foreach (load_device_mibs($device) as $name => $module) {
|
||||
echo "$name ";
|
||||
d_echo("\n");
|
||||
$oids = snmpwalk_cache_oid($device, $name, array(), $module, null, "-OQUsb");
|
||||
d_echo($oids);
|
||||
save_mibs($device, $name, $oids, load_mibdefs($module, $name), $graphs);
|
||||
}
|
||||
echo "\n";
|
||||
} // poll_mibs
|
||||
|
||||
/*
|
||||
* Take a list of MIB name => module pairs.
|
||||
* Validate MIBs and store the device->mib mapping in the database.
|
||||
* See includes/discovery/os/ruckuswireless.inc.php for an example of usage.
|
||||
*/
|
||||
function register_mibs($device, $mibs, $included_by)
|
||||
{
|
||||
if (!is_mib_poller_enabled($device)) {
|
||||
return;
|
||||
}
|
||||
|
||||
d_echo("MIB: registering\n");
|
||||
|
||||
foreach ($mibs as $name => $module) {
|
||||
$translated = snmp_mib_translate($name, $module, null, $device);
|
||||
if ($translated) {
|
||||
$mod = $translated[0];
|
||||
$nam = $translated[1];
|
||||
d_echo(" $mod::$nam\n");
|
||||
if (snmp_mib_load($nam, $mod, $included_by, null, $device) > 0) {
|
||||
// NOTE: `last_modified` omitted due to being automatically maintained by MySQL
|
||||
$columns = array('device_id', 'module', 'mib', 'included_by');
|
||||
$rows = array();
|
||||
$rows[] = array(
|
||||
'device_id' => $device['device_id'],
|
||||
'module' => $mod,
|
||||
'mib' => $nam,
|
||||
'included_by' => $included_by,
|
||||
);
|
||||
update_db_table('device_mibs', $columns, 3, $rows);
|
||||
} else {
|
||||
d_echo("MIB: Could not load definition for $mod::$nam\n");
|
||||
}
|
||||
} else {
|
||||
d_echo("MIB: Could not find $module::$name\n");
|
||||
}
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
} // register_mibs
|
||||
|
||||
/**
|
||||
* SNMPWalk_array_num - performs a numeric SNMPWalk and returns an array containing $count indexes
|
||||
* One Index:
|
||||
|
@ -590,27 +590,6 @@ device_group_device:
|
||||
Constraints:
|
||||
device_group_device_device_group_id_foreign: { name: device_group_device_device_group_id_foreign, foreign_key: device_group_id, table: device_groups, key: id, extra: 'ON DELETE CASCADE' }
|
||||
device_group_device_device_id_foreign: { name: device_group_device_device_id_foreign, foreign_key: device_id, table: devices, key: device_id, extra: 'ON DELETE CASCADE' }
|
||||
device_mibs:
|
||||
Columns:
|
||||
- { Field: device_id, Type: 'int unsigned', 'Null': false, Extra: '' }
|
||||
- { Field: module, Type: varchar(255), 'Null': false, Extra: '' }
|
||||
- { Field: mib, Type: varchar(255), 'Null': false, Extra: '' }
|
||||
- { Field: included_by, Type: varchar(255), 'Null': false, Extra: '' }
|
||||
- { Field: last_modified, Type: timestamp, 'Null': false, Extra: 'on update CURRENT_TIMESTAMP', Default: CURRENT_TIMESTAMP }
|
||||
Indexes:
|
||||
PRIMARY: { Name: PRIMARY, Columns: [device_id, module, mib], Unique: true, Type: BTREE }
|
||||
device_oids:
|
||||
Columns:
|
||||
- { Field: device_id, Type: 'int unsigned', 'Null': false, Extra: '' }
|
||||
- { Field: oid, Type: varchar(255), 'Null': false, Extra: '' }
|
||||
- { Field: module, Type: varchar(255), 'Null': false, Extra: '' }
|
||||
- { Field: mib, Type: varchar(255), 'Null': false, Extra: '' }
|
||||
- { Field: object_type, Type: varchar(255), 'Null': false, Extra: '' }
|
||||
- { Field: value, Type: varchar(255), 'Null': true, Extra: '' }
|
||||
- { Field: numvalue, Type: bigint, 'Null': true, Extra: '' }
|
||||
- { Field: last_modified, Type: timestamp, 'Null': false, Extra: 'on update CURRENT_TIMESTAMP', Default: CURRENT_TIMESTAMP }
|
||||
Indexes:
|
||||
PRIMARY: { Name: PRIMARY, Columns: [device_id, oid], Unique: true, Type: BTREE }
|
||||
device_perf:
|
||||
Columns:
|
||||
- { Field: id, Type: 'int unsigned', 'Null': false, Extra: auto_increment }
|
||||
@ -902,20 +881,6 @@ mempools:
|
||||
Indexes:
|
||||
PRIMARY: { Name: PRIMARY, Columns: [mempool_id], Unique: true, Type: BTREE }
|
||||
mempools_device_id_index: { Name: mempools_device_id_index, Columns: [device_id], Unique: false, Type: BTREE }
|
||||
mibdefs:
|
||||
Columns:
|
||||
- { Field: module, Type: varchar(255), 'Null': false, Extra: '' }
|
||||
- { Field: mib, Type: varchar(255), 'Null': false, Extra: '' }
|
||||
- { Field: object_type, Type: varchar(255), 'Null': false, Extra: '' }
|
||||
- { Field: oid, Type: varchar(255), 'Null': false, Extra: '' }
|
||||
- { Field: syntax, Type: varchar(255), 'Null': false, Extra: '' }
|
||||
- { Field: description, Type: varchar(255), 'Null': true, Extra: '' }
|
||||
- { Field: max_access, Type: varchar(255), 'Null': true, Extra: '' }
|
||||
- { Field: status, Type: varchar(255), 'Null': true, Extra: '' }
|
||||
- { Field: included_by, Type: varchar(255), 'Null': false, Extra: '' }
|
||||
- { Field: last_modified, Type: timestamp, 'Null': false, Extra: 'on update CURRENT_TIMESTAMP', Default: CURRENT_TIMESTAMP }
|
||||
Indexes:
|
||||
PRIMARY: { Name: PRIMARY, Columns: [module, mib, object_type], Unique: true, Type: BTREE }
|
||||
migrations:
|
||||
Columns:
|
||||
- { Field: id, Type: 'int unsigned', 'Null': false, Extra: auto_increment }
|
||||
|
@ -369,9 +369,6 @@
|
||||
"empty_ifdescr": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"register_mibs": {
|
||||
"type": "object"
|
||||
},
|
||||
"bad_if": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
@ -148,7 +148,6 @@ nav:
|
||||
- Creating Documentation: Developing/Creating-Documentation.md
|
||||
- Licensing: Developing/Licensing.md
|
||||
- Component: Extensions/Component.md
|
||||
- Mib Based Polling (Deprecated): Extensions/MIB-based-polling.md
|
||||
- Support for a new OS:
|
||||
- Intro: Developing/Support-New-OS.md
|
||||
- Initial Detection: Developing/os/Initial-Detection.md
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user