This commit is contained in:
laf 2016-10-20 22:23:01 +00:00
commit 4b47de2438
38 changed files with 1743 additions and 182 deletions

View File

@ -143,6 +143,7 @@ LibreNMS contributors:
- Alexander Kratzsch <klump@devrandom.se> (klump)
- Joseph Eames <j.eames@outlook.com> (j-ems)
- Eric Conroy <eric@conroy.co> (NetworkNub)
- Timothy Willey <developer@timothywilley.net> (twilley)
[1]: http://observium.org/ "Observium web site"
Observium was written by:

View File

@ -480,7 +480,7 @@ class IRCBot
$this->user['expire'] = (time() + ($this->config['irc_authtime'] * 3600));
$tmp_user = get_user($this->user['id']);
$tmp = get_userlevel($tmp_user['username']);
$this->user['level'] = $tmp['level'];
$this->user['level'] = $tmp;
if ($this->user['level'] < 5) {
foreach (dbFetchRows('SELECT device_id FROM devices_perms WHERE user_id = ?', array($this->user['id'])) as $tmp) {
$this->user['devices'][] = $tmp['device_id'];

View File

@ -25,6 +25,7 @@ Table of Content:
- [PlaySMS](#transports-playsms)
- [VictorOps](#transports-victorops)
- [Canopsis](#transports-canopsis)
- [osTicket](#transports-osticket)
- [Entities](#entities)
- [Devices](#entity-devices)
- [BGP Peers](#entity-bgppeers)
@ -521,6 +522,23 @@ For more information about canopsis and its events, take a look here :
http://www.canopsis.org/
http://www.canopsis.org/wp-content/themes/canopsis/doc/sakura/user-guide/event-spec.html
## <a name="transports-osticket">osTicket</a>
[Using a proxy?](../Support/Configuration.md#proxy-support)
osTicket, open source ticket system. LibreNMS can send alerts to osTicket API which are then converted to osTicket tickets. To configure the transport, go to:
Global Settings -> Alerting Settings -> osTicket Transport.
This can also be done manually in config.php :
~~
```php
$config['alert']['transports']['osticket']['url'] = 'http://osticket.example.com/api/http.php/tickets.json';
$config['alert']['transports']['osticket']['token'] = '123456789';
```
~~
# <a name="entities">Entities
Entities as described earlier are based on the table and column names within the database, if you are unsure of what the entity is you want then have a browse around inside MySQL using `show tables` and `desc <tablename>`.

View File

@ -0,0 +1,18 @@
<?php
$rrd_filename = rrd_name($device['hostname'], 'sonicwall_sessions');
$rrd_list[0]['filename'] = $rrd_filename;
$rrd_list[0]['descr'] = 'Maxiumum Sessions';
$rrd_list[0]['ds'] = 'maxsessions';
$rrd_list[1]['filename'] = $rrd_filename;
$rrd_list[1]['descr'] = 'Active Sessions';
$rrd_list[1]['ds'] = 'activesessions';
$colours = 'mixed';
$nototal = 1;
$unit_text = 'Sessions';
$scale_min = '0';
require 'includes/graphs/generic_multi_line.inc.php';

View File

@ -1,5 +1,8 @@
<?php
$scale_min = 0;
$scale_max = 100;
require 'includes/graphs/common.inc.php';
// $rrd_options .= " -l 0 -E ";

View File

@ -1,5 +1,8 @@
<?php
$scale_min = 0;
$scale_max = 100;
require 'includes/graphs/common.inc.php';
// $rrd_options .= " -l 0 -E ";

View File

@ -1,5 +1,8 @@
<?php
$scale_min = 0;
$scale_max = 50;
require 'includes/graphs/common.inc.php';
$rrd_options .= ' -l 0 -E ';

View File

@ -1,5 +1,8 @@
<?php
$scale_min = 0;
$scale_max = 100;
require 'includes/graphs/common.inc.php';
$rrd_options .= ' -l 0 -E ';

View File

@ -1,5 +1,8 @@
<?php
$scale_min = -110;
$scale_max = -50;
require 'includes/graphs/common.inc.php';
// $rrd_options .= " -l 0 -E ";

View File

@ -1,5 +1,8 @@
<?php
$scale_min = -100;
$scale_max = -20;
require 'includes/graphs/common.inc.php';
//$rrd_options .= " -l 0 -E ";

View File

@ -13,12 +13,12 @@ if (file_exists($radio1)) {
$rrd_options .= " LINE1:wificlients1#CC0000:'Clients on Radio1 ' ";
$rrd_options .= ' GPRINT:wificlients1:LAST:%3.0lf ';
$rrd_options .= ' GPRINT:wificlients1:MIN:%3.0lf ';
$rrd_options .= ' GPRINT:wificlients1:MAX:%3.0lf\\\l ';
$rrd_options .= ' GPRINT:wificlients1:MAX:%3.0lf\l ';
if (file_exists($radio2)) {
$rrd_options .= ' DEF:wificlients2='.$radio2.':wificlients:AVERAGE ';
$rrd_options .= " LINE1:wificlients2#008C00:'Clients on Radio2 ' ";
$rrd_options .= ' GPRINT:wificlients2:LAST:%3.0lf ';
$rrd_options .= ' GPRINT:wificlients2:MIN:%3.0lf ';
$rrd_options .= ' GPRINT:wificlients2:MAX:%3.0lf\\\l ';
$rrd_options .= ' GPRINT:wificlients2:MAX:%3.0lf\l ';
}
}

View File

@ -0,0 +1,16 @@
<?php
$rrd_filename = rrd_name($device['hostname'], 'zywall-sessions');
$ds = 'sessions';
$colour_area = '9999cc';
$colour_line = '0000cc';
$colour_area_max = '9999cc';
$graph_max = 1;
$unit_text = 'Sessions';
require 'includes/graphs/generic_simplex.inc.php';

View File

@ -42,13 +42,13 @@ if ($width > '500') {
$rrd_options .= " GPRINT:$mempool[mempool_id]free:LAST:%6.2lf%sB";
$rrd_options .= " GPRINT:$mempool[mempool_id]free:MIN:%5.2lf%sB";
$rrd_options .= " GPRINT:$mempool[mempool_id]free:MAX:%5.2lf%sB";
$rrd_options .= " GPRINT:$mempool[mempool_id]free:AVERAGE:%5.2lf%sB\\\\n";
$rrd_options .= " GPRINT:$mempool[mempool_id]free:AVERAGE:%5.2lf%sB\\n";
$rrd_options .= " COMMENT:'".substr(str_pad('', ($descr_len + 12)), 0, ($descr_len + 12))." '";
$rrd_options .= " GPRINT:$mempool[mempool_id]perc:LAST:'%5.2lf%% '";
$rrd_options .= " GPRINT:$mempool[mempool_id]percx:LAST:'%5.2lf%% '";
$rrd_options .= " GPRINT:$mempool[mempool_id]perc:MIN:'%5.2lf%% '";
$rrd_options .= " GPRINT:$mempool[mempool_id]perc:MAX:'%5.2lf%% '";
$rrd_options .= " GPRINT:$mempool[mempool_id]perc:AVERAGE:%5.2lf%%\\\\n";
$rrd_options .= " GPRINT:$mempool[mempool_id]perc:AVERAGE:%5.2lf%%\\n";
} else {
$rrd_options .= " LINE1.25:$mempool[mempool_id]perc#".$background['left'].":'$descr'";
$rrd_options .= " GPRINT:$mempool[mempool_id]size:LAST:%6.2lf%sB";

View File

@ -19,17 +19,17 @@ foreach ($otherports as $otherport) {
if ($otherport['untagged']) {
$traverse_ifvlan = false;
}
$vlan_ports[$otherport[ifIndex]] = $otherport;
$vlan_ports[$otherport['ifIndex']] = $otherport;
}
if ($traverse_ifvlan) {
$otherports = dbFetchRows('SELECT * FROM ports WHERE `device_id` = ? AND `ifVlan` = ?', array($device['device_id'], $vlan['vlan_vlan']));
foreach ($otherports as $otherport) {
$vlan_ports[$otherport[ifIndex]] = array_merge($otherport, array('untagged' => '1'));
$vlan_ports[$otherport['ifIndex']] = array_merge($otherport, array('untagged' => '1'));
}
}
ksort($vlan_ports);
ksort($vlan_ports);
foreach ($vlan_ports as $port) {
$port = ifLabel($port, $device);

View File

@ -953,6 +953,38 @@ echo '
<input id="canopsis_vhost" class="form-control" type="text" name="global-config-input" value="'.$canopsis_vhost['config_value'].'" data-config_id="'.$canopsis_vhost['config_id'].'">
<span class="form-control-feedback">
<i class="fa" aria-hidden="true"></i>
</span>
</div>
</div>
</div>
</div>
</div>';
$osticket_url = get_config_by_name('alert.transports.osticket.url');
$osticket_token = get_config_by_name('alert.transports.osticket.token');
echo '
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#accordion" href="#osticket_transport_expand"><i class="fa fa-caret-down"></i> osTicket transport</a> <button name="test-alert" id="test-alert" type="button" data-transport="osticket" class="btn btn-primary btn-xs pull-right">Test transport</button>
</h4>
</div>
<div id="osticket_transport_expand" class="panel-collapse collapse">
<div class="panel-body">
<div class="form-group has-feedback">
<label for="osticket_url" class="col-sm-4 control-label">osTicket API URL</label>
<div class="col-sm-4">
<input id="osticket_url" class="form-control" type="text" name="global-config-input" value="'.$osticket_url['config_value'].'" data-config_id="'.$osticket_url['config_id'].'">
<span class="form-control-feedback">
<i class="fa" aria-hidden="true"></i>
</span>
</div>
</div>
<div class="form-group has-feedback">
<label for="osticket_token" class="col-sm-4 control-label">osTicket API Token</label>
<div class="col-sm-4">
<input id="osticket_token" class="form-control" type="text" name="global-config-input" value="'.$osticket_token['config_value'].'" data-config_id="'.$osticket_token['config_id'].'">
<span class="form-control-feedback">
<i class="fa" aria-hidden="true"></i>
</span>
</div>
</div>

View File

@ -0,0 +1,40 @@
/*
* LibreNMS
*
* Copyright (c) 2016 Søren Friis Rosiak <sorenrosiak@gmail.com>
* 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.
*/
$url = $opts['url'];
$token = $opts['token'];
$protocol = array(
'name' => 'LibreNMS',
'email' => $_SERVER['SERVER_NAME'],
'subject' => ($obj['name'] ? $obj['name'] . ' on ' . $obj['hostname'] : $obj['title']) ,
'message' => strip_tags($obj['msg']) ,
'ip' => $_SERVER['REMOTE_ADDR'],
'attachments' => array() ,
);
$curl = curl_init();
set_curl_proxy($curl);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Content-type' => 'application/json',
'Expect:',
'X-API-Key: ' . $token
));
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($protocol));
$ret = curl_exec($curl);
$code = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($code != 201) {
var_dump("osTicket returned Error, retry later");
return false;
}
return true;

View File

@ -12,7 +12,11 @@ if ($config['db']['extension'] == 'mysqli') {
}
if (!$database_link) {
echo '<h2>MySQL Error</h2>';
if (isCli()) {
c_echo("[%RFAIL%n] Could not connect to MySQL\n");
} else {
echo '<h2>MySQL Error: could not connect</h2>';
}
if ($config['db']['extension'] == 'mysqli') {
echo mysqli_error($database_link);
} else {
@ -2553,6 +2557,11 @@ $config['graph_types']['device']['waas_cwotfostatsactiveoptconn']['section']
$config['graph_types']['device']['waas_cwotfostatsactiveoptconn']['order'] = '0';
$config['graph_types']['device']['waas_cwotfostatsactiveoptconn']['descr'] = 'Optimized TCP Connections';
// SonicWALL Sessions
$config['graph_types']['device']['sonicwall_sessions']['section'] = 'firewall';
$config['graph_types']['device']['sonicwall_sessions']['order'] = '0';
$config['graph_types']['device']['sonicwall_sessions']['descr'] = 'Active Sessions';
$config['graph_types']['device']['bits']['section'] = 'netstats';
$config['graph_types']['device']['bits']['order'] = '0';
$config['graph_types']['device']['bits']['descr'] = 'Total Traffic';

View File

@ -0,0 +1,20 @@
<?php
/*
* LibreNMS NX-OS memory information module
*
* Copyright (c) 2016 Dave Bell <me@geordish.org>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
if ($device['os'] == 'nxos') {
$used = snmp_get($device, '.1.3.6.1.4.1.9.9.109.1.1.1.1.12.1', '-OvQ');
$free = snmp_get($device, '.1.3.6.1.4.1.9.9.109.1.1.1.1.13.1', '-OvQ');
if (is_numeric($used) && is_numeric($free)) {
discover_mempool($valid_mempool, $device, 0, 'nxos', 'Memory', '1', null, null);
}
}

View File

@ -13,10 +13,9 @@
*/
if ($device['os'] == 'zywall') {
echo 'Zywall mempool: ';
$oid = '.1.3.6.1.4.1.890.1.6.22.1.2.0';
$usage = snmp_get($device, $oid, '-Ovq');
d_echo('Zywall');
$usage = snmp_get($device, '.1.3.6.1.4.1.890.1.6.22.1.2.0', '-Ovq');
if (is_numeric($usage)) {
discover_mempool($valid_mempool, $device, $oid, 'zywall', 'Memory', '1', null, null);
discover_mempool($valid_mempool, $device, '0', 'zywall', 'Memory', '1', null, null);
}
}

View File

@ -0,0 +1,49 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2016 Søren Friis Rosiak <sorenrosiak@gmail.com>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
if ($device['os'] == 'mimosa') {
d_echo('Mimosa');
$temp = snmp_get($device, "mimosaSatelliteStrength.0", "-Ovqe", "MIMOSA-NETWORKS-BFIVE-MIB");
$cur_oid = '.1.3.6.1.4.1.43356.2.1.2.2.5.0';
$index = '0';
if (is_numeric($temp)) {
//Create State Index
$state_name = 'mimosaSatelliteStrength';
$state_index_id = create_state_index($state_name);
//Create State Translation
if ($state_index_id !== null) {
$states = array(
array($state_index_id,'good',0,1,0) ,
array($state_index_id,'bad',0,2,2)
);
foreach ($states as $value) {
$insert = array(
'state_index_id' => $value[0],
'state_descr' => $value[1],
'state_draw_graph' => $value[2],
'state_value' => $value[3],
'state_generic_value' => $value[4]
);
dbInsert($insert, 'state_translations');
}
}
$descr = 'Satellite Strength';
//Discover Sensors
discover_sensor($valid['sensor'], 'state', $device, $cur_oid, $index, $state_name, $descr, '1', '1', null, null, null, null, $temp, 'snmp', $index);
//Create Sensor To State Index
create_sensor_to_state_index($device, $state_name, $index);
}
}

View File

@ -0,0 +1,61 @@
<?php
/*
* LibreNMS NX-OS Fan state
*
* Copyright (c) 2016 Dave Bell <me@geordish.org>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
if ($device['os'] == 'nxos') {
$fan_tray_oid = '.1.3.6.1.4.1.9.9.117.1.4.1.1.1';
$fan_trays = snmpwalk_cache_oid_num($device, $fan_tray_oid, array());
/* CISCO-ENTITY-FRU-CONTROL-MIB cefcFanTrayOperStatus
* unknown(1),
* up(2),
* down(3),
* warning(4)
*/
if (is_array($fan_trays)) {
$entity_oid = '.1.3.6.1.2.1.47.1.1.1.1.7';
$entities = snmpwalk_cache_oid_num($device, $entity_oid, array());
foreach ($fan_trays as $oid => $array) {
$state = current($array);
$split_oid = explode('.', $oid);
$index = $split_oid[(count($split_oid) - 1)];
$current_oid = "$fan_tray_oid.$index";
$descr = current($entities["$entity_oid.$index"]);
$state_name = "cefcFanTrayOperStatus";
$state_index_id = create_state_index($state_name);
if ($state_index_id !== null) {
$states = array(
array($state_index_id, 'unknown', 0, 1, 3),
array($state_index_id, 'up', 1, 2, 0),
array($state_index_id, 'down', 1, 3, 2),
array($state_index_id, 'warning', 1, 4, 1),
);
foreach ($states as $value) {
$insert = array(
'state_index_id' => $value[0],
'state_descr' => $value[1],
'state_draw_graph' => $value[2],
'state_value' => $value[3],
'state_generic_value' => $value[4]
);
dbInsert($insert, 'state_translations');
}
}
discover_sensor($valid['sensor'], 'state', $device, $current_oid, $index, $state_name, $descr, 1, 1);
create_sensor_to_state_index($device, $state_name, $index);
}
}
}

View File

@ -0,0 +1,24 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2016 Søren Friis Rosiak <sorenrosiak@gmail.com>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
if ($device['os'] == 'mimosa') {
d_echo('Mimosa');
$oid = ".1.3.6.1.4.1.43356.2.1.2.1.8.0";
$index = 0;
$sensor_type = 'mimosaInternalTemp';
$descr = 'Internal Temp';
$divisor = 10;
$temperature = (snmp_get($device, $oid, '-Oqv') / $divisor);
if (is_numeric($temperature)) {
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, $sensor_type, $descr, $divisor, '1', '0', null, null, '65', $temperature);
}
}

View File

@ -12,13 +12,11 @@
if ($device['os'] == 'riverbed') {
d_echo('Riverbed');
$oid = '.1.3.6.1.4.1.17163.1.1.2.9.0';
$index = 0;
$descr = 'System Temperature';
$index = $oid;
$temp = snmp_get($device, $oid, 'Oqv');
if (is_numeric($temp)) {
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'riverbed', $descr, '1', '1', 0, null, null, 65, $current);
$temperature = snmp_get($device, $oid, '-Oqv');
if (is_numeric($temperature)) {
discover_sensor($valid['sensor'], 'temperature', $device, $oid, $index, 'riverbed', $descr, '1', '1', 0, null, null, 65, $temperature);
}
}

View File

@ -8,7 +8,17 @@ foreach ($vlans_db_raw as $vlan_db) {
// Create an empty array to record what VLANs we discover this session.
$device['vlans'] = array();
$valid_vlan_port_ids = array();
$per_vlan_data = array(); // fill this with data for each vlan
$valid_vlan_port = array();
// get a map of base port to ifIndex and the inverse
$base_to_index = array();
$tmp_base_indexes = snmpwalk_cache_oid($device, 'dot1dBasePortIfIndex', array(), 'BRIDGE-MIB');
// flatten the array
foreach ($tmp_base_indexes as $index => $array) {
$base_to_index[$index] = $array['dot1dBasePortIfIndex'];
}
$index_to_base = array_flip($base_to_index);
require 'includes/discovery/vlans/q-bridge-mib.inc.php';
require 'includes/discovery/vlans/cisco-vtp.inc.php';
@ -16,59 +26,49 @@ require 'includes/discovery/vlans/cisco-vtp.inc.php';
// Fetch switchport <> VLAN relationships. This is DIRTY.
foreach ($device['vlans'] as $domain_id => $vlans) {
foreach ($vlans as $vlan_id => $vlan) {
// FIXME - do this only when vlan type == ethernet?
if (is_numeric($vlan_id) && ($vlan_id < 1002 || $vlan_id > 1005)) {
// Ignore reserved VLAN IDs
if ($device['os_group'] == 'cisco' || $device['os'] == 'ios') {
// This shit only seems to work on IOS
// Probably does not work with snmpv3. I have no real idea about what this code is really doing
$vlan_device = array_merge($device, array('community' => $device['community'].'@'.$vlan_id));
$vlan_data = snmpwalk_cache_oid($vlan_device, 'dot1dStpPortEntry', array(), 'BRIDGE-MIB:Q-BRIDGE-MIB');
$vlan_data = snmpwalk_cache_oid($vlan_device, 'dot1dBasePortEntry', $vlan_data, 'BRIDGE-MIB:Q-BRIDGE-MIB');
} elseif (isset($qbridge_data)) {
$vlan_data = $qbridge_data[$vlan_id];
// grab the populated data for this vlan
$vlan_data = $per_vlan_data[$vlan_id];
echo "VLAN $vlan_id \n";
if ($vlan_data) {
echo str_pad('dot1d id', 10).str_pad('ifIndex', 10).str_pad('Port Name', 25).str_pad('Priority', 10).str_pad('State', 15).str_pad('Cost', 10)."\n";
}
foreach ($vlan_data as $ifIndex => $vlan_port) {
$port = get_port_by_index_cache($device, $ifIndex);
echo str_pad($vlan_port_id, 10).str_pad($ifIndex, 10).str_pad($port['ifDescr'], 25).str_pad($vlan_port['dot1dStpPortPriority'], 10).str_pad($vlan_port['dot1dStpPortState'], 15).str_pad($vlan_port['dot1dStpPortPathCost'], 10);
$db_w = array(
'device_id' => $device['device_id'],
'port_id' => $port['port_id'],
'vlan' => $vlan_id,
);
$db_a['baseport'] = $index_to_base[$ifIndex];
$db_a['priority'] = isset($vlan_port['dot1dStpPortPriority']) ? $vlan_port['dot1dStpPortPriority'] : 0;
$db_a['state'] = isset($vlan_port['dot1dStpPortState']) ? $vlan_port['dot1dStpPortState'] : 'unknown';
$db_a['cost'] = isset($vlan_port['dot1dStpPortPathCost']) ? $vlan_port['dot1dStpPortPathCost'] : 0;
$db_a['untagged'] = isset($vlan_port['untagged']) ? $vlan_port['untagged'] : 0;
$from_db = dbFetchRow('SELECT * FROM `ports_vlans` WHERE device_id = ? AND port_id = ? AND `vlan` = ?', array($device['device_id'], $port['port_id'], $vlan_id));
if ($from_db['port_vlan_id']) {
$db_id = $from_db['port_vlan_id'];
dbUpdate($db_a, 'ports_vlans', '`port_vlan_id` = ?', array($db_id));
echo 'Updated';
} else {
$db_id = dbInsert(array_merge($db_w, $db_a), 'ports_vlans');
echo 'Inserted';
}
$valid_vlan_port_ids[] = $db_id;
echo "VLAN $vlan_id \n";
if ($vlan_data) {
echo str_pad('dot1d id', 10).str_pad('ifIndex', 10).str_pad('Port Name', 25).str_pad('Priority', 10).str_pad('State', 15).str_pad('Cost', 10)."\n";
}
foreach ($vlan_data as $vlan_port_id => $vlan_port) {
$port = get_port_by_index_cache($device, $vlan_port['dot1dBasePortIfIndex']);
echo str_pad($vlan_port_id, 10).str_pad($vlan_port['dot1dBasePortIfIndex'], 10).str_pad($port['ifDescr'], 25).str_pad($vlan_port['dot1dStpPortPriority'], 10).str_pad($vlan_port['dot1dStpPortState'], 15).str_pad($vlan_port['dot1dStpPortPathCost'], 10);
$db_w = array(
'device_id' => $device['device_id'],
'port_id' => $port['port_id'],
'vlan' => $vlan_id,
);
$db_a['baseport'] = $vlan_port_id;
$db_a['priority'] = isset($vlan_port['dot1dStpPortPriority']) ? $vlan_port['dot1dStpPortPriority'] : 0;
$db_a['state'] = isset($vlan_port['dot1dStpPortState']) ? $vlan_port['dot1dStpPortState'] : 'unknown';
$db_a['cost'] = isset($vlan_port['dot1dStpPortPathCost']) ? $vlan_port['dot1dStpPortPathCost'] : 0;
$db_a['untagged'] = isset($vlan_port['untagged']) ? $vlan_port['untagged'] : 0;
$from_db = dbFetchRow('SELECT * FROM `ports_vlans` WHERE device_id = ? AND port_id = ? AND `vlan` = ?', array($device['device_id'], $port['port_id'], $vlan_id));
if ($from_db['port_vlan_id']) {
$db_id = $from_db['port_vlan_id'];
dbUpdate($db_a, 'ports_vlans', '`port_vlan_id` = ?', array($db_id));
echo 'Updated';
} else {
$db_id = dbInsert(array_merge($db_w, $db_a), 'ports_vlans');
echo 'Inserted';
}
$valid_vlan_port_ids[] = $db_id;
echo PHP_EOL;
}//end foreach
}//end if
echo PHP_EOL;
}//end foreach
}//end foreach
}//end foreach
// remove non-existent vlans
foreach ($vlans_db as $domain_id => $vlans) {
foreach ($vlans as $vlan_id => $vlan) {
if (empty($device['vlans'][$domain_id][$vlan_id])) {
@ -82,3 +82,4 @@ $num = dbDelete('ports_vlans', '`device_id`=? AND `port_vlan_id` NOT IN ('.join(
d_echo("Deleted $num vlan mappings\n");
unset($device['vlans']);
unset($base_to_index, $tmp_base_indexes, $index_to_base, $per_vlan_data, $valid_vlan_port, $num);

View File

@ -3,6 +3,9 @@
if ($device['os_group'] == 'cisco') {
echo "Cisco VLANs:\n";
$native_vlans = snmpwalk_cache_oid($device, 'vlanTrunkPortNativeVlan', array(), 'CISCO-VTP-MIB');
$native_vlans = snmpwalk_cache_oid($device, 'vmVlan', $native_vlans, 'CISCO-VLAN-MEMBERSHIP-MIB');
// Not sure why we check for VTP, but this data comes from that MIB, so...
$vtpversion = snmp_get($device, 'vtpVersion.0', '-OnvQ', 'CISCO-VTP-MIB');
if ($vtpversion == '1' || $vtpversion == '2' || $vtpversion == '3' || $vtpversion == 'one' || $vtpversion == 'two' || $vtpversion == 'three' || $vtpversion == 'none') {
@ -21,8 +24,42 @@ if ($device['os_group'] == 'cisco') {
echo '+';
}
$device['vlans'][$vtpdomain_id][$vlan_id] = $vlan_id;
if (is_numeric($vlan_id) && ($vlan_id < 1002 || $vlan_id > 1005)) {
// Ignore reserved VLAN IDs
// get dot1dStpPortEntry within the vlan context
$vlan_device = array_merge($device, array('community' => $device['community'] . '@' . $vlan_id, 'context_name' => "vlan-$vlan_id"));
$tmp_vlan_data = snmpwalk_cache_oid($vlan_device, 'dot1dStpPortEntry', array(), 'BRIDGE-MIB');
// may need to fetch additional dot1dBasePortIfIndex mappings
$tmp_vlan_data = snmpwalk_cache_oid($vlan_device, 'dot1dBasePortIfIndex', $tmp_vlan_data, 'BRIDGE-MIB');
$vlan_data = array();
// flatten the array, use ifIndex instead of dot1dBasePortId
foreach ($tmp_vlan_data as $index => $array) {
if (isset($array['dot1dBasePortIfIndex'])) {
$base_to_index[$index] = $array['dot1dBasePortIfIndex'];
$index_to_base[$array['dot1dBasePortIfIndex']] = $index;
}
$vlan_data[$base_to_index[$index]] = $array;
}
$per_vlan_data[$vlan_id] = $vlan_data;
}
}
echo PHP_EOL;
// set all untagged vlans
foreach ($native_vlans as $ifIndex => $data) {
if (isset($data['vmVlan'])) {
$vlan_id = $data['vmVlan'];
} else {
$vlan_id = $data['vlanTrunkPortNativeVlan'];
}
$base = $index_to_base[$ifIndex];
echo "Vlan: $vlan_id tagged on $base (ifIndex $ifIndex)\n";
$per_vlan_data[$vlan_id][$ifIndex]['untagged'] = 1;
}
}
}
echo PHP_EOL;
}

View File

@ -6,12 +6,10 @@ $vlanversion = snmp_get($device, 'dot1qVlanVersionNumber.0', '-Oqv', 'IEEE8021-Q
if ($vlanversion == 'version1' || $vlanversion == '2') {
echo "ver $vlanversion ";
$qbridge_data = array();
$vtpdomain_id = '1';
$vlans = snmpwalk_cache_oid($device, 'dot1qVlanStaticName', array(), 'Q-BRIDGE-MIB');
$tagoruntag = snmpwalk_cache_oid($device, 'dot1qVlanCurrentEgressPorts', array(), 'Q-BRIDGE-MIB', null, '-OQUs --hexOutputLength=0');
$untag = snmpwalk_cache_oid($device, 'dot1qVlanCurrentUntaggedPorts', array(), 'Q-BRIDGE-MIB', null, '-OQUs --hexOutputLength=0');
$base_indexes = snmpwalk_cache_oid($device, 'dot1dBasePortIfIndex', array(), 'BRIDGE-MIB');
foreach ($vlans as $vlan_id => $vlan) {
d_echo(" $vlan_id");
@ -31,12 +29,12 @@ if ($vlanversion == 'version1' || $vlanversion == '2') {
$device['vlans'][$vtpdomain_id][$vlan_id] = $vlan_id;
$id = "0.$vlan_id";
$untagged_indexes = q_bridge_bits2indices($untag[$id]['dot1qVlanCurrentUntaggedPorts']);
$egress_indexes = q_bridge_bits2indices($tagoruntag[$id]['dot1qVlanCurrentEgressPorts']);
$untagged_ids = q_bridge_bits2indices($untag[$id]['dot1qVlanCurrentUntaggedPorts']);
$egress_ids = q_bridge_bits2indices($tagoruntag[$id]['dot1qVlanCurrentEgressPorts']);
foreach ($egress_indexes as $port_index) {
$qbridge_data[$vlan_id][$port_index] = $base_indexes[$port_index];
$qbridge_data[$vlan_id][$port_index]['untagged'] = (in_array($port_index, $untagged_indexes) ? 1 : 0);
foreach ($egress_ids as $port_id) {
$ifIndex = $base_to_index[$port_id];
$per_vlan_data[$vlan_id][$ifIndex]['untagged'] = (in_array($port_id, $untagged_ids) ? 1 : 0);
}
}
}

View File

@ -1,110 +1,128 @@
<?php
if ($device['os_group'] == 'cisco') {
// FIXME - seems to be broken. IPs appear with leading zeroes.
$ipsec_array = snmpwalk_cache_oid($device, 'cipSecTunnelEntry', array(), 'CISCO-IPSEC-FLOW-MONITOR-MIB');
$ike_array = snmpwalk_cache_oid($device, 'cikeTunnelEntry', array(), 'CISCO-IPSEC-FLOW-MONITOR-MIB');
$ipsec_array = snmpwalk_cache_oid($device, 'cipSecTunnelEntry', array(), 'CISCO-IPSEC-FLOW-MONITOR-MIB');
$ike_array = snmpwalk_cache_oid($device, 'cikeTunnelEntry', array(), 'CISCO-IPSEC-FLOW-MONITOR-MIB');
$tunnels_db = dbFetchRows('SELECT * FROM `ipsec_tunnels` WHERE `device_id` = ?', array($device['device_id']));
foreach ($tunnels_db as $tunnel) {
if (empty($tunnel['peer_addr']) && empty($tunnel['local_addr'])) {
dbDelete('ipsec_tunnels', '`tunnel_id` = ?', array($tunnel['tunnel_id']));
}
$tunnels[$tunnel['peer_addr']] = $tunnel;
}
$valid_tunnels = array();
foreach ($ipsec_array as $index => $tunnel) {
$tunnel = array_merge($tunnel, $ike_array[$tunnel['cipSecTunIkeTunnelIndex']]);
echo "Tunnel $index (".$tunnel['cipSecTunIkeTunnelIndex'].")\n";
echo 'Address '.$tunnel['cikeTunRemoteValue']."\n";
$address = $tunnel['cikeTunRemoteValue'];
$oids = array(
'cipSecTunInOctets',
'cipSecTunInDecompOctets',
'cipSecTunInPkts',
'cipSecTunInDropPkts',
'cipSecTunInReplayDropPkts',
'cipSecTunInAuths',
'cipSecTunInAuthFails',
'cipSecTunInDecrypts',
'cipSecTunInDecryptFails',
'cipSecTunOutOctets',
'cipSecTunOutUncompOctets',
'cipSecTunOutPkts',
'cipSecTunOutDropPkts',
'cipSecTunOutAuths',
'cipSecTunOutAuthFails',
'cipSecTunOutEncrypts',
'cipSecTunOutEncryptFails',
);
$db_oids = array(
'cipSecTunStatus' => 'tunnel_status',
'cikeTunLocalName' => 'tunnel_name',
'cikeTunLocalValue' => 'local_addr',
);
if (!is_array($tunnels[$tunnel['cikeTunRemoteValue']]) && !empty($tunnel['cikeTunRemoteValue'])) {
$tunnel_id = dbInsert(array('device_id' => $device['device_id'], 'peer_addr' => $tunnel['cikeTunRemoteValue'], 'local_addr' => $tunnel['cikeTunLocalValue'], 'tunnel_name' => $tunnel['cikeTunLocalName']), 'ipsec_tunnels');
$valid_tunnels[] = $tunnel_id;
} else {
foreach ($db_oids as $db_oid => $db_value) {
$db_update[$db_value] = $tunnel[$db_oid];
$tunnels_db = dbFetchRows('SELECT * FROM `ipsec_tunnels` WHERE `device_id` = ?', array($device['device_id']));
foreach ($tunnels_db as $tunnel) {
if (empty($tunnel['peer_addr']) && empty($tunnel['local_addr'])) {
dbDelete('ipsec_tunnels', '`tunnel_id` = ?', array($tunnel['tunnel_id']));
}
$updated = dbUpdate($db_update, 'ipsec_tunnels', '`tunnel_id` = ?', array($tunnels[$tunnel['cikeTunRemoteValue']]['tunnel_id']));
$valid_tunnels[] = $tunnels[$tunnel['cikeTunRemoteValue']]['tunnel_id'];
$tunnels[$tunnel['peer_addr']] = $tunnel;
}
if (is_numeric($tunnel['cipSecTunHcInOctets']) && is_numeric($tunnel['cipSecTunHcInDecompOctets'])
&& is_numeric($tunnel['cipSecTunHcOutOctets']) && is_numeric($tunnel['cipSecTunHcOutUncompOctets'])
) {
echo 'HC ';
$valid_tunnels = array();
$tunnel['cipSecTunInOctets'] = $tunnel['cipSecTunHcInOctets'];
$tunnel['cipSecTunInDecompOctets'] = $tunnel['cipSecTunHcInDecompOctets'];
$tunnel['cipSecTunOutOctets'] = $tunnel['cipSecTunHcOutOctets'];
$tunnel['cipSecTunOutUncompOctets'] = $tunnel['cipSecTunHcOutUncompOctets'];
}
foreach ($ipsec_array as $index => $tunnel) {
$tunnel = array_merge($tunnel, $ike_array[$tunnel['cipSecTunIkeTunnelIndex']]);
$rrd_name = array('ipsectunnel', $address);
$rrd_def = array();
foreach ($oids as $oid) {
$oid_ds = truncate(str_replace('cipSec', '', $oid), 19, '');
$rrd_def[] = "DS:$oid_ds:COUNTER:600:U:1000000000";
}
echo "Tunnel $index (" . $tunnel['cipSecTunIkeTunnelIndex'] . ")\n";
$fields = array();
echo 'Address ' . $tunnel['cikeTunRemoteValue'] . "\n";
foreach ($oids as $oid) {
if (is_numeric($tunnel[$oid])) {
$value = $tunnel[$oid];
$address = $tunnel['cikeTunRemoteValue'];
$oids = array(
'cipSecTunInOctets',
'cipSecTunInDecompOctets',
'cipSecTunInPkts',
'cipSecTunInDropPkts',
'cipSecTunInReplayDropPkts',
'cipSecTunInAuths',
'cipSecTunInAuthFails',
'cipSecTunInDecrypts',
'cipSecTunInDecryptFails',
'cipSecTunOutOctets',
'cipSecTunOutUncompOctets',
'cipSecTunOutPkts',
'cipSecTunOutDropPkts',
'cipSecTunOutAuths',
'cipSecTunOutAuthFails',
'cipSecTunOutEncrypts',
'cipSecTunOutEncryptFails',
);
$db_oids = array(
'cipSecTunStatus' => 'tunnel_status',
'cikeTunLocalName' => 'tunnel_name',
'cikeTunLocalValue' => 'local_addr',
);
if (!is_array($tunnels[$tunnel['cikeTunRemoteValue']]) && !empty($tunnel['cikeTunRemoteValue'])) {
$tunnel_id = dbInsert(array(
'device_id' => $device['device_id'],
'peer_addr' => $tunnel['cikeTunRemoteValue'],
'local_addr' => $tunnel['cikeTunLocalValue'],
'tunnel_name' => $tunnel['cikeTunLocalName']
), 'ipsec_tunnels');
$valid_tunnels[] = $tunnel_id;
} else {
$value = '0';
foreach ($db_oids as $db_oid => $db_value) {
$db_update[$db_value] = $tunnel[$db_oid];
}
$updated = dbUpdate(
$db_update,
'ipsec_tunnels',
'`tunnel_id` = ?',
array($tunnels[$tunnel['cikeTunRemoteValue']]['tunnel_id'])
);
$valid_tunnels[] = $tunnels[$tunnel['cikeTunRemoteValue']]['tunnel_id'];
}
$fields[$oid] = $value;
if (is_numeric($tunnel['cipSecTunHcInOctets']) &&
is_numeric($tunnel['cipSecTunHcInDecompOctets']) &&
is_numeric($tunnel['cipSecTunHcOutOctets']) &&
is_numeric($tunnel['cipSecTunHcOutUncompOctets'])
) {
echo 'HC ';
$tunnel['cipSecTunInOctets'] = $tunnel['cipSecTunHcInOctets'];
$tunnel['cipSecTunInDecompOctets'] = $tunnel['cipSecTunHcInDecompOctets'];
$tunnel['cipSecTunOutOctets'] = $tunnel['cipSecTunHcOutOctets'];
$tunnel['cipSecTunOutUncompOctets'] = $tunnel['cipSecTunHcOutUncompOctets'];
}
$rrd_name = array('ipsectunnel', $address);
$rrd_def = array();
foreach ($oids as $oid) {
$oid_ds = truncate(str_replace('cipSec', '', $oid), 19, '');
$rrd_def[] = "DS:$oid_ds:COUNTER:600:U:1000000000";
}
$fields = array();
foreach ($oids as $oid) {
if (is_numeric($tunnel[$oid])) {
$value = $tunnel[$oid];
} else {
$value = '0';
}
$fields[$oid] = $value;
}
if (isset($tunnel['cikeTunRemoteValue'])) {
$tags = compact('address', 'rrd_name', 'rrd_def');
data_update($device, 'ipsectunnel', $tags, $fields);
// $graphs['ipsec_tunnels'] = TRUE;
}
}//end foreach
if (is_array($valid_tunnels)) {
d_echo($valid_tunnels);
if (empty($valid_tunnels)) {
$valid_tunnels = array(0);
}
dbDelete(
'ipsec_tunnels',
"`tunnel_id` NOT IN (" . implode(',', $valid_tunnels) . ") AND `device_id`=?",
array($device['device_id'])
);
}
if (isset($tunnel['cikeTunRemoteValue'])) {
$tags = compact('address', 'rrd_name', 'rrd_def');
data_update($device, 'ipsectunnel', $tags, $fields);
// $graphs['ipsec_tunnels'] = TRUE;
}
}//end foreach
if (is_array($valid_tunnels)) {
d_echo($valid_tunnels);
if (empty($valid_tunnels)) {
$valid_tunnels = array(0);
}
dbDelete('ipsec_tunnels', "`tunnel_id` NOT IN (".implode(',', $valid_tunnels).") AND `device_id`=?", array($device['device_id']));
unset($rrd_name, $rrd_def, $fields, $oids, $data, $data, $oid, $tunnel);
}
unset($rrd_name,$rrd_def,$fields,$oids, $data, $data, $oid, $tunnel);

View File

@ -0,0 +1,21 @@
<?php
/*
* LibreNMS NX-OS memory information module
*
* Copyright (c) 2016 Dave Bell <me@geordish.org>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
if ($device['os'] == "nxos") {
echo "Cisco Nexus";
$used = snmp_get($device, '.1.3.6.1.4.1.9.9.109.1.1.1.1.12.1', '-OvQ');
$free = snmp_get($device, '.1.3.6.1.4.1.9.9.109.1.1.1.1.13.1', '-OvQ');
$mempool['used'] = ($used * 1024);
$mempool['free'] = ($free * 1024);
$mempool['total'] = (($used + $free) * 1024);
}

View File

@ -0,0 +1,22 @@
<?php
/*
* LibreNMS
*
* Copyright (c) 2016 Søren Friis Rosiak <sorenrosiak@gmail.com>
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version. Please see LICENSE.txt at the top level of
* the source code distribution for details.
*/
if ($device['os'] == 'zywall') {
d_echo('Zywall');
$perc = snmp_get($device, ".1.3.6.1.4.1.890.1.6.22.1.2.0", '-OvQ');
if (is_numeric($perc)) {
$mempool['perc'] = $perc;
$mempool['used'] = $perc;
$mempool['total'] = 100;
$mempool['free'] = 100 - $perc;
}
}

View File

@ -10,6 +10,9 @@
* the source code distribution for details.
*/
$explodeddata = explode(" ", $poll_device['sysDescr']);
$hardware = $explodeddata['1'];
$version = $explodeddata['3'];
$hardware = snmp_get($device, 'sysObjectID.0', '-Osqv', 'SNMPv2-MIB:MIMOSA-NETWORKS-BASE-MIB');
$oids = 'mimosaSerialNumber.0 mimosaFirmwareVersion.0';
$data = snmp_get_multi($device, $oids, '-OQUs', 'MIMOSA-NETWORKS-BFIVE-MIB');
$serial = $data[0]['mimosaSerialNumber'];
$version = $data[0]['mimosaFirmwareVersion'];

View File

@ -8,8 +8,25 @@
// SNMPv2-SMI::enterprises.8741.2.1.1.2.0 = STRING: "0017C568903C"
// SNMPv2-SMI::enterprises.8741.2.1.1.3.0 = STRING: "SonicOS Enhanced 5.6.0.11-61o"
// SNMPv2-SMI::enterprises.8741.2.1.1.4.0 = STRING: "5.0.2.11"
$hardware = trim(snmp_get($device, '.1.3.6.1.4.1.8741.2.1.1.1.0', '-OQv', '', ''), '" ');
$serial = trim(snmp_get($device, '.1.3.6.1.4.1.8741.2.1.1.2.0', '-OQv', '', ''), '" ');
$fwversion = trim(snmp_get($device, '.1.3.6.1.4.1.8741.2.1.1.3.0', '-OQv', '', ''), '" ');
$hardware = trim(snmp_get($device, '.1.3.6.1.4.1.8741.2.1.1.1.0', '-OQv', '', ''), '" ');
$serial = trim(snmp_get($device, '.1.3.6.1.4.1.8741.2.1.1.2.0', '-OQv', '', ''), '" ');
$fwversion = trim(snmp_get($device, '.1.3.6.1.4.1.8741.2.1.1.3.0', '-OQv', '', ''), '" ');
$romversion = trim(snmp_get($device, '.1.3.6.1.4.1.8741.2.1.1.4.0', '-OQv', '', ''), '" ');
$version = "(Firmware $fwversion / ROM $romversion)";
$version = "(Firmware $fwversion / ROM $romversion)";
$oids = 'sonicCurrentConnCacheEntries.0 sonicMaxConnCacheEntries.0';
$data = snmp_get_multi($device, $oids, '-OQUs', 'SONICWALL-FIREWALL-IP-STATISTICS-MIB');
if (is_numeric($data)) {
$rrd_def = array(
'DS:activesessions:GAUGE:600:0:U',
'DS:maxsessions:GAUGE:600:0:U',
);
$fields = array(
'activesessions' => $data[0]['sonicCurrentConnCacheEntries'],
'maxsessions' => $data[0]['sonicMaxConnCacheEntries'],
);
$tags = compact('rrd_def');
data_update($device, 'sonicwall_sessions', $tags, $fields);
$graphs['sonicwall_sessions'] = true;
}

View File

@ -2,6 +2,17 @@
$hardware = $poll_device['sysDescr'];
$version = snmp_get($device, '.1.3.6.1.4.1.890.1.15.3.1.6.0', '-Osqv');
$version = str_replace('"', ' ', $version);
$serial = snmp_get($device, '1.3.6.1.4.1.890.1.15.3.1.12.0', '-Osqv');
$version = explode("ITS", trim(snmp_get($device, '.1.3.6.1.4.1.890.1.15.3.1.6.0', '-Osqv'), '"'), 2);
$version = $version[0];
$serial = trim(snmp_get($device, '.1.3.6.1.4.1.890.1.15.3.1.12.0', '-Oqv'), '"');
$sessions = snmp_get($device, '.1.3.6.1.4.1.890.1.6.22.1.6.0', '-Ovq');
if (is_numeric($sessions)) {
$rrd_def = 'DS:sessions:GAUGE:600:0:3000000';
$fields = array(
'sessions' => $sessions,
);
$tags = compact('rrd_def');
data_update($device, 'zywall-sessions', $tags, $fields);
$graphs['zywall_sessions'] = true;
}

View File

@ -0,0 +1,188 @@
MIMOSA-NETWORKS-BASE-MIB DEFINITIONS ::= BEGIN
-- Copyright (C) 2015, Mimosa Networks, Inc. All Rights Reserved.
--
-- Mimosa Networks MIB
-- Revision: 1.00
-- Date: June 03, 2015
--
-- Mimosa Networks, Inc.
-- 300 Orchard City Dr.
-- Campbell, CA 95008
-- support@mimosa.co
--
-- This MIB defines the base MIB specification for Mimosa Network's
-- products.
--
-- Mimosa reserves the right to make changes to this MIB specification as
-- well as other information related to this specification without prior
-- notice. The user of this specification should consult Mimosa Networks,
-- to determine if any such changes have been made.
--
-- Current MIBs are available from Mimosa Networks at the following URLs:
--
-- http://help.mimosa.co
--
-- In no event shall Mimosa Networks, Inc. be liable for any indirect,
-- consequential, special or incidental damages whatsoever (including
-- but not limited to lost profits or lost revenue) arising out of or
-- related to this specification or the information contained in it.
-- This non-liability extends to even if Mimosa Networks Inc. has been
-- advised of, known, or should have known, the potential for such damages.
-- Mimosa Networks, Inc. hereby grants end-users, and other parties a
-- a non-exclusive license to use this MIB specification in order to
-- manage products of Mimosa Networks, Inc.
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, Integer32,
NOTIFICATION-TYPE FROM SNMPv2-SMI
OBJECT-GROUP, NOTIFICATION-GROUP FROM SNMPv2-CONF
enterprises FROM RFC1155-SMI
ifIndex FROM IF-MIB;
-- EXPORTS mimosa...
mimosa MODULE-IDENTITY
LAST-UPDATED "201506030000Z"
ORGANIZATION "Mimosa Networks
www.mimosa.co"
CONTACT-INFO
"postal:
Mimosa Networks, Inc.
300 Orchard City Dr.
Campbell, CA 95008
email: support@mimosa.co"
DESCRIPTION
"Mimosa device MIB definitions"
REVISION "201506030000Z"
DESCRIPTION
"First draft"
::= { enterprises 43356 }
--mimosa OBJECT IDENTIFIER ::= { enterprises 43356 }
mimosaProduct OBJECT IDENTIFIER ::= { mimosa 1 }
mimosaMgmt OBJECT IDENTIFIER ::= { mimosa 2 }
mimosaHardware OBJECT IDENTIFIER ::= { mimosaProduct 1 }
mimosaSoftware OBJECT IDENTIFIER ::= { mimosaProduct 2 }
mimosaB5 OBJECT IDENTIFIER ::= { mimosaHardware 1 }
mimosaB5Lite OBJECT IDENTIFIER ::= { mimosaHardware 2 }
mimosaA5 OBJECT IDENTIFIER ::= { mimosaHardware 3 }
mimosaC5 OBJECT IDENTIFIER ::= { mimosaHardware 4 }
mimosaTrap OBJECT IDENTIFIER ::= { mimosaMgmt 0 }
mimosaMib OBJECT IDENTIFIER ::= { mimosaMgmt 1 }
mimosaMIBGroups OBJECT IDENTIFIER ::= { mimosaMgmt 3 }
mimosaConformanceGroup OBJECT IDENTIFIER ::= { mimosaMgmt 4 }
mimosaTrapMib OBJECT IDENTIFIER ::= { mimosaMib 1 }
mimosaWireless OBJECT IDENTIFIER ::= { mimosaMib 2 }
-- **********************************************************************
-- *** Mimosa General MIB variables are specified below. ***
-- *** These varbinds are common to all Mimosa products. ***
-- **********************************************************************
mimosaTrapMIBGroup OBJECT-GROUP
OBJECTS { mimosaTrapMessage,
mimosaOldSpeed,
mimosaNewSpeed
}
STATUS current
DESCRIPTION
"A collection of objects providing basic Trap function."
::= { mimosaMIBGroups 1 }
mimosaTrapMessage OBJECT-TYPE
SYNTAX OCTET STRING
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"General Octet String object to contain message sent with traps."
::= { mimosaTrapMib 1 }
mimosaOldSpeed OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The speed of the Ethernet link before the change within Ethernet
Speed Change Notifications."
::= { mimosaTrapMib 2 }
mimosaNewSpeed OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The speed of the Ethernet link after the change within Ethernet
Speed Change Notifications."
::= { mimosaTrapMib 3 }
-- **********************************************************************
-- *** Mimosa Generic Traps are specified below. ***
-- *** These traps are common to all Mimosa products. ***
-- **********************************************************************
mimosaGenericNotificationsGroup NOTIFICATION-GROUP
NOTIFICATIONS { mimosaCriticalFault, mimosaTempWarning,
mimosaTempNormal, mimosaEthernetSpeedChange }
STATUS current
DESCRIPTION
"The basic Trap notifications for all Mimosa products."
::= { mimosaMIBGroups 2 }
mimosaCriticalFault NOTIFICATION-TYPE
OBJECTS { mimosaTrapMessage }
STATUS current
DESCRIPTION
"The mimosaCriticalFault notification is sent when the log manager
in the Mimosa product determines that a fault with a critical
severity has been detected. The mimosaCriticalFaultLog contains
the description of the general error."
::= {mimosaTrap 1 }
mimosaTempWarning NOTIFICATION-TYPE
OBJECTS { mimosaTrapMessage }
STATUS current
DESCRIPTION
"The mimosaTempWarning notification is sent when the log manager in
the Mimosa product receives an indication that the temperature is
outside the safe range."
::= {mimosaTrap 2 }
mimosaTempNormal NOTIFICATION-TYPE
OBJECTS { mimosaTrapMessage }
STATUS current
DESCRIPTION
"The mimosaTempNormal notification is sent when the log manager in the
Mimosa product receives an indication that the temperature is with
in the safe range."
::= {mimosaTrap 3 }
mimosaEthernetSpeedChange NOTIFICATION-TYPE
OBJECTS { ifIndex, mimosaOldSpeed, mimosaNewSpeed }
STATUS current
DESCRIPTION
"The mimosaEthernetSpeedChange notification is sent when the log manager
in the Mimosa product determines that a speed change on the Ethernet
port was detected. The mimosaOldSpeed and mimosaNewSpeed indicates the
speed in bits per second of the change. ifIndex is used per the ifTable
in the IF-MIB."
::= {mimosaTrap 4 }
-- Note the following publicly defined traps are also used for Mimosa Product
-- Notifications:
--
-- From SNMPv2-MIB: coldStart, warmStart, linkUp, LinkDown and
-- authenticationFailure
END

View File

@ -0,0 +1,938 @@
MIMOSA-NETWORKS-BFIVE-MIB DEFINITIONS ::= BEGIN
-- Copyright (C) 2015, Mimosa Networks, Inc. All Rights Reserved.
--
-- Mimosa Networks MIB
-- Revision: 1.00
-- Date: June 03, 2015
--
-- Mimosa Networks, Inc.
-- 300 Orchard City Dr.
-- Campbell, CA 95008
-- support@mimosa.co
--
-- This MIB defines the MIB specification for Mimosa Network's Products
--
-- Mimosa reserves the right to make changes to this MIB specification as
-- well as other information related to this specification without prior
-- notice. The user of this specification should consult Mimosa Networks,
-- to determine if any such changes have been made.
--
-- Current MIBs are available from Mimosa Networks at the following URLs:
--
-- http://help.mimosa.co
--
-- In no event shall Mimosa Networks, Inc. be liable for any indirect,
-- consequential, special or incidental damages whatsoever (including
-- but not limited to lost profits or lost revenue) arising out of or
-- related to this specification or the information contained in it.
-- This non-liability extends to even if Mimosa Networks Inc. has been
-- advised of, known, or should have known, the potential for such damages.
-- Mimosa Networks, Inc. hereby grants end-users, and other parties a
-- a non-exclusive license to use this MIB specification in order to
-- manage products of Mimosa Networks, Inc.
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE,
NOTIFICATION-TYPE, Integer32,
Counter32, Counter64, Unsigned32,
TimeTicks, IpAddress FROM SNMPv2-SMI
DisplayString , MacAddress,
RowStatus, TruthValue,
PhysAddress, TEXTUAL-CONVENTION FROM SNMPv2-TC
MODULE-COMPLIANCE, OBJECT-GROUP,
NOTIFICATION-GROUP FROM SNMPv2-CONF
ifIndex FROM IF-MIB
mimosaWireless,
mimosaConformanceGroup FROM MIMOSA-NETWORKS-BASE-MIB;
mimosaB5Module MODULE-IDENTITY
LAST-UPDATED "201506030000Z"
ORGANIZATION "Mimosa Networks
www.mimosa.co"
CONTACT-INFO
"postal:
Mimosa Networks, Inc.
300 Orchard City Dr.
Campbell, CA 95008
email: support@mimosa.co"
DESCRIPTION
"Mimosa device MIB definitions"
REVISION "201506030000Z"
DESCRIPTION
"First draft"
::= { mimosaConformanceGroup 1 }
mimosaGeneral OBJECT IDENTIFIER ::= { mimosaWireless 1 }
mimosaLocInfo OBJECT IDENTIFIER ::= { mimosaWireless 2 }
mimosaWanInfo OBJECT IDENTIFIER ::= { mimosaWireless 3 }
mimosaTdmaInfo OBJECT IDENTIFIER ::= { mimosaWireless 4 }
mimosaMgmtInfo OBJECT IDENTIFIER ::= { mimosaWireless 5 }
mimosaRfInfo OBJECT IDENTIFIER ::= { mimosaWireless 6 }
mimosaPerfInfo OBJECT IDENTIFIER ::= { mimosaWireless 7 }
mimosaServices OBJECT IDENTIFIER ::= { mimosaWireless 8 }
-- *****************************************************************
-- *** Mimosa Textual Conventions ***
-- *****************************************************************
DecimalOne ::= TEXTUAL-CONVENTION
DISPLAY-HINT "d-1"
STATUS current
DESCRIPTION "Fixed point, one decimal"
SYNTAX Integer32
DecimalTwo ::= TEXTUAL-CONVENTION
DISPLAY-HINT "d-2"
STATUS current
DESCRIPTION "Fixed point, two decimals"
SYNTAX Integer32
DecimalFive ::= TEXTUAL-CONVENTION
DISPLAY-HINT "d-5"
STATUS current
DESCRIPTION "Fixed point, five decimals"
SYNTAX Integer32
-- *****************************************************************
-- *** Mimosa General variables are specified below. ***
-- *****************************************************************
mimosaDeviceName OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..64))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The name of the local Mimosa device. This unique identifier could
be the same as the sysName object."
::= { mimosaGeneral 1 }
mimosaSerialNumber OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..64))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The unique serial number of the Mimosa device."
::= { mimosaGeneral 2 }
mimosaFirmwareVersion OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..64))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The version of the currently installed and/or running firmware
on the Mimosa device."
::= { mimosaGeneral 3 }
mimosaFirmwareBuildDate OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..64))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The creation date of the currently installed and/or running
firmware on the Mimosa device."
::= { mimosaGeneral 4 }
mimosaLastRebootTime OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..64))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The last time the Mimosa device rebooted."
::= { mimosaGeneral 5 }
mimosaUnlockCode OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..64))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The code used to unlock the Mimosa device."
::= { mimosaGeneral 6 }
mimosaLEDBrightness OBJECT-TYPE
SYNTAX INTEGER {
auto(1),
low(2),
medium(3),
high(4)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Indicates the intensity of the status indicator lights on the
device exterior. The Auto option adjusts the amount of light
based upon ambient conditions. Manual options include Low,
Medium, and High."
::= { mimosaGeneral 7 }
mimosaInternalTemp OBJECT-TYPE
SYNTAX DecimalOne
UNITS "C"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The internal temperature of the Mimosa device."
::= { mimosaGeneral 8 }
mimosaRegulatoryDomain OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..64))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The country in which the Mimosa device has been configured to run."
::= { mimosaGeneral 9 }
-- **********************************************************************
-- *** Mimosa Device Location variables are specified below. ***
-- **********************************************************************
mimosaLongitude OBJECT-TYPE
SYNTAX DecimalFive
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The Longitude of the Mimosa device location, in 5 decimal points."
::= { mimosaLocInfo 1 }
mimosaLatitude OBJECT-TYPE
SYNTAX DecimalFive
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The Latitude of the Mimosa device location, in 5 decimal points."
::= { mimosaLocInfo 2 }
mimosaAltitude OBJECT-TYPE
SYNTAX Integer32
UNITS "meters"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The Altitude of the Mimosa device location in meters."
::= { mimosaLocInfo 3 }
mimosaSatelliteSNR OBJECT-TYPE
SYNTAX DecimalOne
UNITS "dB"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The average Signal to Noise Ratio (SNR) amongst all of the satellites
detected by the Mimosa device. Display is in 1 decimal point."
::= { mimosaLocInfo 4 }
mimosaSatelliteStrength OBJECT-TYPE
SYNTAX INTEGER {
good(1),
bad(2)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Strength of the satellites based on the number of satellites available.
It is considered good if more than 2 satellites are available."
::= { mimosaLocInfo 5 }
mimosaGPSSatellites OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Total number of GPS satellites detected."
::= { mimosaLocInfo 6 }
mimosaGlonassSatellites OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Total number of GLONASS satellites detected."
::= { mimosaLocInfo 7 }
mimosaClockAccuracy OBJECT-TYPE
SYNTAX DecimalTwo
UNITS "PPB"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Timing signal accuracy measured in parts per billion (PPB) by the
Mimosa device. Display is in 2 decimal points."
::= { mimosaLocInfo 8 }
-- **********************************************************************
-- *** Mimosa Device TDMA Information variables are specified below. ***
-- **********************************************************************
mimosaWirelessMode OBJECT-TYPE
SYNTAX INTEGER {
accessPoint(1),
station(2)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Describes wherger the Mimosa device acts as an access point or station."
::= { mimosaTdmaInfo 1 }
mimosaWirelessProtocol OBJECT-TYPE
SYNTAX INTEGER {
tdma(1),
csma(2)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Describes the wireless protocol configured on the Mimosa device.
Both TDMA and CSMA are supported. TDMA is a deterministic protocol
where each device is assigned a time slot during which it is allowed
to transmit. This allows for collocated radios to utilize the same
channel and avoid Tx/Rx collisions and interference."
::= { mimosaTdmaInfo 2 }
mimosaTDMAMode OBJECT-TYPE
SYNTAX INTEGER {
a(1),
b(2)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies the TDMA Gender of the radio (A or B)."
::= { mimosaTdmaInfo 3 }
mimosaTDMAWindow OBJECT-TYPE
SYNTAX Integer32
UNITS "ms"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies the length of the transmit time slot in milliseconds."
::= { mimosaTdmaInfo 4 }
mimosaTrafficSplit OBJECT-TYPE
SYNTAX INTEGER {
symmetric(1),
asymmetric(2),
auto(3)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The radio can be configured to allocate bandwidth symmetrically (50/50)
or asymmetrically (75/25 or 25/75) in environments where traffic
direction is expected to be heavier in one direction than the other.
With an asymmetrical split, the local radio is represented first in the
slash notation, (local/remote). For example, in the (75/25) split, the
local radio gets 75, while the remote radio gets 25. If Auto is selected
the radio will automatically determine, based upon traffic flow, which
ratio will be used. The radio will continue to evaluate the flow and
adjust accordingly."
::= { mimosaTdmaInfo 5 }
-- **********************************************************************
-- *** Mimosa Device Radio Information variables are specified below. ***
-- **********************************************************************
mimosaChainTable OBJECT-TYPE
SYNTAX SEQUENCE OF MimosaChainEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A list of RF chain entries, which is part of MIMO tables. MIMO stands
for Multiple In Multiple Out."
::= { mimosaRfInfo 1 }
mimosaChainEntry OBJECT-TYPE
SYNTAX MimosaChainEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An entry containing chain information applicable to a particular
RF chain."
INDEX { mimosaChain }
::= { mimosaChainTable 1 }
MimosaChainEntry ::=
SEQUENCE {
mimosaChain Integer32,
mimosaTxPower DecimalOne,
mimosaRxPower DecimalOne,
mimosaRxNoise DecimalOne,
mimosaSNR DecimalOne,
mimosaCenterFreq Integer32,
mimosaPolarization INTEGER
}
mimosaChain OBJECT-TYPE
SYNTAX Integer32 (0..65535)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"An index which is used to access a particular entry in the chain table."
::= { mimosaChainEntry 1 }
mimosaTxPower OBJECT-TYPE
SYNTAX DecimalOne
UNITS "dBm"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies the transmit power of the given RF chain. A value of -8 means
this particular TxChain is not a valid entry."
::= { mimosaChainEntry 2 }
mimosaRxPower OBJECT-TYPE
SYNTAX DecimalOne
UNITS "dBm"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies the receive power of the given RF chain. A value of -100
means this particular RxChain is not a valid entry (SNR must be -100)."
::= { mimosaChainEntry 3 }
mimosaRxNoise OBJECT-TYPE
SYNTAX DecimalOne
UNITS "dBm"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies the received noise level for the given RF chain."
::= { mimosaChainEntry 4 }
mimosaSNR OBJECT-TYPE
SYNTAX DecimalOne
UNITS "dB"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Indicates the Signal to Noise Ratio (SNR) for the given RF chain.
A value of -100 means this particular RxChain is not a valid entry."
::= { mimosaChainEntry 5 }
mimosaCenterFreq OBJECT-TYPE
SYNTAX Integer32
UNITS "MHz"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The center frequency for the given RF chain. A value of 0 means this
particular Chain is not a valid entry."
::= { mimosaChainEntry 6 }
mimosaPolarization OBJECT-TYPE
SYNTAX INTEGER {
horizontal(1),
vertical(2)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The ploarization of the given RF chain. It could be horizontal or
vertical."
::= { mimosaChainEntry 7 }
mimosaStreamTable OBJECT-TYPE
SYNTAX SEQUENCE OF MimosaStreamEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A list of data stream entries, which are part of MIMO tables. MIMO
stands for Multiple In Multiple Out."
::= { mimosaRfInfo 2 }
mimosaStreamEntry OBJECT-TYPE
SYNTAX MimosaStreamEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The entry containing information applicable to a particular stream."
INDEX { mimosaStream }
::= { mimosaStreamTable 1 }
MimosaStreamEntry ::=
SEQUENCE {
mimosaStream Integer32,
mimosaTxPhy Integer32,
mimosaTxMCS Integer32,
mimosaRxPhy Integer32,
mimosaRxMCS Integer32,
mimosaRxEVM DecimalOne
}
mimosaStream OBJECT-TYPE
SYNTAX Integer32 (0..65535)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The index used to access a particular entry in the stream table."
::= { mimosaStreamEntry 1 }
mimosaTxPhy OBJECT-TYPE
SYNTAX Integer32
UNITS "Mbps"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies the transmit rate of the given data stream."
::= { mimosaStreamEntry 2 }
mimosaTxMCS OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies the transmit MCS of the given data stream. A value of
-1 means this particular TxStream is not a valid entry."
::= { mimosaStreamEntry 3 }
mimosaRxPhy OBJECT-TYPE
SYNTAX Integer32
UNITS "Mbps"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies the receive rate of the given data stream."
::= { mimosaStreamEntry 4 }
mimosaRxMCS OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies the receive MCS of the given data stream. A value of
-1 means this particular RxStream is not a valid entry."
::= { mimosaStreamEntry 5 }
mimosaRxEVM OBJECT-TYPE
SYNTAX DecimalOne
UNITS "dB"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies the receive Error Vector Magnitude (EVM) of the given data
stream."
::= { mimosaStreamEntry 6 }
mimosaChannelTable OBJECT-TYPE
SYNTAX SEQUENCE OF MimosaChannelEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"A list of RF channel entries on the Mimosa device."
::= { mimosaRfInfo 3 }
mimosaChannelEntry OBJECT-TYPE
SYNTAX MimosaChannelEntry
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The entry containing management information applicable to a particular
channel."
INDEX { mimosaChannel }
::= { mimosaChannelTable 1 }
MimosaChannelEntry ::=
SEQUENCE {
mimosaChannel Integer32,
mimosaChannelMode INTEGER,
mimosaChannelWidth Integer32,
mimosaChannelTxPower DecimalOne,
mimosaChannelCenterFreq Integer32
}
mimosaChannel OBJECT-TYPE
SYNTAX Integer32 (0..65535)
MAX-ACCESS not-accessible
STATUS current
DESCRIPTION
"The index used to access a particular entry in the RF channel table."
::= { mimosaChannelEntry 1 }
mimosaChannelMode OBJECT-TYPE
SYNTAX INTEGER {
transmit(1),
receive(2),
bidirectional(3)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies the mode for the given channel. The transmit or receive
values indicate Frequency Diversity (FD) mode is in use. The
bidirectional value means that the channel is used for both transmit
and receive in all other single or dual channel modes."
::= { mimosaChannelEntry 2 }
mimosaChannelWidth OBJECT-TYPE
SYNTAX Integer32
UNITS "MHz"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies the channel width of the given channel."
::= { mimosaChannelEntry 3 }
mimosaChannelTxPower OBJECT-TYPE
SYNTAX DecimalOne
UNITS "dBm"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies the transmit power level on the channel. If Channel Width
is set to 1xN MHz, Channel 2 is not be used. In Frequency Diversity mode,
Power 1 and Power 2 represent transmit power on the local and remote
sides, respectively."
::= { mimosaChannelEntry 4 }
mimosaChannelCenterFreq OBJECT-TYPE
SYNTAX Integer32
UNITS "MHz"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies the center frequency of the channel used on the link. In all
modes, the center frequency represents the absolute center of the
selected channel width without any offset, and the center can be moved
in 5 MHz increments.
A value of 0 means this particular channel is not a valid entry."
::= { mimosaChannelEntry 5 }
mimosaAntennaGain OBJECT-TYPE
SYNTAX Integer32
UNITS "dBi"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The antenna gain on the Mimosa device."
::= { mimosaRfInfo 4 }
mimosaTotalTxPower OBJECT-TYPE
SYNTAX DecimalOne
UNITS "dBm"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The total transmit power for all the channels on the Mimosa device."
::= { mimosaRfInfo 5 }
mimosaTotalRxPower OBJECT-TYPE
SYNTAX DecimalOne
UNITS "dBm"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The total receive power for all the channels on the Mimosa device."
::= { mimosaRfInfo 6 }
mimosaTargetSignalStrength OBJECT-TYPE
SYNTAX DecimalOne
UNITS "dB"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The calculated target receive signal strength based on device coordinates and settings."
::= { mimosaRfInfo 7 }
-- **********************************************************************
-- *** Mimosa Device WAN Information variables are specified below. ***
-- **********************************************************************
mimosaWanSsid OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..64))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The wireless link name used by both radios. Both AP and Station must
use the same SSID to communicate with each other."
::= { mimosaWanInfo 1 }
mimosaWanMac OBJECT-TYPE
SYNTAX PhysAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The MAC address used for the wireless link."
::= { mimosaWanInfo 2 }
mimosaWanStatus OBJECT-TYPE
SYNTAX INTEGER {
connected(1),
disconnected(2)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The wireless link status between the Mimosa devices."
::= { mimosaWanInfo 3 }
mimosaWanUpTime OBJECT-TYPE
SYNTAX TimeTicks
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The wireless link up time since last reboot."
::= { mimosaWanInfo 4 }
-- ****************************************************************************
-- *** Mimosa Device Performance Information variables are specified below. ***
-- ****************************************************************************
mimosaPhyTxRate OBJECT-TYPE
SYNTAX DecimalTwo
UNITS "kbps"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The transmit packet rate at the physical level over a 5 second interval."
::= { mimosaPerfInfo 1 }
mimosaPhyRxRate OBJECT-TYPE
SYNTAX DecimalTwo
UNITS "kbps"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The receive packet rate at the physical level over a 5 second interval."
::= { mimosaPerfInfo 2 }
mimosaPerTxRate OBJECT-TYPE
SYNTAX DecimalTwo
UNITS "%"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The trasnmit Packet Error Rate (PER) over a 5 second interval. It is
caluculated as packets with errors versuss packets without errors."
::= { mimosaPerfInfo 3 }
mimosaPerRxRate OBJECT-TYPE
SYNTAX DecimalTwo
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The receive Packet Error Rate (PER) over a 5 second interval. It is
caluculated as packets with errors versuss packets without errors."
::= { mimosaPerfInfo 4 }
-- ****************************************************************************
-- *** Mimosa Device Management Information variables are specified below. ***
-- ****************************************************************************
mimosaNetworkMode OBJECT-TYPE
SYNTAX INTEGER {
enabled(1),
disabled(2),
auto(3)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies the mode for the local 2.4 GHz wireless network operation.
If Auto is selected, the 2.4 GHz management network is turned on for a
limited time (defined in Console Timeout ) after boot and then turned
off if there is no activity. If a user associates with the radio within
the timeout period, they will not be disconnected."
::= { mimosaMgmtInfo 1 }
mimosaRecoverySsid OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..32))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The recovery SSID that allows the device to be reset to factory
defaults. This is available for 10 minutes after device boot. Disabling
the 2.4 GHz management network will not impact availability of this
option. The serial number of the device must be known in order to
perform the factory reset."
::= { mimosaMgmtInfo 2 }
mimosaLocalSsid OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..32))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The SSID for managing the local 2.4 GHz wireless interface."
::= { mimosaMgmtInfo 3 }
mimosaLocalChannel OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The channel used for the local 2.4 GHz wireless interface."
::= { mimosaMgmtInfo 4 }
mimosaConsoleTimeout OBJECT-TYPE
SYNTAX Integer32
UNITS "min"
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The amount inactivity on the 2.4 GHz wireless interface before
turning it off in Auto mode."
::= { mimosaMgmtInfo 5 }
mimosaMaxClients OBJECT-TYPE
SYNTAX Integer32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The maximum number of wireless clients that can simultaneously access
the 2.4 GHz management interface."
::= { mimosaMgmtInfo 6 }
mimosaLocalMac OBJECT-TYPE
SYNTAX PhysAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The MAC address used for 2.4 GHz wireless link."
::= { mimosaMgmtInfo 7 }
mimosaLocalIpAddr OBJECT-TYPE
SYNTAX IpAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The IP address assigned to the 2.4 GHz wireless link."
::= { mimosaMgmtInfo 8 }
mimosaLocalNetMask OBJECT-TYPE
SYNTAX IpAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The IP netmask assigned to the 2.4 GHz wireless link."
::= { mimosaMgmtInfo 9 }
mimosaLocalGateway OBJECT-TYPE
SYNTAX IpAddress
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The IP address of the gateway for the 2.4 GHz wireless link."
::= { mimosaMgmtInfo 10 }
mimosaFlowControl OBJECT-TYPE
SYNTAX INTEGER {
enabled(1),
disabled(2)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies whether Flow Control is enabled on the Mimosa device."
::= { mimosaMgmtInfo 11 }
-- *************************************************************************
-- *** Mimosa Device Services Information variables are specified below. ***
-- *************************************************************************
mimosaHttpsEnabled OBJECT-TYPE
SYNTAX INTEGER {
enabled(1),
disabled(2)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies whether HTTPS is enabled on the Mimosa device."
::= { mimosaServices 1 }
mimosaMgmtVlanEnabled OBJECT-TYPE
SYNTAX INTEGER {
enabled(1),
disabled(2)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies whether the Management VLAN is enabled on the Mimosa device."
::= { mimosaServices 2 }
mimosaMgmtCloudEnabled OBJECT-TYPE
SYNTAX INTEGER {
enabled(1),
disabled(2)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies whether the Management Cloud is enabled on the Mimosa device."
::= { mimosaServices 3 }
mimosaRestMgmtEnabled OBJECT-TYPE
SYNTAX INTEGER {
enabled(1),
disabled(2)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies whether the REST management is enabled on the Mimosa device."
::= { mimosaServices 4 }
mimosaPingWatchdogEnabled OBJECT-TYPE
SYNTAX INTEGER {
enabled(1),
disabled(2)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies whether the IP Ping watchdog is enabled on the Mimosa device.
This is used to reset the device if a configured IP address is
not reached in certain number of retries."
::= { mimosaServices 5 }
mimosaSyslogEnabled OBJECT-TYPE
SYNTAX INTEGER {
enabled(1),
disabled(2)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies whether the Syslog client is enabled on the Mimosa device.
Syslog client sends the log messages to configured syslog server."
::= { mimosaServices 6 }
mimosaNtpMode OBJECT-TYPE
SYNTAX INTEGER {
custom(1),
standard(2)
}
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies whether the NTP client is configured to use standard servers
from NIST, NTP organizations or custom NTP server."
::= { mimosaServices 7 }
mimosaNtpServer OBJECT-TYPE
SYNTAX DisplayString (SIZE (0..64))
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"Specifies the name or address of the custom NTP server."
::= { mimosaServices 8 }
END

1
sql-schema/146.sql Normal file
View File

@ -0,0 +1 @@
INSERT INTO `graph_types`(`graph_type`, `graph_subtype`, `graph_section`, `graph_descr`, `graph_order`) VALUES ('device', 'sonicwall_sessions', 'firewall', 'Active Sessions', '');

2
sql-schema/147.sql Normal file
View File

@ -0,0 +1,2 @@
INSERT INTO config VALUES ('','alert.transports.osticket.url','','','osTicket API URL','alerting',0, 'transports', 0, 0, 0);
INSERT INTO config VALUES ('','alert.transports.osticket.token','','','osTicket API Token','alerting',0, 'transports', 0, 0, 0);

1
sql-schema/148.sql Normal file
View File

@ -0,0 +1 @@
INSERT INTO `graph_types`(`graph_type`, `graph_subtype`, `graph_section`, `graph_descr`, `graph_order`) VALUES ('device', 'zywall_sessions', 'firewall', 'Sessions', '');

View File

@ -101,8 +101,8 @@ if (function_exists('posix_getpwuid')) {
} else {
$username = getenv('USERNAME') ?: getenv('USER'); //http://php.net/manual/en/function.get-current-user.php
}
if ($username !== 'root') {
print_fail("You need to run this script as root");
if (!($username === 'root' || (isset($config['user']) && $username === $config['user']))) {
print_fail('You need to run this script as root' . (isset($config['user']) ? ' or '.$config['user'] : ''));
}
if ($config['update_channel'] == 'master' && $cur_sha != $versions['github']['sha']) {
@ -238,9 +238,9 @@ if (dbFetchCell('SELECT COUNT(`device_id`) FROM `devices` WHERE `last_discovered
// check poller
if (dbFetchCell('SELECT COUNT(`device_id`) FROM `devices` WHERE `last_polled` IS NOT NULL') == 0) {
print_fail('The poller has never run, check the cron job');
} elseif (dbFetchCell("SELECT COUNT(`device_id`) FROM `devices` WHERE `last_polled` <= DATE_ADD(NOW(), INTERVAL - 5 minute) AND `ignore` = 0 AND `disabled` = 0 AND `status` = 1") > 0) {
} elseif (dbFetchCell("SELECT COUNT(`device_id`) FROM `devices` WHERE `last_polled` < DATE_ADD(NOW(), INTERVAL - 5 minute) AND `ignore` = 0 AND `disabled` = 0 AND `status` = 1") > 0) {
print_fail("The poller has not run in the last 5 minutes, check the cron job");
} elseif (dbFetchCell("SELECT COUNT(`device_id`) FROM `devices` WHERE (`last_polled` <= DATE_ADD(NOW(), INTERVAL - 5 minute) OR `last_polled` IS NULL) AND `ignore` = 0 AND `disabled` = 0 AND `status` = 1") > 0) {
} elseif (dbFetchCell("SELECT COUNT(`device_id`) FROM `devices` WHERE (`last_polled` < DATE_ADD(NOW(), INTERVAL - 5 minute) OR `last_polled` IS NULL) AND `ignore` = 0 AND `disabled` = 0 AND `status` = 1") > 0) {
print_warn("Some devices have not been polled in the last 5 minutes, check your poll log");
}