Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add infoblox devices (Issue 2708) #2801

Merged
merged 8 commits into from
Jan 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions html/includes/graphs/device/ib_dhcp_messages.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?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'";

51 changes: 51 additions & 0 deletions html/includes/graphs/device/ib_dns_dyn_updates.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?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'";
49 changes: 49 additions & 0 deletions html/includes/graphs/device/ib_dns_performance.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?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'";

53 changes: 53 additions & 0 deletions html/includes/graphs/device/ib_dns_request_return_codes.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?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'";
19 changes: 19 additions & 0 deletions includes/definitions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1440,6 +1440,11 @@
$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';

// Lenovo EMC (NAS)
$os = 'lenovoemc';
$config['os'][$os]['type'] = 'storage';
Expand Down Expand Up @@ -1649,6 +1654,20 @@
$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';
Expand Down
6 changes: 6 additions & 0 deletions includes/discovery/os/nios.inc.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
if (!$os || $os === 'linux') {
if (stristr($sysObjectId, ".1.3.6.1.4.1.7779.1")) {
$os = 'nios';
}
}
Loading