I’m using snmp-scan.php to add servers to LibreNMS every day using a cron job. The downside is that we don’t know if a server was added or removed. Is it possible to add a feature or tweak an option to get more information about the process?
Thanks for the tip, it’s helpful but still not as good as making my own wrapper over the API to get some normal output that can be helpful for troubleshooting and reporting.
-bash-4.2$ ./snmp-scan.php -i -r 192.168.10.0/24
Range: 192.168.10.0/24
Scanning: 192.168.10.1
Could not connect, please check the snmp details and snmp reachability over udp
SNMP v2c: No reply with community my-community
SNMP v3: No reply with credentials root/noAuthNoPriv
SNMP v1: No reply with community my-community
Could not connect, please check the snmp details and snmp reachability over tcp
SNMP v2c: No reply with community my-community
SNMP v3: No reply with credentials root/noAuthNoPriv
SNMP v1: No reply with community my-community
Failed to Add Device 192.168.10.1
Scanning: 192.168.10.2
Unpingable Device 192.168.10.2
Scanning: 192.168.10.3
Unpingable Device 192.168.10.3
Scanning: 192.168.10.4
Unpingable Device 192.168.10.4
Scanning: 192.168.10.5
Unpingable Device 192.168.10.5