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 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.snmpAdd this entry to the root crontab. It is necessary, because it likely time out otherwise. Use
*/1if you want to have the most recent statistics at each poll. Use*/5for 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.