1
0
Go to file
2024-05-07 16:04:42 +00:00
_icon Accepting request 835207 from home:vtheile 2020-09-21 08:22:54 +00:00
_service Accepting request 835207 from home:vtheile 2020-09-21 08:22:54 +00:00
.gitattributes Accepting request 835207 from home:vtheile 2020-09-21 08:22:54 +00:00
.gitignore Accepting request 835207 from home:vtheile 2020-09-21 08:22:54 +00:00
config.sh Accepting request 835207 from home:vtheile 2020-09-21 08:22:54 +00:00
LICENSE Accepting request 835207 from home:vtheile 2020-09-21 08:22:54 +00:00
pre-checkin.sh Accepting request 835207 from home:vtheile 2020-09-21 08:22:54 +00:00
prometheus-webhook-snmp-image.changes Accepting request 1171253 from home:bmwiedemann:branches:server:monitoring 2024-05-07 08:46:44 +00:00
prometheus-webhook-snmp-image.kiwi Accepting request 1171253 from home:bmwiedemann:branches:server:monitoring 2024-05-07 08:46:44 +00:00
prometheus-webhook-snmp-image.xsl Accepting request 835207 from home:vtheile 2020-09-21 08:22:54 +00:00
README.md Accepting request 835207 from home:vtheile 2020-09-21 08:22:54 +00:00
ses7.xml Accepting request 835207 from home:vtheile 2020-09-21 08:22:54 +00:00
tumbleweed.xml Accepting request 835207 from home:vtheile 2020-09-21 08:22:54 +00:00

Networking

You need to publish the port the Prometheus receiver is listening on by using the command line argument --publish <HOST_PORT>:<CONTAINER_PORT> when running the container because the port is not exposed automatically because it is configurable. The default port is 9099.

Additionally the SNMP host needs to be configured. Use the container's network gateway to be able to receive SNMP traps outside the container.

$ docker run --publish <LISTENING_PORT>:<LISTENING_PORT> --env ARGS="--debug --snmp-host=<CONTAINER_GATEWAY>" ...

Alternatively simply connect the container to the host network.

$ docker run --network=host ...

Configure prometheus-webhook-snmp

The configuration documentation can be found here.

The container can be configured via the environment variables ARGS and RUN_ARGS or by mounting a configuration file into the container.

Using environment variables

Use ARGS to set global options and RUN_ARGS for the run command options. The environment variable ARGS defaults to --debug.

$ docker run --env ARGS="--debug --snmp-community=foo" --env RUN_ARGS="--metrics" ...

Using a configuration file

$ docker run -v $(pwd)/prometheus-webhook-snmp.conf:/etc/prometheus-webhook-snmp.conf ...