newdevice: Updated Checkpoint Gaia detection and added storage (#7656)

* newdevice: Updated Checkpoint Gaia detection and added storage

* update db_schema

* added murrants discovery options

* Rename 216.sql to 217.sql
This commit is contained in:
Neil Lathwood 2017-11-23 05:28:33 +00:00 committed by Tony Murray
parent 6fe5ac60d6
commit b45302bf70
9 changed files with 13754 additions and 2 deletions

View File

@ -3,6 +3,8 @@ text: 'Check Point GAiA'
type: firewall
icon: checkpoint
ifname: 1
mib_dir:
- checkpoint
over:
- { graph: device_bits, text: 'Device Traffic' }
- { graph: device_processor, text: 'Processor Usage' }
@ -10,3 +12,10 @@ over:
discovery:
- sysObjectId:
- .1.3.6.1.4.1.2620.1.6.123.1
-
sysObjectId: .1.3.6.1.4.1.8072.3.2.10
snmpget:
oid: CHECKPOINT-MIB::osName.0
mib_dir: checkpoint
op: 'contains'
value: Gaia

View File

@ -0,0 +1,41 @@
<?php
/**
* gaia.inc.php
*
* LibreNMS storage discovery module for Check Point GAIA
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2017 Neil Lathwood
* @author Neil Lathwood <gh+n@laf.io>
*/
if ($device['os'] === 'gaia') {
$gaia_tmp = snmpwalk_cache_double_oid($device, 'multiDiskTable', array(), 'CHECKPOINT-MIB');
$fstype = "dsk";
foreach ($gaia_tmp as $index => $data) {
$descr = $data['multiDiskName'];
$units = 1024;
if (is_numeric($data['multiDiskSize']) && is_numeric($data['multiDiskUsed'])) {
$total = $data['multiDiskSize'];
$used = $data['multiDiskUsed'];
discover_storage($valid_storage, $device, $index, $fstype, 'gaia', $descr, $total, $units, $used);
}
}
unset($gaia_tmp);
}

View File

@ -0,0 +1,30 @@
<?php
/**
* gaia.inc.php
*
* LibreNMS OS poller module for Check Point GAIA
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2017 Neil Lathwood
* @author Neil Lathwood <gh+n@laf.io>
*/
$tmp_gaia = snmp_get_multi_oid($device, 'svnVersion.0 svnApplianceProductName.0 svnApplianceSerialNumber.0', '-OUQs', 'CHECKPOINT-MIB');
$serial = $tmp_gaia['svnApplianceSerialNumber.0'];
$hardware = $tmp_gaia['svnApplianceProductName.0'];
$version = $tmp_gaia['svnVersion.0'];
unset($tmp_gaia);

View File

@ -0,0 +1,31 @@
<?php
/**
* gaia.inc.php
*
* LibreNMS storage poller module for Check Point GAIA
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* @package LibreNMS
* @link http://librenms.org
* @copyright 2017 Neil Lathwood
* @author Neil Lathwood <gh+n@laf.io>
*/
$gaia_data = snmp_get_multi_oid($device, "multiDiskSize.{$storage['storage_index']} multiDiskUsed.{$storage['storage_index']}", '-OUQst', 'CHECKPOINT-MIB');
$storage['size'] = $gaia_data["multiDiskSize.{$storage['storage_index']}"];
$storage['used'] = $gaia_data["multiDiskUsed.{$storage['storage_index']}"];
$storage['free'] = $storage['size'] - $storage['used'];
$storage['units'] = $storage['storage_units'];
unset($gaia_data);

13637
mibs/checkpoint/CHECKPOINT-MIB Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1418,7 +1418,7 @@ storage:
- { Field: storage_id, Type: int(11), 'Null': false, Extra: auto_increment }
- { Field: device_id, Type: int(11), 'Null': false, Extra: '' }
- { Field: storage_mib, Type: varchar(16), 'Null': false, Extra: '' }
- { Field: storage_index, Type: int(11), 'Null': false, Extra: '' }
- { Field: storage_index, Type: varchar(64), 'Null': true, Extra: '' }
- { Field: storage_type, Type: varchar(32), 'Null': true, Extra: '' }
- { Field: storage_descr, Type: text, 'Null': false, Extra: '' }
- { Field: storage_size, Type: bigint(20), 'Null': false, Extra: '' }

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

@ -0,0 +1 @@
ALTER TABLE `storage` CHANGE `storage_index` `storage_index` VARCHAR(64) DEFAULT NULL;

View File

@ -1,2 +1,2 @@
1.3.6.1.2.1.1.1.0|4|Linux st1fw01 2.6.18-92cpx86_64 #1 SMP Mon Jan 19 12:13:55
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.2620.1.6.123.1.41
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.2620.1.6.123.1.41

View File

@ -0,0 +1,3 @@
1.3.6.1.2.1.1.1.0|4|Linux A-10144014 3.10.20-al-5.0-pr2 #1 SMP Sun May 21 15:23:45 IDT 2017 armv7l
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.8072.3.2.10
1.3.6.1.4.1.2620.1.6.5.1.0|4|Gaia Embedded