-
Notifications
You must be signed in to change notification settings - Fork 27
SNMP Quickstart
Download the ktranslate image:
docker pull kentik/ktranslate:v2
Pull out SNMP config file to local directory and discard container:
id=$(docker create kentik/ktranslate:v2)
docker cp $id:/etc/snmp-base.yaml .
docker rm -v $id
Edit the file snmp-base.yaml, setting cidrs:
and default_communities:
to be correct for your network.
Discover SNMP devices:
docker run -ti --name ktranslate --rm --net=host \
-v `pwd`/snmp-base.yaml:/snmp-base.yaml \
kentik/ktranslate:v2 \
-snmp /snmp-base.yaml \
-log_level info \
-snmp_discovery=true
Look for a log line like [Info] KTranslate Adding 3 new snmp devices to the config, 0 replaced from 3
.
If nothing is discovered, re-run and/or increase the timeout value timeout_ms:
. Consider setting check_all
to true
as well. This will slow down the discovery process but find otherwise hidden devices. If still nothing is discovered, set the cidrs:
blocks to be only /32
length. This forces the discovery process into a more in depth mode which should work as long as the device is snmpwalk-able.
Discovered devices are listed in the snmp-base.yaml
file.
Run polling:
docker run -ti --name ktranslate --rm --net=host \
-e KENTIK_API_TOKEN=$KENTIK_TOKEN \
-v `pwd`/snmp-base.yaml:/snmp-base.yaml \
kentik/ktranslate:v2 \
-snmp /snmp-base.yaml \
-log_level info \
-format json \
-kentik_email me@foo.com
By default, only the mib IF-MIB
is polled. Add other mibs here as your devices supports them.
To send to a sink such as New Relic, run:
docker run -d --name ktranslate --net=host \
-e NEW_RELIC_API_KEY=NRII-$NR_TOKEN \
-e KENTIK_API_TOKEN=$KENTIK_TOKEN \
-v `pwd`/snmp-base.yaml:/snmp-base.yaml \
kentik/ktranslate:v2 \
-snmp /snmp-base.yaml \
-compression gzip \
-sinks new_relic \
-nr_account_id $NR_ACCOUNT_ID \
-log_level info \
-format new_relic_metric \
-kentik_email me@foo.com
Get logs with docker logs ktranslate