This document will provide the information you should need to add basic detection for a new OS.


Discovery is now all done by yaml files, you do not and should not create a php file for discovery.

Create the new OS file which should be called includes/definitions/pulse.yaml. Here is a working example:

os: pulse
text: 'Pulse Secure'
type: firewall
icon: pulse
    - { graph: device_bits, text: 'Device Traffic' }
    - { graph: device_processor, text: 'CPU Usage' }
    - { graph: device_mempool, text: 'Memory Usage' }
    - sysObjectID:
        - .

over: This is a list of the graphs which will be shown within the device header bar (mini graphs top right).

discovery: Here we are detecting this new OS using sysObjectID, this is the preferred method for detection. Other options are available:

          - .
          - 'Not some pulse'

group: You can group certain OS' together by using group, for instance ios, nx-os, iosxr are all within a group called cisco.

bad_ifXEntry: This is a list of models for which to tell LibreNMS that the device doesn't support ifXEntry and to ignore it:

     - cisco1941
     - cisco886Va
     - cisco2811

mib_dir: You can use this to specify the additional directories to look in for MIBs:

    - juniper
    - cisco

poller_modules: This is a list of poller modules to either enable (1) or disable (0). Check includes/ to see which modules are enabled/disabled by default.

    cisco-ace-serverfarms: false
    cisco-ace-loadbalancer: false

discovery_modules: This is the list of discovery modules to either enable (1) or disable (0). Check includes/ to see which modules are enabled/disabled by default.

     cisco-cef: true
     cisco-sla: true
     cisco-mac-accounting: false
Discovery Logic

YAML is converted to an array in PHP. Consider the following YAML:

  - sysObjectID: foo
    sysDescr: [ snafu, exodar ]
    sysObjectID: bar

This is how the discovery array would look in PHP:

       "sysObjectID" => "foo",
       "sysDescr" => [
       "sysObjectID" => "bar",

The logic for the discovery is as follows: 1. One of the first level items must match 2. ALL of the second level items must match (sysObjectID, sysDescr) 3. One of the third level items (foo, [snafu,exodar], bar) must match

So, considering the example: - sysObjectID: foo, sysDescr: ANYTHING matches - sysObjectID: bar, sysDescr: ANYTHING does not match - sysObjectID: bar, sysDescr: exodar matches - sysObjectID: bar, sysDescr: snafu matches

Discovery helpers

Within the discovery code base if you are using php then the following helpers are available:

$device['sysObjectID]: This will contain the full numerical sysObjectID for this device. $device['sysDescr']: This will contain the full sysDescr for this device.


OS polling is done within includes/polling/os/$ and is where we detect certain values.


$version = preg_replace('/[\r\n\"]+/', ' ', snmp_get($device, "productVersion.0", "-OQv", "PULSESECURE-PSG-MIB"));
$hardware = "Juniper " . preg_replace('/[\r\n\"]+/', ' ', snmp_get($device, "productName.0", "-OQv", "PULSESECURE-PSG-MIB"));

$version: The version of the OS running on the device.

$hardware: The hardware version for the device. For example: 'WS-C3560X-24T-S'

$features: Features for the device, for example a list of cards in the slots of a modular chassis.

$serial: The main serial number of the device.


If the device has MIBs available and you use it in the detection then you can add these in. It is highly recommended that you add mibs to a vendor specific directory. For instance HP mibs are in mibs/hp. Please ensure that these directories are specified in the yaml detection file, see mib_dir above.

It is highly recommended to use SVG images where possible, these scale and provide a nice visual image for users with HiDPI screens. If you can't find SVG images then please use png.

Create an SVG image of the icon and logo. Legacy PNG bitmaps are also supported but look bad on HiDPI. - A vector image should not contain padding.
- The file should not be larger than 20 Kb. Simplify paths to reduce large files. - Use plain SVG without gzip compression. - The SVG root element must not contain length and width attributes, only viewBox.


Hints for Inkscape:

By optimizing the SVG you can shrink the file size in some cases to less than 20 %. SVG Optimizer does a great job. There is also an online version.

The final check


./discovery.php -h HOSTNAME


./poller.php -h HOSTNAME

At this step we should see all the values retrieved in LibreNMS.

Note: If you have made a number of changes to either the OS's Discovery files, it's possible earlier edits have been cached. As such, if you do not get expected behaviour when completing the final check above, try removing the cache file first:

rm -f cache/os_defs.cache