mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
device: Added CheckPoint SecurePlatform support (#8000)
* Added CheckPoint SecurePlatform support * Changed some issues * Changed some issues * Update splat.yaml * Changed os name to secureplatform intead of splat * Changed os name to secureplatform * Changed some issues
This commit is contained in:
20
html/includes/graphs/device/secureplatform_sessions.inc.php
Normal file
20
html/includes/graphs/device/secureplatform_sessions.inc.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* NTTCOM MS module for printing CheckPoint SecurePlatform sessions
|
||||
*/
|
||||
|
||||
|
||||
require 'includes/graphs/common.inc.php';
|
||||
|
||||
$rrd_filename = rrd_name($device['hostname'], 'secureplatform_sessions');
|
||||
|
||||
$rrd_options .= " DEF:connections=$rrd_filename:NumConn:AVERAGE";
|
||||
$rrd_options .= " DEF:connections_max=$rrd_filename:NumConn:MAX";
|
||||
$rrd_options .= " DEF:connections_min=$rrd_filename:NumConn:MIN";
|
||||
$rrd_options .= ' AREA:connections_min';
|
||||
|
||||
$rrd_options .= " LINE1.5:connections#cc0000:'".rrdtool_escape('Current connections')."'";
|
||||
$rrd_options .= ' GPRINT:connections_min:MIN:%4.0lf';
|
||||
$rrd_options .= ' GPRINT:connections:LAST:%4.0lf';
|
||||
$rrd_options .= ' GPRINT:connections_max:MAX:%4.0lf\l';
|
@@ -513,6 +513,12 @@ $config['graph_types']['device']['routeros_leases']['section'] = 'network';
|
||||
$config['graph_types']['device']['routeros_leases']['order'] = 0;
|
||||
$config['graph_types']['device']['routeros_leases']['descr'] = 'DHCP Lease Count';
|
||||
|
||||
|
||||
//CheckPoint SPLAT specific graphs
|
||||
$config['graph_types']['device']['secureplatform_sessions']['section'] = 'firewall';
|
||||
$config['graph_types']['device']['secureplatform_sessions']['order'] = 0;
|
||||
$config['graph_types']['device']['secureplatform_sessions']['descr'] = 'Active connections';
|
||||
|
||||
// Device Types
|
||||
$i = 0;
|
||||
$config['device_types'][$i]['text'] = 'Servers';
|
||||
|
53
includes/definitions/discovery/secureplatform.yaml
Normal file
53
includes/definitions/discovery/secureplatform.yaml
Normal file
@@ -0,0 +1,53 @@
|
||||
mib: CHECKPOINT-MIB
|
||||
modules:
|
||||
sensors:
|
||||
fanspeed:
|
||||
data:
|
||||
-
|
||||
oid: fanSpeedSensorTable
|
||||
value: fanSpeedSensorValue
|
||||
num_oid: .1.3.6.1.4.1.2620.1.6.7.8.2.1.3.
|
||||
descr: '{{ $fanSpeedSensorName }}'
|
||||
index: 'fanSpeedSensorValue.{{ $index }}'
|
||||
load:
|
||||
data:
|
||||
-
|
||||
oid: procUsage
|
||||
num_oid: .1.3.6.1.4.1.2620.1.6.7.2.4.
|
||||
descr: Overall CPU utilization
|
||||
-
|
||||
oid: multiProcUsage
|
||||
num_oid: .1.3.6.1.4.1.2620.1.6.7.5.1.5.
|
||||
descr: CPU {{ $index }}
|
||||
index: 'multiProcUsage.{{ $index }}.0'
|
||||
|
||||
state:
|
||||
data:
|
||||
-
|
||||
oid: fanSpeedSensorTable
|
||||
value: fanSpeedSensorStatus
|
||||
num_oid: .1.3.6.1.4.1.2620.1.6.7.8.2.1.6.
|
||||
descr: '{{ $fanSpeedSensorName }}'
|
||||
index: 'fanSpeedSensorValue.{{ $index }}'
|
||||
state_name: fanSpeedSensor
|
||||
states:
|
||||
- { value: 0, generic: 0, graph: 0, descr: OK }
|
||||
- { value: 1, generic: 1, graph: 0, descr: Warning }
|
||||
- { value: 2, generic: 3, graph: 0, descr: Unknown }
|
||||
-
|
||||
oid: haStatCode
|
||||
num_oid: .1.3.6.1.4.1.2620.1.5.101
|
||||
descr: HA Status
|
||||
state_name: haSensor
|
||||
states:
|
||||
- { value: 0, generic: 0, graph: 0, descr: OK }
|
||||
- { value: 1, generic: 1, graph: 0, descr: 'Needs Atention' }
|
||||
- { value: 2, generic: 2, graph: 0, descr: 'HA Down' }
|
||||
temperature:
|
||||
data:
|
||||
-
|
||||
oid: tempertureSensorTable
|
||||
value: tempertureSensorValue
|
||||
num_oid: .1.3.6.1.4.1.2620.1.6.7.8.1.1.3.
|
||||
descr: '{{ $tempertureSensorName }}'
|
||||
index: 'tempertureSensorValue.{{ $index }}'
|
30
includes/definitions/secureplatform.yaml
Normal file
30
includes/definitions/secureplatform.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
os: secureplatform
|
||||
text: 'CheckPoint SecurePlatform'
|
||||
type: firewall
|
||||
icon: checkpoint
|
||||
mib_dir:
|
||||
- checkpoint
|
||||
over:
|
||||
- { graph: device_bits, text: 'Device Traffic' }
|
||||
- { graph: device_processor, text: 'CPU Usage' }
|
||||
- { graph: device_mempool, text: 'Memory Usage' }
|
||||
discovery_modules:
|
||||
ports-stack: 0
|
||||
fdb-table: 0
|
||||
stp: 0
|
||||
wireless: 0
|
||||
vlans: 0
|
||||
bgp-peers: 0
|
||||
ntp: 0
|
||||
services: 0
|
||||
ip6-addresses: 0
|
||||
poller_modules:
|
||||
ntp: 0
|
||||
discovery:
|
||||
- sysObjectId:
|
||||
- .1.3.6.1.4.1.8072.3.2
|
||||
snmpget:
|
||||
oid: CHECKPOINT-MIB::osName.0
|
||||
mib_dir: checkpoint
|
||||
op: 'contains'
|
||||
value: SecurePlatform
|
12
includes/discovery/processors/secureplatform.inc.php
Normal file
12
includes/discovery/processors/secureplatform.inc.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
if ($device['os'] === 'secureplatform') {
|
||||
echo 'SecurePlatform : ';
|
||||
|
||||
$descr = 'Processor';
|
||||
$usage = snmp_get($device, '.1.3.6.1.4.1.2620.1.6.7.2.4.0', '-OvQ', 'CHECKPOINT-MIB');
|
||||
|
||||
if (is_numeric($usage)) {
|
||||
discover_processor($valid['processor'], $device, '.1.3.6.1.4.1.2620.1.6.7.2.4.0', '0', 'splat-cpu', $descr, '1', $usage, null, null);
|
||||
}
|
||||
}
|
30
includes/polling/os/secureplatform.inc.php
Normal file
30
includes/polling/os/secureplatform.inc.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* SPLAT.inc.php
|
||||
*
|
||||
* NTTCOM MS poller module for Check Point SECUREPLATFORM
|
||||
**/
|
||||
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
|
||||
$tmp_splat = snmp_get_multi_oid($device, 'svnVersion.0 svnApplianceProductName.0 svnApplianceSerialNumber.0', '-OUQs', 'CHECKPOINT-MIB');
|
||||
$serial = $tmp_splat['svnApplianceSerialNumber.0'];
|
||||
$hardware = $tmp_splat['svnApplianceProductName.0'];
|
||||
$version = $tmp_splat['svnVersion.0'];
|
||||
unset($tmp_SPLAT);
|
||||
|
||||
$connections = snmp_get($device, 'fwNumConn.0', '-OQv', 'CHECKPOINT-MIB');
|
||||
|
||||
if (is_numeric($connections)) {
|
||||
$rrd_def = RrdDefinition::make()->addDataset('NumConn', 'GAUGE', 0);
|
||||
|
||||
$fields = array(
|
||||
'NumConn' => $connections,
|
||||
);
|
||||
|
||||
$tags = compact('rrd_def');
|
||||
data_update($device, 'secureplatform_sessions', $tags, $fields);
|
||||
$graphs['secureplatform_sessions'] = true;
|
||||
}
|
||||
|
||||
unset($connections);
|
9
includes/polling/processors/secureplatform.inc.php
Normal file
9
includes/polling/processors/secureplatform.inc.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
echo 'Checkpoint SecurePlatform CPU Usage';
|
||||
|
||||
$usage = snmp_get($device, '.1.3.6.1.4.1.2620.1.6.7.2.4.0', '-OvQ', 'CHECKPOINT-MIB');
|
||||
|
||||
if (is_numeric($usage)) {
|
||||
$proc = $usage;
|
||||
}
|
40
tests/data/secureplatform.json
Normal file
40
tests/data/secureplatform.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"os": {
|
||||
"discovery": {
|
||||
"devices": [
|
||||
{
|
||||
"sysName": "127.1.6.2",
|
||||
"sysObjectID": null,
|
||||
"sysDescr": null,
|
||||
"sysContact": null,
|
||||
"version": null,
|
||||
"hardware": "",
|
||||
"features": null,
|
||||
"location": null,
|
||||
"os": "secureplatform",
|
||||
"type": "firewall",
|
||||
"serial": null,
|
||||
"icon": "checkpoint.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
"poller": {
|
||||
"devices": [
|
||||
{
|
||||
"sysName": "<private>",
|
||||
"sysObjectID": "enterprises.8072.3.2.10",
|
||||
"sysDescr": "Linux hostname #1 2.6.18-92cp SMP Thu Apr 12 03:28:54 IDT 2012 i686",
|
||||
"sysContact": "<private>",
|
||||
"version": "R75.40",
|
||||
"hardware": "",
|
||||
"features": null,
|
||||
"location": "<private>",
|
||||
"os": "secureplatform",
|
||||
"type": "firewall",
|
||||
"serial": null,
|
||||
"icon": "checkpoint.png"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
12
tests/snmpsim/secureplatform.snmprec
Normal file
12
tests/snmpsim/secureplatform.snmprec
Normal file
@@ -0,0 +1,12 @@
|
||||
1.3.6.1.2.1.1.1.0|4|Linux hostname #1 2.6.18-92cp SMP Thu Apr 12 03:28:54 IDT 2012 i686
|
||||
1.3.6.1.2.1.1.2.0|6|1.3.6.1.4.1.8072.3.2.10
|
||||
1.3.6.1.2.1.1.3.0|67|302991149
|
||||
1.3.6.1.2.1.1.4.0|4|<private>
|
||||
1.3.6.1.2.1.1.5.0|4|<private>
|
||||
1.3.6.1.2.1.1.6.0|4|<private>
|
||||
1.3.6.1.2.1.25.1.1.0|67|1347344588
|
||||
1.3.6.1.2.1.25.1.4.0|4|ro root=/dev/mapper/vg_splat-lv_current vmalloc=256M panic=15 console=ttyS0 3 quiet
|
||||
1.3.6.1.4.1.2620.1.1.25.3.0|2|33757
|
||||
1.3.6.1.4.1.2620.1.6.4.1.0|4|R75.40
|
||||
1.3.6.1.4.1.2620.1.6.5.1.0|4|SecurePlatform Pro
|
||||
1.3.6.1.6.3.10.2.1.3.0|2|3029882
|
Reference in New Issue
Block a user