Sign inSign up
docker-collector-metrics logo

logzio/docker-collector-metrics

By logzio

•Updated almost 6 years ago

Docker container that collect metrics and forward those metrics to Logz.io

Image
0

500K+

logzio/docker-collector-metrics repository overview

⁠docker-collector-metrics

docker-collector-metrics is a Docker container that uses Metricbeat to collect metrics and forward those metrics to your Logz.io account.

To use this container, you'll set environment variables in your docker run command. docker-collector-metrics uses those environment variables to specify which Metricbeat modules you want to be collected. docker-collector-metrics mounts docker.sock to the container itself, allowing Metricbeat to collect the metrics and metadata.

docker-collector-metrics ships metrics only. If you want to ship logs to Logz.io, see docker-collector-logs⁠.

⁠docker-collector-metrics setup

⁠1. Pull the Docker image

Download the logzio/docker-collector-metrics image:

docker pull logzio/docker-collector-metrics
⁠2. Run the container

For a complete list of options, see the parameters below the code block.👇

docker run --name docker-collector-metrics \
--env LOGZIO_TOKEN="<ACCOUNT-TOKEN>" \
--env LOGZIO_URL="<LISTENER-URL>" \
--env LOGZIO_MODULES="<COLLECTED-MODULES>" \
logzio/docker-collector-metrics
⁠Parameters
ParameterDescription
LOGZIO_TOKENRequired. Your Logz.io account token. Replace <ACCOUNT-TOKEN> with the token⁠ of the account you want to ship to.
LOGZIO_URLDefault: listener.logz.io
Logz.io listener URL to ship the metrics to. For more information on finding your account's region, see Account region⁠.
LOGZIO_TYPEDefault: docker-collector-metrics
Logz.io type you'll use with this Docker. This is shown in your logs under the type field in Kibana. Logz.io applies parsing based on type.
LOGZIO_LOG_LEVELDefault: "INFO"
The log level the scripts will use
LOGZIO_MODULESRequired The Meatricbeat modules we will use for this container separated by ',' delimiter, formatted as "module1,module2,module3". Current we support these modules: system, docker
If you specify the docker module, you'll have to mounts docker.sock to the container itself by adding -v /var/run/docker.sock:/var/run/docker.sock:ro to the run command.
If you want to use your custom module configurations or use modules that we are yet to support, you need to mount the module files to /logzio/modules
LOGZIO_ADDITIONAL_FIELDSinclude additional fields with every message sent, formatted as "fieldName1=fieldValue1;fieldName2=fieldValue2". To use an environment variable, format as "fieldName1=fieldValue1;fieldName2=$ENV_VAR_NAME". In that case, the environment variable should be the only value in the field. If the environment variable can’t be resolved, the field is omitted.
⁠3. Check Logz.io for your metrics

Run the docker. Give your metrics a few minutes to get from your system to ours, and then open Kibana⁠.

⁠Change log

  • 0.0.4:
    • Refactor the image to use default Metricbeat yamls.
  • 0.0.3: BREAKING CHANGES:
    • using beats7
    • supporting multiple modules
  • 0.0.2: added the ability to set the type to fetched metrics.

Tag summary

Content type

Image

Digest

Size

98.8 MB

Last updated

almost 6 years ago

docker pull logzio/docker-collector-metrics