diff --git a/doc/Support/Support-New-OS.md b/doc/Support/Support-New-OS.md index 18cbc3ef6..e605f6bd6 100644 --- a/doc/Support/Support-New-OS.md +++ b/doc/Support/Support-New-OS.md @@ -1,27 +1,17 @@ -This document will explain how to add full support for a new OS. **Some knowledge in PHP is needed.** +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.** -#### MIB -At first we copy the MIB file into the default directory: +#### 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 ``` -We are now ready to look at inside the file and find the OID we want to use. _For this documentation we'll use Pulse Secure devices._ - -Then we can test it with the snmpget command (hostname must be reachabled): - -```bash -//for example the OID iveCpuUtil.0: -snmpget -v2c -c public -OUsb -m PULSESECURE-PSG-MIB -M /opt/librenms/mibs -t 30 secure iveCpuUtil.0 -//quick explanation : snmpget -v2c -c COMMUNITY -OUsb -m MIBFILE -M MIB DIRECTORY HOSTNAME OID - -//Result here: -iveCpuUtil.0 = Gauge32: 28 -``` - -#### New OS definition +### New OS definition Let's begin to declare the new OS in LibreNMS. At first we modify the definition file located here: ```bash @@ -41,6 +31,125 @@ $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 +