Library Functions / API

Hi,

My apologies, but I just can’t seem to find this - is there documentation somewhere related to the SNMP library functions (like in https://github.com/librenms/librenms/blob/master/includes/snmp.inc.php)? Or is the file itself the main / only documentation?

Thanks!

Hi @arrmo
Nothing else I am afraid. Feel free to ask here if you have question, and write down the answers you get (or find by yourself) as a comment in the file (and submit those via Pull Request :slight_smile: )

No worries, completely understand. And I will add comments to the file, submit PR - glad to help!

Right now I’m trying to figure out if the OID can be text or has to be a number only (for snmp_get).

Thanks!

CLI snmpget and snmpwalk accept a text OID if the proper MIBs are loaded. So the PHP wrapper lib does the same.

1 Like

Perfect, thanks! Is this worth capturing in the comments? I can do so if you think it’s worthwhile.

I would say, do as you think it would have helped you. Basically, we also have a developper documentation ( https://docs.librenms.org/Developing/ ) that you can patch.

1 Like

Will do that - thanks!