This document will explain how to add basic and full support for a new OS. **Some knowledge in PHP is needed for the full support.** #### BASIC SUPPORT FOR A NEW OS ### MIB If we have the MIB, we can copy the file into the default directory: ```bash /opt/librenms/mibs ``` ### New OS definition Let's begin to declare the new OS in LibreNMS. At first we modify the definition file located here: ```bash includes/definitions.inc.php ``` ```php // Pulse Secure OS definition $os = 'pulse'; $config['os'][$os]['text'] = 'Pulse Secure'; $config['os'][$os]['type'] = 'firewall'; $config['os'][$os]['icon'] = 'junos'; $config['os'][$os]['over'][0]['graph'] = 'device_bits'; $config['os'][$os]['over'][0]['text'] = 'Device Traffic'; $config['os'][$os]['over'][1]['graph'] = 'device_processor'; $config['os'][$os]['over'][1]['text'] = 'CPU Usage'; $config['os'][$os]['over'][2]['graph'] = 'device_mempool'; $config['os'][$os]['over'][2]['text'] = 'Memory Usage'; //The icon described before is the image we have to create and put in the directory html/images/os ``` ### Discovery OS We create a new file named as our OS definition and in this directory: ```bash includes/discovery/os/pulse.inc.php ``` This file just sets the $os variable, done by checking the SNMP tree for a particular value that matches the OS you are adding. Typically, this will come from the presence of specific values in sysObjectID or sysDescr, or the existence of a particular enterprise tree. Look at other files to get help in the code structure. ```php $users ) $tags = compact('rrd_def'); data_update($device, 'pulse_users', $tags, $fields); $graphs['pulse_users'] = true; } $sessions = snmp_get($device, 'PULSESECURE-PSG-MIB::iveConcurrentUsers.0', '-OQv'); if (is_numeric($sessions)) { $rrd_def = array( 'DS:sessions:GAUGE:600:0:U', } $fields = array( 'sessions' => $sessions ); $tags = compact('rrd_def'); data_update($device, 'pulse_sessions', $tags, $fields); $graphs['pulse_sessions'] = true; } ``` We finish in the declaration of the two graph types in the database: We can do that within a file to share our work and contribute in the development of LibreNMS. :-) ```bash sql-schema/xxx.sql //check the file number in GitHub 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', ''); ``` #### Displaying The specific graphs are not displayed automatically so we need to write the following PHP code: **Pulse Sessions** ```bash html/includes/graphs/device/pulse_sessions.inc.php ``` ```php