I tried to install Zabbix using Docker on my Raspberry Pi. Here is the docker compose file:
Everything shows as running execpt the agent. When I look at the logs, I get:
docker logs zabbix-zabbix-agent-1
** Preparing Zabbix agent
** Preparing Zabbix agent configuration file
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
** Using 'zabbix-server' servers for passive checks
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
** Using 'zabbix-server:10051' servers for active checks
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
<snip>
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
** Preparing Zabbix agent plugin configuration files
**** Configuration file '/etc/zabbix/zabbix_agent2.d/plugins.d/mongodb.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.d/plugins.d/postgresql.conf' does not exist
zabbix_agent2 [7]: ERROR: cannot open configuration file: open /etc/zabbix/zabbix_agent2.conf: no such file or directory
Can anybody see what I am doing wrong here?
Thanks
Code:
version: '3.7' services: db: image: postgres:13.1-alpine environment: - POSTGRES_USER=zabbix - POSTGRES_PASSWORD=zabbix - POSTGRES_DB=zabbix volumes: - ./zabbix/dbs/postgres:/var/lib/postgresql/data zabbix-server: image: zabbix/zabbix-server-pgsql:alpine-latest depends_on: - db ports: - "10051:10051" environment: - ZBX_SERVER_HOST=zabbix-server - ZBX_SERVER_FQDN=zabbix-server - ZBX_SERVER_PORT=10051 - ZBX_SERVER_LISTENIP=0.0.0.0 - POSTGRES_DB=zabbix - POSTGRES_USER=zabbix - POSTGRES_PASSWORD=zabbix - DB_SERVER=db volumes: - ./zabbix/server/conf:/etc/zabbix - ./zabbix/server/logs:/var/log/zabbix - ./zabbix/server/alertscripts:/usr/lib/zabbix/alertscripts - ./zabbix/server/externalscripts:/usr/lib/zabbix/externalscripts zabbix-web: image: zabbix/zabbix-web-nginx-pgsql:alpine-latest depends_on: - zabbix-server ports: - "8081:80" environment: - ZBX_SERVER_HOST=zabbix-server - ZBX_SERVER_FQDN=zabbix-server - ZBX_SERVER_PORT=10051 - PHP_TZ=Europe/London volumes: - ./zabbix/web/conf:/etc/zabbix - ./zabbix/web/nginx/conf.d:/etc/nginx/conf.d - ./zabbix/web/html:/var/www/html zabbix-agent: image: zabbix/zabbix-agent2:alpine-latest depends_on: - zabbix-server environment: - ZBX_SERVER_HOST=zabbix-server - ZBX_SERVER_FQDN=zabbix-server - ZBX_SERVER_PORT=10051 - ZBX_HOSTNAME=zabbix-agent volumes: - ./zabbix/agent2/conf:/etc/zabbix - /proc:/host/proc - /sys:/host/sys
docker logs zabbix-zabbix-agent-1
** Preparing Zabbix agent
** Preparing Zabbix agent configuration file
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
** Using 'zabbix-server' servers for passive checks
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
** Using 'zabbix-server:10051' servers for active checks
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
<snip>
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.conf' does not exist
** Preparing Zabbix agent plugin configuration files
**** Configuration file '/etc/zabbix/zabbix_agent2.d/plugins.d/mongodb.conf' does not exist
**** Configuration file '/etc/zabbix/zabbix_agent2.d/plugins.d/postgresql.conf' does not exist
zabbix_agent2 [7]: ERROR: cannot open configuration file: open /etc/zabbix/zabbix_agent2.conf: no such file or directory
Can anybody see what I am doing wrong here?
Thanks
Comment