How to graph output of shell script?

I’m trying to determine if there is some way I could use LibreNMS to graph the output of a shell command.

For example, I am trying to graph the # of entries in the MAC table of a switch and I have a shell script that returns the output from:

snmpwalk -v 2c -c [email protected] . |wc -l

This returns an integer representing the # of MAC addresses in the table for VLAN 100, which is what I would like to be able to graph.

Output of validate.php


Component Version
LibreNMS 21.3.0-89-g643c1ca3a
DB Schema 2020_12_14_091314_create_port_groups_table (206)
PHP 7.3.27-1~deb10u1
Python 3.7.3
MySQL 10.3.27-MariaDB-0+deb10u1
RRDTool 1.7.1


[OK] Composer Version: 2.0.12
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database schema correct

Hi @Fred_Weston
If you can find an OID that gives you the value, then yes LibreNMS can graph it out of the box.
If not, you would have to develop PHP code to achieve it.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.