Do all have the same snmp creds or do you have to guess a few? csv or so? Simply loop over it. Python, ansible, bash etc... https://docs.librenms.org/API/Devices/
Yeah this is where knowing python would come in super handy. Unfortunately there are thousands of different ways vendors went about the configuration of SNMP. You would have this same issue regardless of NMS vendor.
On the LibreNMS server, log into the database. Issue commands like this:
USE librenms;
UPDATE devices SET community = 'NewReadCommunityStringHere' WHERE community = 'OldReadCommunityStringHere' AND os like '%axis%' AND hostname like 'Camera-%' LIMIT 1;
Test and verify everything is good to go, then remove the limit command to do the rest.
4
u/llaffer Apr 07 '24
Use the api to update the snmp settings. This goes well with the Network automation where you deploy the new settings
1
u/SuspiciousSardaukar Apr 07 '24
IIRC you can specify multiple snmp's community in array in config.php.
1
u/SuspiciousSardaukar Apr 07 '24
If you got list which devices should be changed - I guess it could be an easy SQL fix
1
u/lemoncheesesticks Feb 07 '25
Here’s what worked for me to change a bunch of Axis cameras; maybe it’ll help someone else in the future:
On the LibreNMS server, log into the database. Issue commands like this:
USE librenms;UPDATE devices SET community = 'NewReadCommunityStringHere' WHERE community = 'OldReadCommunityStringHere' AND os like '%axis%' AND hostname like 'Camera-%' LIMIT 1;Test and verify everything is good to go, then remove the limit command to do the rest.