Ad Widget

Collapse

Zabbix Agent in a container not able to check the filesystems

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • albertokg
    Junior Member
    • Feb 2023
    • 6

    #1

    Zabbix Agent in a container not able to check the filesystems

    Hello,
    please, correct me if I'm wrong. If I run a Zabbix agent on a docker container, I can't monitor all the machine filesystems.
    Because I did that, but the only filesystems that my agent discovered, it's the one defined in the "volumes" section of the docker file.
    Do you know a way to monitor all the filesystems of the machine?

    Regards
    Alberto
  • Answer selected by albertokg at 02-04-2025, 19:15.
    PavelZ
    Senior Member
    • Dec 2024
    • 162

    There are many problems with this. I am not surprised if people refuse to run the agent in the image

    Would you like to see how this is solved in the official repository https://github.com/zabbix/zabbix-docker ?

    You will have to write something like this in the container declaration:
    Code:
    volumes:
    ...
    - /proc:/proc
    - /sys:/sys
    - /dev:/dev
    - /var/run/docker.sock:/var/run/docker.sock
    - /:/host/:ro
    There are also unsolvable problems with getting network interface statistics.
    This is where network_mode: host comes in handy

    Comment

    • PavelZ
      Senior Member
      • Dec 2024
      • 162

      #2
      There are many problems with this. I am not surprised if people refuse to run the agent in the image

      Would you like to see how this is solved in the official repository https://github.com/zabbix/zabbix-docker ?

      You will have to write something like this in the container declaration:
      Code:
      volumes:
      ...
      - /proc:/proc
      - /sys:/sys
      - /dev:/dev
      - /var/run/docker.sock:/var/run/docker.sock
      - /:/host/:ro
      There are also unsolvable problems with getting network interface statistics.
      This is where network_mode: host comes in handy

      Comment

      • albertokg
        Junior Member
        • Feb 2023
        • 6

        #3
        Thank you very much PavelZ I suspected a matter of this. I think that the best way is to run agent directly in the host and leave it checking all the filesystems and network interfaces normally.

        Regards
        Alberto

        Comment

        Working...