Docker

A Docker container for NetObserv SNMP is available on Docker Hubarrow-up-right. docker-composearrow-up-right is a good way to run the container. It allows for the various environment variables, used to configure the collector, to be easily managed in one place without having to enter them on the command line.

docker-compose.yml

The following docker-compose.yml file provides a starting point that can be further customized for your environment and needs.

image

The name of the current released image is elastiflow/snmp-collector:7.24.0.

restart

restart is set to unless-stopped so that the collector will restart automatically if it fails for some reason.

volumes

There are a few scenarios where it is necessary to make files on the host file system available to the collector.

In the example above, /etc/elastiflow on the host's filesystem is mapped into the same path within the container. It is recommended to place the SNMP poller definition files in /etc/elastiflow/snmp.

circle-info

It is also possible to build a new container, adding additional files as needed. This may the best choice if running the container in a dynamically orchestrated environment (e.g. running in Kubernetes). However for an instance dedicated to a specific host, using bind mounted volumes can be very convenient.

environment variables

NetObserv SNMP is configured using environment variables.

For a complete reference of all configuration options please refer to the Configuration Reference.

Running the Container

After completing configuration of the collector in the docker-compose.yml file, you can start the container using one of the following commands...

From within the same path as the docker-compose.yml file:

From a path different from the location of the docker-compose.yml file:

To view the logs written by the container run:

To stop the container run:

or:

Last updated

Was this helpful?