Opensearch\Elasticsearch
Install prereqs
apt-get install libjson-perl libfile-slurp-perl liblwp-protocol-https-perl libmime-base64-perl
pkg install p5-JSON p5-File-Slurp p5-LWP-Protocol-https p5-MIME-Base64
cpanm JSON Libwww File::Slurp LWP::Protocol::HTTPS MIME::Base64
SNMP Extend
-
Download the script onto the desired host.
wget https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/opensearch -O /etc/snmp/opensearch -
Make it executable
chmod +x /etc/snmp/opensearch -
Update your
snmpd.conf.Can be directly or via cron. It recommended to use cron if under heavy load it time out waiting for Opensearch.
extend opensearch /etc/snmp/opensearchextend opensearch /bin/cat /var/cache/opensearch.json.snmpUpdate root crontab with. This is required as it will this will likely time out otherwise. Use
*/1if you want to have the most recent stats when polled or to*/5if you just want at exactly a 5 minute interval.*/5 * * * * /etc/snmp/opensearch -w -q -
Restart snmpd on your host.
sudo systemctl restart snmpd -
Enable it or wait for the device to be re-disocvered.