This is a million12/zabbix-agent docker image with Zabbix Agent. It's based on CentOS-7 official image.
The Zabbix agent has been patched to read system informations from these directories:
/data/proc
mapped from /proc
on the real host
/data/dev
mapped from /dev
on the real host
/data/sys
mapped from /sys
on the real host
Zabbix agent is running in foreground.
docker build -t million12/zabbix-agent .
ZABBIX_SERVER
- Zabbix Server address
HOSTNAME
- hostname
HOST_METADATA
- the metadata value shared by all servers on the same cluster. This value will match the autoregistration action
CONFIG_FILE
- config file path. (Used if custom file and path needed)
docker run \
-d \
-p 10050:10050 \
million12/zabbix-agent
docker run \
-d \
-p 10050:10050 \
-v /my-zabbix-agent-config.conf:/etc/zabbix_agentd.conf \
-e ZABBIX_SERVER=zabbix_server.ip \
-e HOSTNAME=my.zabbix \
-e CONFIG_FILE=/etc/zabbix_agentd.conf \
million12/zabbix-agent
docker run \
-d \
-p 10050:10050 \
-v /proc:/data/proc \
-v /sys:/data/sys \
-v /dev:/data/dev \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /my-zabbix-agent-config.conf:/etc/zabbix_agentd.conf \
--env="ZABBIX_SERVER=zabbix_server.ip" \
million12/zabbix-agent
Author: Przemyslaw Ozgo (linux@ozgo.info)
This work is also inspired by bhuisgen's work on his docker images. Many thanks!
Sponsored by Prototype Brewery - the new prototyping tool for building highly-interactive prototypes of your website or web app. Built on top of Neos CMS and Zurb Foundation framework.