docs: Update custom OS graphs doc to current standard. (#6837)

This commit is contained in:
network-guy
2017-06-14 14:32:56 -05:00
committed by Neil Lathwood
parent 572277bfaa
commit c66f6c9704

View File

@@ -27,10 +27,12 @@ We declare two specific graphs for users and sessions numbers. Theses two graphs
```php
<?php
use LibreNMS\RRD\RrdDefinition;
$users = snmp_get($device, 'iveConcurrentUsers.0', '-OQv', 'PULSESECURE-PSG-MIB');
if (is_numeric($users)) {
$rrd_def = 'DS:users:GAUGE:600:0:U';
$rrd_def = RrdDefinition::make()->addDataset('users', 'GAUGE', 0);
$fields = array(
'users' => $users,
@@ -44,7 +46,7 @@ if (is_numeric($users)) {
$sessions = snmp_get($device, 'iveConcurrentUsers.0', '-OQv', 'PULSESECURE-PSG-MIB');
if (is_numeric($sessions)) {
$rrd_def = 'DS:sessions:GAUGE:600:0:U';
$rrd_def = RrdDefinition::make()->addDataset('sessions', 'GAUGE', 0);
$fields = array(
'sessions' => $sessions,
@@ -68,8 +70,8 @@ php includes/sql-schema/update.php
Or put the SQL commands directly in Mysql or PhpMyadmin for our tests:
```php
INSERT INTO `graph_types`(`graph_type`, `graph_subtype`, `graph_section`, `graph_descr`, `graph_order`) VALUES ('device', 'pulse_users', 'firewall', 'Active Users', '');
INSERT INTO `graph_types`(`graph_type`, `graph_subtype`, `graph_section`, `graph_descr`, `graph_order`) VALUES ('device', 'pulse_sessions', 'firewall', 'Active Sessions', '');
INSERT INTO `graph_types`(`graph_type`, `graph_subtype`, `graph_section`, `graph_descr`, `graph_order`) VALUES ('device', 'pulse_users', 'firewall', 'Active Users', 0);
INSERT INTO `graph_types`(`graph_type`, `graph_subtype`, `graph_section`, `graph_descr`, `graph_order`) VALUES ('device', 'pulse_sessions', 'firewall', 'Active Sessions', 0);
```
#### Displaying