Ad Widget

Collapse

ZBX_NOTSUPPORTED Unknown metric from cli, but works fine in web?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ddrucker
    Member
    • Feb 2019
    • 35

    #1

    ZBX_NOTSUPPORTED Unknown metric from cli, but works fine in web?

    I have zabbix-agent2 running on a host, and I am using the Docker template on my server (6.4). In the web interface, Docker information is being collected just fine.


    But if I try to collect that information from the CLI:

    root@my-docker-host# zabbix_agent2 -t docker.containers.stopped
    docker.containers.stopped [m|ZBX_NOTSUPPORTED] [Unknown metric docker.containers.stopped]

    root@my-zabbix-server# zabbix_get -k docker.containers.stopped -s eco.3e.org
    ZBX_NOTSUPPORTED: Unknown metric docker.containers.stopped



    ​What am I doing wrong here?
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    based on https://www.zabbix.com/documentation.../zabbix_agent2
    there is no such key that agent knows called as "docker.containers.stopped". If you look closer. you will see, that it is a "dependent item" in that template. Meaning, it gets its data from master item via preprocessing and you cannot poll it directly from agent.

    https://www.zabbix.com/integrations/docker#docker
    Docker: Containers stopped Total number of containers stopped on this host. Dependent item docker.containers.stopped

    Preprocessing
    • JSON Path: $.ContainersStopped

    Comment

    • ddrucker
      Member
      • Feb 2019
      • 35

      #3
      Ah I understand now! Thank you!

      Comment

      Working...