diff --git a/includes/discovery/mempools-screenos.inc.php b/includes/discovery/mempools-screenos.inc.php new file mode 100755 index 0000000000..9029ca0acf --- /dev/null +++ b/includes/discovery/mempools-screenos.inc.php @@ -0,0 +1,19 @@ + diff --git a/includes/discovery/mempools.inc.php b/includes/discovery/mempools.inc.php index 4cc1db23c7..9ab97050e4 100755 --- a/includes/discovery/mempools.inc.php +++ b/includes/discovery/mempools.inc.php @@ -7,6 +7,7 @@ include("mempools-cemp.inc.php"); include("mempools-cmp.inc.php"); include("mempools-junos.inc.php"); include("mempools-ironware-dyn.inc.php"); +include("mempools-screenos.inc.php"); ### Remove memory pools which weren't redetected here diff --git a/includes/discovery/processors/screenos.inc.php b/includes/discovery/processors/screenos.inc.php new file mode 100644 index 0000000000..896f5d5d4d --- /dev/null +++ b/includes/discovery/processors/screenos.inc.php @@ -0,0 +1,20 @@ + diff --git a/includes/polling/mempools.inc.php b/includes/polling/mempools.inc.php index cf6590ee64..0868b0ab23 100755 --- a/includes/polling/mempools.inc.php +++ b/includes/polling/mempools.inc.php @@ -28,7 +28,7 @@ while($mempool = mysql_fetch_array($mempool_data)) { RRA:MAX:0.5:288:797"); } - $file = $config['install_dir']."/includes/polling/mempools-".$mempool['mempool_type'].".inc.php"; + $file = $config['install_dir']."/includes/polling/mempools/".$mempool['mempool_type'].".inc.php"; if(is_file($file)) { include($file); } else { diff --git a/includes/polling/mempools-cemp.inc.php b/includes/polling/mempools/cemp.inc.php similarity index 100% rename from includes/polling/mempools-cemp.inc.php rename to includes/polling/mempools/cemp.inc.php diff --git a/includes/polling/mempools-cmp.inc.php b/includes/polling/mempools/cmp.inc.php similarity index 100% rename from includes/polling/mempools-cmp.inc.php rename to includes/polling/mempools/cmp.inc.php diff --git a/includes/polling/mempools-hrstorage.inc.php b/includes/polling/mempools/hrstorage.inc.php similarity index 100% rename from includes/polling/mempools-hrstorage.inc.php rename to includes/polling/mempools/hrstorage.inc.php diff --git a/includes/polling/mempools-ironware-dyn.inc.php b/includes/polling/mempools/ironware-dyn.inc.php similarity index 100% rename from includes/polling/mempools-ironware-dyn.inc.php rename to includes/polling/mempools/ironware-dyn.inc.php diff --git a/includes/polling/mempools-junos.inc.php b/includes/polling/mempools/junos.inc.php similarity index 100% rename from includes/polling/mempools-junos.inc.php rename to includes/polling/mempools/junos.inc.php diff --git a/includes/polling/mempools/screenos.inc.php b/includes/polling/mempools/screenos.inc.php new file mode 100755 index 0000000000..f15a85018d --- /dev/null +++ b/includes/polling/mempools/screenos.inc.php @@ -0,0 +1,10 @@ + diff --git a/includes/polling/os/screenos.inc.php b/includes/polling/os/screenos.inc.php index d9ba2046ae..6beec5c473 100755 --- a/includes/polling/os/screenos.inc.php +++ b/includes/polling/os/screenos.inc.php @@ -3,59 +3,16 @@ echo("Doing Juniper Netscreen (ScreenOS)"); $version = preg_replace("/(.+)\ version\ (.+)\ \(SN:\ (.+)\,\ (.+)\)/", "Juniper Netscreen \\1||\\2||\\3||\\4", $sysDescr); -echo("$version\n"); +#echo("$version\n"); list($hardware,$version,$serial,$features) = explode("||", $version); -$cpurrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/screenos-cpu.rrd"; -$memrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/screenos-memory.rrd"; $sessrrd = $config['rrd_dir'] . "/" . $device['hostname'] . "/screenos-sessions.rrd"; -$cpu_cmd = $config['snmpget'] . " -M ".$config['mibdir'] . " -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname']; -$cpu_cmd .= " .1.3.6.1.4.1.3224.16.1.1.0 .1.3.6.1.4.1.3224.16.1.3.0"; -$cpu_data = shell_exec($cpu_cmd); -list ($cpuav, $cpu5m) = explode("\n", $cpu_data); - -$mem_cmd = $config['snmpget'] . " -M ".$config['mibdir'] . " -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname']; -$mem_cmd .= " .1.3.6.1.4.1.3224.16.2.1.0 .1.3.6.1.4.1.3224.16.2.2.0 .1.3.6.1.4.1.3224.16.2.3.0"; -$mem_data = shell_exec($mem_cmd); -list ($memalloc, $memfree, $memfrag) = explode("\n", $mem_data); - $sess_cmd = $config['snmpget'] . " -M ".$config['mibdir'] . " -O qv -" . $device['snmpver'] . " -c " . $device['community'] . " " . $device['hostname']; $sess_cmd .= " .1.3.6.1.4.1.3224.16.3.2.0 .1.3.6.1.4.1.3224.16.3.3.0 .1.3.6.1.4.1.3224.16.3.4.0"; $sess_data = shell_exec($sess_cmd); list ($sessalloc, $sessmax, $sessfailed) = explode("\n", $sess_data); -if (!is_file($cpurrd)) { - `rrdtool create $cpurrd \ - --step 300 \ - DS:average:GAUGE:600:0:100 \ - DS:5min:GAUGE:600:0:100 \ - RRA:AVERAGE:0.5:1:800 \ - RRA:AVERAGE:0.5:6:800 \ - RRA:AVERAGE:0.5:24:800 \ - RRA:AVERAGE:0.5:288:800 \ - RRA:MAX:0.5:1:800 \ - RRA:MAX:0.5:6:800 \ - RRA:MAX:0.5:24:800 \ - RRA:MAX:0.5:288:800`; -} -if (!is_file($memrrd)) { - - shell_exec("rrdtool create $memrrd \ - --step 300 \ - DS:allocate:GAUGE:600:0:10000000000 \ - DS:left:GAUGE:600:0:10000000000 \ - DS:frag:GAUGE:600:0:10000000000 \ - RRA:AVERAGE:0.5:1:800 \ - RRA:AVERAGE:0.5:6:800 \ - RRA:AVERAGE:0.5:24:800 \ - RRA:AVERAGE:0.5:288:800 \ - RRA:MAX:0.5:1:800 \ - RRA:MAX:0.5:6:800 \ - RRA:MAX:0.5:24:800 \ - RRA:MAX:0.5:288:800"); -} - if (!is_file($sessrrd)) { `rrdtool create $sessrrd \ --step 300 \ @@ -72,9 +29,6 @@ if (!is_file($sessrrd)) { RRA:MAX:0.5:288:800`; } - -shell_exec($config['rrdtool'] . " update $cpurrd N:$cpuav:$cpu5m"); -shell_exec($config['rrdtool'] . " update $memrrd N:$memalloc:$memfree:$memfrag"); shell_exec($config['rrdtool'] . " update $sessrrd N:$sessalloc:$sessmax:$sessfailed"); ?>