Ad Widget

Collapse

How to use systemd plugin if agent2 running in container?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • d0d0
    Member
    • May 2023
    • 41

    #1

    How to use systemd plugin if agent2 running in container?

    Hi there, I am deploying agent2 in 99% of my Linux hosts in a container. I would like to use the systemd plugin with the corresponding Template, but this does not seem to work in a container. Presumably one needs to expose some path to agent2 container to get this to work, but this is not documented (not in the official docs, nor on ducker hub).

    Please let us know what needs to be done, so that the systemd plugin in the agent2 container can extract items from the docker host.
  • gferradas
    Junior Member
    • Jan 2023
    • 24

    #2
    maybe create a volume in the systemd files you need and attach it to the container?

    Comment

    • d0d0
      Member
      • May 2023
      • 41

      #3
      no sure what exactly you mean in detail. What I have done is this:

      -v '/var/run/dbus/system_bus_socket':'/var/run/dbus/system_bus_socket':'rw'
      this alone, is not enough. Any details on what you mean?

      Comment

      • gferradas
        Junior Member
        • Jan 2023
        • 24

        #4
        something like that i really dont know how the template works but you should see what files uses and attach them to the container with a volume

        Comment

        • gferradas
          Junior Member
          • Jan 2023
          • 24

          #5
          i seen the template and sincerely my answer is kinda useless maybe you can map the container to the systemd socket to interact with it?

          Comment

          • d0d0
            Member
            • May 2023
            • 41

            #6
            If you read my first response you will see that is exactly what I did. But that was not enough.

            Comment

            • gferradas
              Junior Member
              • Jan 2023
              • 24

              #7
              Maybe is a bug in the containers you have did you use a compose o dockerfile from the github if you did maybe you can submit an issue https://github.com/zabbix/zabbix-docker/tree/6.4

              Comment

              Working...