2012-04-07 22:36:20 +00:00
|
|
|
<?php
|
|
|
|
|
|
2012-05-25 12:24:34 +00:00
|
|
|
// Simple hard-coded poller for Fortinet Fortigate
|
|
|
|
|
// Yes, it really can be this simple.
|
2015-07-10 13:36:21 +02:00
|
|
|
echo 'Fortigate MemPool';
|
2012-04-07 22:36:20 +00:00
|
|
|
|
2020-09-21 15:43:38 +02:00
|
|
|
$mempool['perc'] = snmp_get($device, 'FORTINET-FORTIGATE-MIB::fgSysMemUsage.0', '-OvQ');
|
2015-07-10 13:36:21 +02:00
|
|
|
$mempool['total'] = snmp_get($device, 'FORTINET-FORTIGATE-MIB::fgSysMemCapacity.0', '-OvQ');
|
2020-09-21 15:43:38 +02:00
|
|
|
$mempool['used'] = ($mempool['total'] * ($mempool['perc'] / 100));
|
|
|
|
|
$mempool['free'] = ($mempool['total'] - $mempool['used']);
|
2012-04-07 22:36:20 +00:00
|
|
|
|
2020-09-21 15:43:38 +02:00
|
|
|
echo '(U: ' . $mempool['used'] . ' T: ' . $mempool['total'] . ' F: ' . $mempool['free'] . ') ';
|