Ad Widget

Collapse

zabbix_agent2.conf does not exist

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ericbrian
    Junior Member
    • Feb 2024
    • 3

    #1

    zabbix_agent2.conf does not exist

    I tried to install Zabbix using Docker on my Raspberry Pi. Here is the docker compose file:

    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
    ​
    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
  • Answer selected by ericbrian at 16-02-2024, 02:55.
    azyla
    Junior Member
    • Feb 2024
    • 20

    Hi,

    Based on official Zabbix Docker repository and documentation (zabbix/zabbix-agent2 - Docker Image | Docker Hub​ and 5 Installation from containers (zabbix.com)​) I think your volume mount for zabbix-agent:

    Code:
    ./zabbix/agent2/conf:/etc/zabbix
    should look like this:
    Code:
    ./zabbix/agent2/conf:/etc/zabbix/zabbix_agentd.d
    instead.

    Hope it helps.

    Regards,
    Arkadiusz

    Comment

    • ericbrian
      Junior Member
      • Feb 2024
      • 3

      #2
      Here is the yaml file: https://bitbucket.org/code-wonderer-...nippets/aqEa6b

      Comment

      • azyla
        Junior Member
        • Feb 2024
        • 20

        #3
        Hi,

        Based on official Zabbix Docker repository and documentation (zabbix/zabbix-agent2 - Docker Image | Docker Hub​ and 5 Installation from containers (zabbix.com)​) I think your volume mount for zabbix-agent:

        Code:
        ./zabbix/agent2/conf:/etc/zabbix
        should look like this:
        Code:
        ./zabbix/agent2/conf:/etc/zabbix/zabbix_agentd.d
        instead.

        Hope it helps.

        Regards,
        Arkadiusz

        Comment

        • ericbrian
          Junior Member
          • Feb 2024
          • 3

          #4
          Originally posted by azyla
          Hi,

          Based on official Zabbix Docker repository and documentation (zabbix/zabbix-agent2 - Docker Image | Docker Hub and 5 Installation from containers (zabbix.com)​) I think your volume mount for zabbix-agent:

          Code:
          ./zabbix/agent2/conf:/etc/zabbix
          should look like this:
          Code:
          ./zabbix/agent2/conf:/etc/zabbix/zabbix_agentd.d
          instead.

          Hope it helps.

          Regards,
          Arkadiusz
          That fixed it, indeed. Thank you. Now off to finding why the database isn't working. hehehe

          Comment

          Working...