mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Addes support for infoblox devices
This commit is contained in:
57
html/includes/graphs/device/ib_dhcp_messages.inc.php
Normal file
57
html/includes/graphs/device/ib_dhcp_messages.inc.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename('ib_dhcp_messages.rrd');
|
||||
$rrd_options .= " --vertical-label='Messages per minute'";
|
||||
|
||||
$stats = array(
|
||||
'request' => '#FFAB00FF',
|
||||
'ack' => '#007283FF',
|
||||
'discover' => '#74C366FF',
|
||||
'offer' => '#B1441EFF',
|
||||
'inform' => '#8D85F3FF',
|
||||
'nack' => '#FAFD9EFF',
|
||||
'release' => '#96E78AFF',
|
||||
'decline' => '#FF0000FF',
|
||||
'other' => '#8F9286FF',
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
foreach ($stats as $stat => $color) {
|
||||
$i++;
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = ucfirst ($stat);
|
||||
$rrd_list[$i]['ds'] = $stat;
|
||||
|
||||
# Set up DEFs
|
||||
$rrd_options .= " DEF:".$stat."=".$rrd_filename.':'.$stat.':AVERAGE ';
|
||||
|
||||
# Set up CDEFS to multiply with 60 to get per minute value
|
||||
$rrd_options .= " 'CDEF:cdef".$stat."=".$stat.",60,*'";
|
||||
|
||||
# Set up area graphing with stacking
|
||||
if ( $i == "0" ) {
|
||||
$rrd_options .= " 'AREA:cdef".$stat . $color.":".ucfirst($stat)."'";
|
||||
} else {
|
||||
$rrd_options .= " 'AREA:cdef".$stat . $color.":".ucfirst($stat).":STACK'";
|
||||
}
|
||||
|
||||
# Set up legend, with consistent indent
|
||||
$filler = 8 - strlen($stat);
|
||||
$current_pad = str_pad("", $filler, ' ', STR_PAD_LEFT);
|
||||
$rrd_options .= " 'GPRINT:cdef".$stat.":LAST:".$current_pad."Current\:%8.0lf'";
|
||||
$rrd_options .= " 'GPRINT:cdef".$stat.":AVERAGE:Average\:%8.0lf'";
|
||||
$rrd_options .= " 'GPRINT:cdef".$stat.":MAX:Maximum\:%8.0lf\\n'";
|
||||
}
|
||||
|
||||
// Set up Total value
|
||||
$rrd_options .= " 'CDEF:cdeftotal=cdefrequest,cdefack,cdefdiscover,cdefoffer,
|
||||
cdefinform,cdefnack,cdefrelease,cdefdecline,cdefother,+,+,+,+,+,+,+,+'";
|
||||
$rrd_options .= " 'LINE1:cdeftotal#000000FF:Total'";
|
||||
$filler = 8 - strlen("Total");
|
||||
$current_pad = str_pad("", $filler, ' ', STR_PAD_LEFT);
|
||||
$rrd_options .= " 'GPRINT:cdeftotal:LAST:".$current_pad."Current\:%8.0lf'";
|
||||
$rrd_options .= " 'GPRINT:cdeftotal:AVERAGE:Average\:%8.0lf'";
|
||||
$rrd_options .= " 'GPRINT:cdeftotal:MAX:Maximum\:%8.0lf\\n'";
|
||||
|
50
html/includes/graphs/device/ib_dns_dyn_updates.inc.php
Normal file
50
html/includes/graphs/device/ib_dns_dyn_updates.inc.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename('ib_dns_dyn_updates.rrd');
|
||||
$rrd_options .= " --vertical-label='Updates per minute'";
|
||||
$rrd_options .= " --lower-limit='0'";
|
||||
|
||||
$stats = array(
|
||||
'success' => '#74C366FF',
|
||||
'failure' => '#007283FF',
|
||||
'reject' => '#FFAB00FF',
|
||||
'prereq_reject' => '#B1441EFF',
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
foreach ($stats as $stat => $color) {
|
||||
$i++;
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = ucfirst ($stat);
|
||||
$rrd_list[$i]['ds'] = $stat;
|
||||
|
||||
# Set up DEFs
|
||||
$rrd_options .= " DEF:".$stat."=".$rrd_filename.':'.$stat.':AVERAGE ';
|
||||
|
||||
# Set up CDEFS to multiply with 60 to get per minute value
|
||||
$rrd_options .= " 'CDEF:cdef".$stat."=".$stat.",60,*'";
|
||||
|
||||
# Set up area graphing with stacking
|
||||
if ( $i == "0" ) {
|
||||
$rrd_options .= " 'AREA:cdef".$stat . $color.":".$stat."'";
|
||||
} else {
|
||||
$rrd_options .= " 'AREA:cdef".$stat . $color.":".$stat.":STACK'";
|
||||
}
|
||||
|
||||
# Set up legend, with consistent indent
|
||||
$filler = 15 - strlen($stat);
|
||||
$current_pad = str_pad("", $filler, ' ', STR_PAD_LEFT);
|
||||
$rrd_options .= " 'GPRINT:cdef".$stat.":LAST: ".$current_pad."Current\:%8.0lf'";
|
||||
$rrd_options .= " 'GPRINT:cdef".$stat.":AVERAGE:Average\:%8.0lf'";
|
||||
$rrd_options .= " 'GPRINT:cdef".$stat.":MAX:Maximum\:%8.0lf\\n'";
|
||||
}
|
||||
|
||||
# Add total value
|
||||
$rrd_options .= " 'CDEF:cdeftotal=cdefsuccess,cdeffailure,cdefreject,cdefprereq_reject,+,+,+'";
|
||||
$rrd_options .= " 'LINE1:cdeftotal#000000FF:Total'";
|
||||
$filler = 16 - strlen("Total");
|
||||
$current_pad = str_pad("", $filler, ' ', STR_PAD_LEFT);
|
||||
$rrd_options .= " 'GPRINT:cdeftotal:LAST:".$current_pad."Current\:%8.0lf'";
|
||||
$rrd_options .= " 'GPRINT:cdeftotal:AVERAGE:Average\:%8.0lf'";
|
||||
$rrd_options .= " 'GPRINT:cdeftotal:MAX:Maximum\:%8.0lf\\n'";
|
48
html/includes/graphs/device/ib_dns_performance.inc.php
Normal file
48
html/includes/graphs/device/ib_dns_performance.inc.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename('ib_dns_performance.rrd');
|
||||
$rrd_options .= " --vertical-label='Answer time in milliseconds'";
|
||||
$rrd_options .= " --lower-limit='0'";
|
||||
|
||||
$stats = array(
|
||||
'PerfAA' => '#74C366FF',
|
||||
'PerfnonAA' => '#007283FF',
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
foreach ($stats as $stat => $color) {
|
||||
$i++;
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = ucfirst ($stat);
|
||||
$rrd_list[$i]['ds'] = $stat;
|
||||
|
||||
# Set up DEFs
|
||||
$rrd_options .= " DEF:".$stat."=".$rrd_filename.':'.$stat.':AVERAGE ';
|
||||
|
||||
# Set up area graphing with stacking
|
||||
if ( $i == "0" ) {
|
||||
$rrd_options .= " 'AREA:".$stat . $color.":".$stat."'";
|
||||
} else {
|
||||
$rrd_options .= " 'AREA:".$stat . $color.":".$stat.":STACK'";
|
||||
}
|
||||
|
||||
# Set up legend, with consistent indent
|
||||
$filler = 15 - strlen($stat);
|
||||
$current_pad = str_pad("", $filler, ' ', STR_PAD_LEFT);
|
||||
$rrd_options .= " 'GPRINT:".$stat.":LAST: ".$current_pad."Current\:%8.0lf'";
|
||||
$rrd_options .= " 'GPRINT:".$stat.":AVERAGE:Average\:%8.0lf'";
|
||||
$rrd_options .= " 'GPRINT:".$stat.":MAX:Maximum\:%8.0lf\\n'";
|
||||
}
|
||||
|
||||
# Add total value
|
||||
$rrd_options .= " 'CDEF:cdeftotal=PerfAA,PerfnonAA,+'";
|
||||
$rrd_options .= " 'LINE1:cdeftotal#000000FF:Total'";
|
||||
$filler = 16 - strlen("Total");
|
||||
$current_pad = str_pad("", $filler, ' ', STR_PAD_LEFT);
|
||||
$rrd_options .= " 'GPRINT:cdeftotal:LAST:".$current_pad."Current\:%8.0lf'";
|
||||
$rrd_options .= " 'GPRINT:cdeftotal:AVERAGE:Average\:%8.0lf'";
|
||||
$rrd_options .= " 'GPRINT:cdeftotal:MAX:Maximum\:%8.0lf\\n'";
|
||||
|
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = $config['rrd_dir'].'/'.$device['hostname'].'/'.safename('ib_dns_request_return_codes.rrd');
|
||||
$rrd_options .= " --vertical-label='Requests per second'";
|
||||
$rrd_options .= " --lower-limit='0'";
|
||||
|
||||
$stats = array(
|
||||
'success' => '#74C366FF',
|
||||
'failure' => '#007283FF',
|
||||
'nxdomain' => '#FFAB00FF',
|
||||
'nxrrset' => '#B1441EFF',
|
||||
);
|
||||
|
||||
$i = 0;
|
||||
foreach ($stats as $stat => $color) {
|
||||
$i++;
|
||||
$rrd_list[$i]['filename'] = $rrd_filename;
|
||||
$rrd_list[$i]['descr'] = ucfirst ($stat);
|
||||
$rrd_list[$i]['ds'] = $stat;
|
||||
|
||||
# Set up DEFs
|
||||
$rrd_options .= " DEF:".$stat."=".$rrd_filename.':'.$stat.':AVERAGE ';
|
||||
|
||||
# Set up CDEFS to multiply with 1 to get per second value
|
||||
$rrd_options .= " 'CDEF:cdef".$stat."=".$stat.",1,*'";
|
||||
|
||||
# Set up area graphing with stacking
|
||||
if ( $i == "0" ) {
|
||||
$rrd_options .= " 'AREA:cdef".$stat . $color.":".ucfirst($stat)."'";
|
||||
} else {
|
||||
$rrd_options .= " 'AREA:cdef".$stat . $color.":".ucfirst($stat).":STACK'";
|
||||
}
|
||||
|
||||
# Set up legend, with consistent indent
|
||||
$filler = 15 - strlen($stat);
|
||||
$current_pad = str_pad("", $filler, ' ', STR_PAD_LEFT);
|
||||
$rrd_options .= " 'GPRINT:cdef".$stat.":LAST: ".$current_pad."Current\:%8.0lf%s'";
|
||||
$rrd_options .= " 'GPRINT:cdef".$stat.":AVERAGE:Average\:%8.0lf'";
|
||||
$rrd_options .= " 'GPRINT:cdef".$stat.":MAX:Maximum\:%8.0lf\\n'";
|
||||
|
||||
$statstring .= "cdef".$stat.",";
|
||||
}
|
||||
|
||||
# Add total value
|
||||
$rrd_options .= " 'CDEF:cdeftotal=".$statstring."+,+,+'";
|
||||
$rrd_options .= " 'LINE1:cdeftotal#000000FF:Total'";
|
||||
$filler = 16 - strlen("Total");
|
||||
$current_pad = str_pad("", $filler, ' ', STR_PAD_LEFT);
|
||||
$rrd_options .= " 'GPRINT:cdeftotal:LAST:".$current_pad."Current\:%8.0lf'";
|
||||
$rrd_options .= " 'GPRINT:cdeftotal:AVERAGE:Average\:%8.0lf'";
|
||||
$rrd_options .= " 'GPRINT:cdeftotal:MAX:Maximum\:%8.0lf\\n'";
|
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
// Observium Includes
|
||||
require_once $config['install_dir'].'/includes/dbFacile.php';
|
||||
require_once $config['install_dir'].'/includes/mergecnf.inc.php';
|
||||
|
||||
@@ -167,12 +168,6 @@ $config['os'][$os]['type'] = 'storage';
|
||||
$config['os'][$os]['group'] = 'unix';
|
||||
$config['os'][$os]['text'] = 'QNAP TurboNAS';
|
||||
$config['os'][$os]['ifXmcbc'] = 1;
|
||||
$config['os'][$os]['over'][0]['graph'] = 'device_processor';
|
||||
$config['os'][$os]['over'][0]['text'] = 'Processor Usage';
|
||||
$config['os'][$os]['over'][1]['graph'] = 'device_mempool';
|
||||
$config['os'][$os]['over'][1]['text'] = 'Memory Usage';
|
||||
$config['os'][$os]['over'][2]['graph'] = 'device_storage';
|
||||
$config['os'][$os]['over'][2]['text'] = 'Storage Usage';
|
||||
|
||||
$os = 'netapp';
|
||||
$config['os'][$os]['type'] = 'storage';
|
||||
@@ -228,6 +223,7 @@ $config['os'][$os]['over'][1]['text'] = 'Processor Usage';
|
||||
$config['os'][$os]['over'][2]['graph'] = 'device_mempool';
|
||||
$config['os'][$os]['over'][2]['text'] = 'Memory Usage';
|
||||
|
||||
|
||||
// Other Unix-based OSes here please.
|
||||
$os = 'freebsd';
|
||||
$config['os'][$os]['type'] = 'server';
|
||||
@@ -516,14 +512,6 @@ $config['os'][$os]['icon'] = 'saf';
|
||||
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
|
||||
$config['os'][$os]['over'][0]['text'] = 'Traffic';
|
||||
|
||||
// Sub10
|
||||
$os = 'sub10';
|
||||
$config['os'][$os]['text'] = 'Sub10 Systems';
|
||||
$config['os'][$os]['type'] = 'wireless';
|
||||
$config['os'][$os]['icon'] = 'sub10';
|
||||
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
|
||||
$config['os'][$os]['over'][0]['text'] = 'Traffic';
|
||||
|
||||
// Supermicro Switch
|
||||
$os = 'supermicro-switch';
|
||||
$config['os'][$os]['group'] = 'supermicro';
|
||||
@@ -777,11 +765,11 @@ $config['os'][$os]['over'][0]['graph'] = 'device_bits';
|
||||
$config['os'][$os]['over'][0]['text'] = 'Device Traffic';
|
||||
$config['os'][$os]['over'][1]['graph'] = 'device_processor';
|
||||
$config['os'][$os]['over'][1]['text'] = 'CPU Usage';
|
||||
|
||||
// $config['os'][$os]['over'][2]['graph'] = "device_mempool";
|
||||
// $config['os'][$os]['over'][2]['text'] = "Memory Usage";
|
||||
$os = 'powervault';
|
||||
$config['os'][$os]['text'] = 'Dell PowerVault';
|
||||
$config['os'][$os]['icon'] = 'dell';
|
||||
$config['os'][$os]['type'] = 'storage';
|
||||
|
||||
$os = 'equallogic';
|
||||
$config['os'][$os]['text'] = 'Dell EqualLogic';
|
||||
@@ -952,7 +940,7 @@ $config['os'][$os]['text'] = 'ZyXEL Prestige';
|
||||
$config['os'][$os]['type'] = 'network';
|
||||
$config['os'][$os]['icon'] = 'zyxel';
|
||||
|
||||
$os = 'zynos';
|
||||
$os = 'zyxeles';
|
||||
$config['os'][$os]['text'] = 'ZyXEL Ethernet Switch';
|
||||
$config['os'][$os]['type'] = 'network';
|
||||
$config['os'][$os]['icon'] = 'zyxel';
|
||||
@@ -1420,14 +1408,6 @@ $config['os'][$os]['icon'] = 'ligowave';
|
||||
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
|
||||
$config['os'][$os]['over'][0]['text'] = 'Traffic';
|
||||
|
||||
// HWGroup Poseidon
|
||||
$os = 'poseidon';
|
||||
$config['os'][$os]['text'] = 'Poseidon';
|
||||
$config['os'][$os]['type'] = 'environment';
|
||||
$config['os'][$os]['icon'] = 'generic';
|
||||
$config['os'][$os]['over'][0]['graph'] = 'device_bits';
|
||||
$config['os'][$os]['over'][0]['text'] = 'Traffic';
|
||||
|
||||
// Appliances
|
||||
$os = 'fortios';
|
||||
$config['os'][$os]['text'] = 'FortiOS';
|
||||
@@ -1440,6 +1420,12 @@ $config['os'][$os]['over'][1]['text'] = 'CPU Usage';
|
||||
$config['os'][$os]['over'][2]['graph'] = 'device_mempool';
|
||||
$config['os'][$os]['over'][2]['text'] = 'Memory Usage';
|
||||
|
||||
$os = 'nios';
|
||||
$config['os'][$os]['text'] = 'Infoblox';
|
||||
$config['os'][$os]['type'] = 'appliance';
|
||||
$config['os'][$os]['icon'] = 'infoblox';
|
||||
|
||||
|
||||
// Graph Types
|
||||
require_once $config['install_dir'].'/includes/load_db_graph_types.inc.php';
|
||||
|
||||
@@ -1567,31 +1553,6 @@ $config['graph_types']['device']['siklu_rfinterfaceOtherOctets']['section'] = 'w
|
||||
$config['graph_types']['device']['siklu_rfinterfaceOtherOctets']['order'] = '6';
|
||||
$config['graph_types']['device']['siklu_rfinterfaceOtherOctets']['descr'] = 'Other Octets';
|
||||
|
||||
// Sub10 support
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclTxPower']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclTxPower']['order'] = '0';
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclTxPower']['descr'] = 'Radio Transmit Power';
|
||||
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclRxPower']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclRxPower']['order'] = '1';
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclRxPower']['descr'] = 'Radio Receive Power';
|
||||
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclVectErr']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclVectErr']['order'] = '3';
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclVectErr']['descr'] = 'Radio Vector Error';
|
||||
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclLnkLoss']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclLnkLoss']['order'] = '3';
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclLnkLoss']['descr'] = 'Radio Link Loss';
|
||||
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclAFER']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclAFER']['order'] = '4';
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclAFER']['descr'] = 'Radio Air Frame Error Rate';
|
||||
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclDataRate']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclDataRate']['order'] = '4';
|
||||
$config['graph_types']['device']['sub10_sub10RadioLclDataRate']['descr'] = 'Data Rate on the Airside interface';
|
||||
|
||||
$config['graph_types']['device']['wifi_clients']['section'] = 'wireless';
|
||||
$config['graph_types']['device']['wifi_clients']['order'] = '0';
|
||||
$config['graph_types']['device']['wifi_clients']['descr'] = 'Wireless Clients';
|
||||
@@ -1636,6 +1597,20 @@ $config['graph_types']['device']['pulse_sessions']['section'] = 'firewall';
|
||||
$config['graph_types']['device']['pulse_sessions']['order'] = '0';
|
||||
$config['graph_types']['device']['pulse_sessions']['descr'] = 'Active Sessions';
|
||||
|
||||
// Infoblox dns/dhcp Graphs
|
||||
$config['graph_types']['device']['ib_dns_dyn_updates']['section'] = 'dns';
|
||||
$config['graph_types']['device']['ib_dns_dyn_updates']['order'] = '0';
|
||||
$config['graph_types']['device']['ib_dns_dyn_updates']['descr'] = 'DNS dynamic updates';
|
||||
$config['graph_types']['device']['ib_dns_request_return_codes']['section'] = 'dns';
|
||||
$config['graph_types']['device']['ib_dns_request_return_codes']['order'] = '0';
|
||||
$config['graph_types']['device']['ib_dns_request_return_codes']['descr'] = 'DNS request return codes';
|
||||
$config['graph_types']['device']['ib_dns_performance']['section'] = 'dns';
|
||||
$config['graph_types']['device']['ib_dns_performance']['order'] = '0';
|
||||
$config['graph_types']['device']['ib_dns_performance']['descr'] = 'DNS performance';
|
||||
$config['graph_types']['device']['ib_dhcp_messages']['section'] = 'dhcp';
|
||||
$config['graph_types']['device']['ib_dhcp_messages']['order'] = '0';
|
||||
$config['graph_types']['device']['ib_dhcp_messages']['descr'] = 'DHCP messages';
|
||||
|
||||
$config['graph_types']['device']['bits']['section'] = 'netstats';
|
||||
$config['graph_types']['device']['bits']['order'] = '0';
|
||||
$config['graph_types']['device']['bits']['descr'] = 'Total Traffic';
|
||||
|
10
includes/discovery/os/nios.inc.php
Normal file
10
includes/discovery/os/nios.inc.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
if (!$os || $os === 'linux') {
|
||||
if (stristr($sysObjectId, ".1.3.6.1.4.1.7779.1")) {
|
||||
$os = 'nios';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
191
includes/polling/os/nios.inc.php
Normal file
191
includes/polling/os/nios.inc.php
Normal file
@@ -0,0 +1,191 @@
|
||||
<?php
|
||||
|
||||
$serial = trim(snmp_get($device, "ibSerialNumber.0", "-OQv", "IB-PLATFORMONE-MIB");
|
||||
$version = trim(snmp_get($device, "ibNiosVersion.0", "-OQv", "IB-PLATFORMONE-MIB");
|
||||
$hardware = trim(snmp_get($device, "ibHardwareType.0", "-OQv", "IB-PLATFORMONE-MIB");
|
||||
|
||||
##############
|
||||
# Create ddns update rrd
|
||||
##############
|
||||
$rrdfile = $config['rrd_dir'].'/'.$device['hostname'].'/ib_dns_dyn_updates.rrd';
|
||||
|
||||
$mibs = '+IB-DNSONE-MIB';
|
||||
$oids = '
|
||||
IB-DNSONE-MIB::ibDDNSUpdateSuccess.0
|
||||
IB-DNSONE-MIB::ibDDNSUpdateFailure.0
|
||||
IB-DNSONE-MIB::ibDDNSUpdatePrerequisiteReject.0
|
||||
IB-DNSONE-MIB::ibDDNSUpdateReject.0';
|
||||
|
||||
$data = snmp_get_multi(
|
||||
$device,
|
||||
$oids,
|
||||
'-OQUs',
|
||||
$mibs);
|
||||
|
||||
$ds1 = $data[0]['ibDDNSUpdateSuccess'];
|
||||
$ds2 = $data[0]['ibDDNSUpdateFailure'];
|
||||
$ds3 = $data[0]['ibDDNSUpdateReject'];
|
||||
$ds4 = $data[0]['ibDDNSUpdatePrerequisiteReject'];
|
||||
|
||||
if (!is_file($rrdfile)) {
|
||||
rrdtool_create(
|
||||
$rrdfile,
|
||||
'DS:success:DERIVE:600:0:U
|
||||
DS:failure:DERIVE:600:0:U
|
||||
DS:reject:DERIVE:600:0:U
|
||||
DS:prereq_reject:DERIVE:600:0:U '.$config['rrd_rra']);
|
||||
}
|
||||
|
||||
$fields = array(
|
||||
'success' => $ds1,
|
||||
'failure' => $ds2,
|
||||
'reject' => $ds3,
|
||||
'prereq_reject' => $ds4,
|
||||
);
|
||||
|
||||
|
||||
rrdtool_update($rrdfile, $fields);
|
||||
$graphs['ib_dns_dyn_updates'] = true;
|
||||
|
||||
|
||||
##################
|
||||
# Create dns performance graph (latency)
|
||||
##################
|
||||
$rrdfile = $config['rrd_dir'].'/'.$device['hostname'].'/ib_dns_performance.rrd';
|
||||
|
||||
$mibs = '+IB-PLATFORMONE-MIB';
|
||||
$oids = '
|
||||
IB-PLATFORMONE-MIB::ibNetworkMonitorDNSNonAAT1AvgLatency.0
|
||||
IB-PLATFORMONE-MIB::ibNetworkMonitorDNSAAT1AvgLatency.0';
|
||||
|
||||
$data = snmp_get_multi(
|
||||
$device,
|
||||
$oids,
|
||||
'-OQUs',
|
||||
$mibs);
|
||||
|
||||
$ds1 = $data[0]['ibNetworkMonitorDNSAAT1AvgLatency'];
|
||||
$ds2 = $data[0]['ibNetworkMonitorDNSNonAAT1AvgLatency'];
|
||||
|
||||
if (!is_file($rrdfile)) {
|
||||
rrdtool_create(
|
||||
$rrdfile,
|
||||
'DS:PerfAA:GAUGE:600:0:U
|
||||
DS:PerfnonAA:GAUGE:600:0:U '.$config['rrd_rra']);
|
||||
}
|
||||
|
||||
$fields = array(
|
||||
'PerfAA' => $ds1,
|
||||
'PerfnonAA' => $ds2,
|
||||
);
|
||||
|
||||
rrdtool_update($rrdfile, $fields);
|
||||
$graphs['ib_dns_performance'] = true;
|
||||
|
||||
##################
|
||||
# Create dns request return code graph
|
||||
##################
|
||||
$rrdfile = $config['rrd_dir'].'/'.$device['hostname'].'/ib_dns_request_return_codes.rrd';
|
||||
|
||||
$mibs = '+IB-DNSONE-MIB';
|
||||
$oids = '
|
||||
IB-DNSONE-MIB::ibBindZoneFailure.\"summary\"
|
||||
IB-DNSONE-MIB::ibBindZoneNxDomain.\"summary\"
|
||||
IB-DNSONE-MIB::ibBindZoneNxRRset.\"summary\"
|
||||
IB-DNSONE-MIB::ibBindZoneSuccess.\"summary\"';
|
||||
|
||||
$data = snmp_get_multi(
|
||||
$device,
|
||||
$oids,
|
||||
'-OQUs',
|
||||
$mibs);
|
||||
|
||||
$ds1 = $data['"summary"']['ibBindZoneSuccess'];
|
||||
$ds2 = $data['"summary"']['ibBindZoneFailure'];
|
||||
$ds3 = $data['"summary"']['ibBindZoneNxDomain'];
|
||||
$ds4 = $data['"summary"']['ibBindZoneNxRRset'];
|
||||
|
||||
|
||||
if (!is_file($rrdfile)) {
|
||||
rrdtool_create(
|
||||
$rrdfile,
|
||||
'DS:success:DERIVE:600:0:U
|
||||
DS:failure:DERIVE:600:0:U
|
||||
DS:nxdomain:DERIVE:600:0:U
|
||||
DS:nxrrset:DERIVE:600:0:U '.$config['rrd_rra']);
|
||||
}
|
||||
|
||||
$fields = array(
|
||||
'success' => $ds1,
|
||||
'failure' => $ds2,
|
||||
'nxdomain' => $ds3,
|
||||
'nxrrset' => $ds4,
|
||||
);
|
||||
|
||||
rrdtool_update($rrdfile, $fields);
|
||||
$graphs['ib_dns_request_return_codes'] = true;
|
||||
|
||||
|
||||
##################
|
||||
# Create dhcp messages graph
|
||||
##################
|
||||
$rrdfile = $config['rrd_dir'].'/'.$device['hostname'].'/ib_dhcp_messages.rrd';
|
||||
|
||||
$mibs = '+IB-DHCPONE-MIB';
|
||||
$oids = '
|
||||
IB-DHCPONE-MIB::ibDhcpTotalNoOfAcks.0
|
||||
IB-DHCPONE-MIB::ibDhcpTotalNoOfDeclines.0
|
||||
IB-DHCPONE-MIB::ibDhcpTotalNoOfDiscovers.0
|
||||
IB-DHCPONE-MIB::ibDhcpTotalNoOfInforms.0
|
||||
IB-DHCPONE-MIB::ibDhcpTotalNoOfNacks.0
|
||||
IB-DHCPONE-MIB::ibDhcpTotalNoOfOffers.0
|
||||
IB-DHCPONE-MIB::ibDhcpTotalNoOfOthers.0
|
||||
IB-DHCPONE-MIB::ibDhcpTotalNoOfReleases.0
|
||||
IB-DHCPONE-MIB::ibDhcpTotalNoOfRequests.0';
|
||||
|
||||
$data = snmp_get_multi(
|
||||
$device,
|
||||
$oids,
|
||||
'-OQUs',
|
||||
$mibs);
|
||||
|
||||
$ds1 = $data[0]['ibDhcpTotalNoOfAcks'];
|
||||
$ds2 = $data[0]['ibDhcpTotalNoOfDeclines'];
|
||||
$ds3 = $data[0]['ibDhcpTotalNoOfDiscovers'];
|
||||
$ds4 = $data[0]['ibDhcpTotalNoOfInforms'];
|
||||
$ds5 = $data[0]['ibDhcpTotalNoOfNacks'];
|
||||
$ds6 = $data[0]['ibDhcpTotalNoOfOffers'];
|
||||
$ds7 = $data[0]['ibDhcpTotalNoOfOthers'];
|
||||
$ds8 = $data[0]['ibDhcpTotalNoOfReleases'];
|
||||
$ds9 = $data[0]['ibDhcpTotalNoOfRequests'];
|
||||
|
||||
if (!is_file($rrdfile)) {
|
||||
rrdtool_create(
|
||||
$rrdfile,
|
||||
'DS:ack:DERIVE:600:0:U
|
||||
DS:decline:DERIVE:600:0:U
|
||||
DS:discover:DERIVE:600:0:U
|
||||
DS:inform:DERIVE:600:0:U
|
||||
DS:nack:DERIVE:600:0:U
|
||||
DS:offer:DERIVE:600:0:U
|
||||
DS:other:DERIVE:600:0:U
|
||||
DS:release:DERIVE:600:0:U
|
||||
DS:request:DERIVE:600:0:U '.$config['rrd_rra']);
|
||||
}
|
||||
|
||||
$fields = array(
|
||||
'ack' => $ds1,
|
||||
'decline' => $ds2,
|
||||
'discover' => $ds3,
|
||||
'inform' => $ds4,
|
||||
'nack' => $ds5,
|
||||
'offer' => $ds6,
|
||||
'other' => $ds7,
|
||||
'release' => $ds8,
|
||||
'request' => $ds9,
|
||||
);
|
||||
|
||||
rrdtool_update($rrdfile, $fields);
|
||||
$graphs['ib_dhcp_messages'] = true;
|
||||
|
||||
|
Reference in New Issue
Block a user