Multiple communities for some device items

I’m still trying to work out a fix for this, original post was as below, thank you to all for suggestions, i could not see anything that work assist, my formal background is welding, not programming.

Does not look like SNMPv3 context will help with the specific devices.

I wrote a PHP script to retrieve the device community from the database, if unit model sysDescr.0 was xx2xx then uses community(public as example) public.1 and public.2, if xx4xx use community .1 to .4, i wrote the new community back to the database, checked the database updated and tried snmpget on those items, then wrote the next community to the database and did the snmpget again, this did not work, only public was being polled(based on Wireshark sniffing of polled community), a similar stand-alone script i wrote in Python worked fine on the device. It seems early in the polling for a device it retrieves the community once so the updating database method appears it will not work.

Once i sort the community issue out i will then work on the data, being my background is not programming it’s a steep learning curve. Any suggestions where i should look next or if i could use the Python script and cron to get this to work. I would like to keep it simple and controller by LibreNMS rather than requiring Python and Cron to assist if possible. Being able to specify the community in the yaml would probably fix the whole issue.

When asking for help and support, please provide as much information as possible. This should include:

  • Steps to reproduce an issue.
  • The output of ./validate.php

If it’s an issue with the WebUI then please consider including a screenshot and the browser version you are using.

If you are having troubles with discovery/polling include the pastebin output of:

./discovery.php -h HOSTNAME -d | ./
./poller.php -h HOSTNAME -r -f -d | ./

If you need to post any text longer than a few lines, please use a pastebin service such as using non-expiring pastes.

I’m now looking at the SNMPv3 context as Murrant suggested, this may be the best way to move forward on this after looking at some of the Cisco device scripts.
First problem i have: the devices will not respond to SNMPv3 unless i specify a context (public), I’m unable to add this in the device add Web interface so where can i specific at least one context manually in configuration so i can at least add the device in SNMPv3 ?

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