Ad Widget

Collapse

Zabbix Agent2 shows Docker Offline

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Thijs
    Junior Member
    • Mar 2020
    • 9

    #1

    Zabbix Agent2 shows Docker Offline

    Hi!

    I've recently upgraded to Zabbix 5.0.1 on ubuntu server 18.04.2 However i'm running into trouble loading docker data into Zabbix using the new Agent2 with the Docker plugin.

    In the zabbix-agent2.conf i've uncommented the line:
    Code:
    Plugins.Docker.Endpoint=unix:///var/run/docker.sock
    and then
    Code:
     sudo systemctl restart zabbix-agent2
    to apply the changes made to the config.

    Then i've added the template from the official docker intergration and added the template to the host with the new agent2.

    However when checking the latest data it shows
    Code:
     2020-06-26 10:53:40    Down (0)
    with no other data showing.
    The log is as follows:
    Code:
    2020/06/26 11:11:36.193323 Starting Zabbix Agent 2 [Zabbix server]. (5.0.1)
    2020/06/26 11:11:36.193832 OpenSSL library (OpenSSL 1.1.1  11 Sep 2018) initialized
    2020/06/26 11:11:36.193986 using configuration file: /etc/zabbix/zabbix_agent2.conf
    2020/06/26 11:11:36.194056 using plugin ‘Agent’ providing following interfaces: exporter
    2020/06/26 11:11:36.194064 using plugin ‘Cpu’ providing following interfaces: exporter, collector, runner
    2020/06/26 11:11:36.194070 using plugin ‘Docker’ providing following interfaces: exporter, configurator
    2020/06/26 11:11:36.194096 using plugin ‘File’ providing following interfaces: exporter, configurator
    2020/06/26 11:11:36.194102 using plugin ‘Kernel’ providing following interfaces: exporter
    2020/06/26 11:11:36.194107 using plugin ‘Log’ providing following interfaces: exporter, configurator
    2020/06/26 11:11:36.194120 using plugin ‘Memcached’ providing following interfaces: exporter, runner, configurator
    2020/06/26 11:11:36.194124 using plugin ‘Mysql’ providing following interfaces: exporter, runner, configurator
    2020/06/26 11:11:36.194133 using plugin ‘NetIf’ providing following interfaces: exporter
    2020/06/26 11:11:36.194139 using plugin ‘Postgres’ providing following interfaces: exporter, runner, configurator
    2020/06/26 11:11:36.194155 using plugin ‘Proc’ providing following interfaces: exporter, collector
    2020/06/26 11:11:36.194160 using plugin ‘Redis’ providing following interfaces: exporter, runner, configurator
    2020/06/26 11:11:36.194168 using plugin ‘SystemRun’ providing following interfaces: exporter, configurator
    2020/06/26 11:11:36.194173 using plugin ‘Systemd’ providing following interfaces: exporter
    2020/06/26 11:11:36.194179 using plugin ‘TCP’ providing following interfaces: exporter, configurator
    2020/06/26 11:11:36.194256 using plugin ‘UDP’ providing following interfaces: exporter, configurator
    2020/06/26 11:11:36.194261 using plugin ‘Uname’ providing following interfaces: exporter
    2020/06/26 11:11:36.194266 using plugin ‘Uptime’ providing following interfaces: exporter
    2020/06/26 11:11:36.194271 using plugin ‘VFSDev’ providing following interfaces: exporter, collector
    2020/06/26 11:11:36.194276 using plugin ‘Web’ providing following interfaces: exporter, configurator
    2020/06/26 11:11:36.194281 using plugin ‘ZabbixAsync’ providing following interfaces: exporter
    2020/06/26 11:11:36.194290 using plugin ‘ZabbixStats’ providing following interfaces: exporter, configurator
    2020/06/26 11:11:36.194294 using plugin ‘ZabbixSync’ providing following interfaces: exporter
    I'm at a loss here and I can't really find a lot of documentation about it.

    Thanks in advance!
    Last edited by Thijs; 26-06-2020, 11:21.
  • Atsushi
    Senior Member
    • Aug 2013
    • 2028

    #2
    Are the socket permissions for Docker accessible to the zabbix user?
    Although the distribution is different, I have provided support at the following URL.

    Comment

    • Thijs
      Junior Member
      • Mar 2020
      • 9

      #3
      Hi! Everything shows as enabled:
      Click image for larger version

Name:	Enabled.PNG
Views:	6531
Size:	15.6 KB
ID:	405593
      I've added the Zabbix user to the docker group:
      Code:
      $ sudo usermod -aG docker zabbix
      $ groups zabbix
      zabbix : zabbix docker
      but I'm still getting:
      Click image for larger version

Name:	Down.PNG
Views:	6496
Size:	1.7 KB
ID:	405592
      Attached Files

      Comment

      • visiandy
        Junior Member
        • Jul 2020
        • 8

        #4
        Hey!
        Try to raise logging level for zabbix agent and tail log file. Most likely it's a socket access problem. Also it wasn't needed to uncommenting docker endpoint line in your agent config, it is a default setting.

        Comment

        • Thijs
          Junior Member
          • Mar 2020
          • 9

          #5
          Yup, it was definetly my own fault, after adding the users to the docker group and restarting the machine, it works like a charm!

          Comment

          • jorioux
            Junior Member
            • Nov 2011
            • 10

            #6
            Originally posted by Thijs
            Yup, it was definetly my own fault, after adding the users to the docker group and restarting the machine, it works like a charm!
            Didn't had to restart the machine. Just restart the zabbix-agent2 service and it works.

            Comment

            Working...