Docker-compose install not detecting any services "no unmonitored services found"

CMK version:
OS version:
Docker-compose, hosted on ubuntu 20.04.

Error message:

no unmonitored services found, no vanished services found, no new host labels, [agent] Communication failed: [Errno 111] Connection refused

Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)

administrator@docker-v1:~$ cmk --debug -vvn Docker-V1
flag provided but not defined: -debug
usage: cmk [flags] [commands|apis] [-h]

CloudMonkey (cmk) 🐵 is a command line interface for Apache CloudStack.

Allowed flags:
  -h        Show this help message or API doc when specified after an API
  -v        Print version
  -o        API response output format: json, text, table, column, csv
  -p        Server profile
  -d        Enable debug mode

Default commands:
  exit      Exits
  help      Help
  set       Configures options for cmk
  sync      Discovers and updates APIs
  version   Version info

I have installed checkmk through docker compose onto an ubuntu VM,

ive installed pip3 and made sure to uninstall docker-py

root@linux# pip3 uninstall docker-py docker
root@linux# pip3 install docker

ive also made sure the port 6556 is open by adding the following rule on the dockervm;

sudo ufw allow 6556/tcp

ive then created a service within checkmk pointing to the ipv4 address of the dockervm where all my services are but no services are found.

i also get the errors;

Check_MK; (null)
Check_MK Discovery; no unmonitored services found, no vanished services found, no new host labels, [agent] Communication failed: [Errno 111] Connection refused**CRIT**

ive also followed tutorials to solve this from the forums and have tried setting the following setting

Hosts -> [pinghost.example.com](http://pinghost.example.com/)
Basic settings:
Data Sources -> Check_MK Agent -> [x] No agent.

at this point im at a loss, ive followed official tutorials from the checkmk youtube chanel but at the linked time in the video i see no services appear. When i rescan i have 0 services; Episode 33: Monitoring Docker containers with Checkmk - YouTube

can anyone help with this?

Did you register the Docker host for TLS?

so for my docker container thats running the server, i need to add external ports for the internal ports (443 or 80)?

this is my current docker compose file, how might this change to suit these requirements?

version: '3.3'
services:
    check-mk-free:
        ports:
            - '8084:5000'
            - '8007:8000'
        tmpfs: '/opt/omd/sites/cmk/tmp:uid=1000,gid=1000'
        volumes:
            - '/docker/checkmk/monitoring:/omd/sites'
            - '/etc/localtime:/etc/localtime:ro'
        container_name: checkmk-monitoring
        restart: always
        image: 'checkmk/check-mk-free:2.1.0p22'

Hi greenie,
please help me to understand your problem.
What I think you are trying to do is the follwing:

  • You have a virtual machine running Ubuntu 20.04
  • On this machine you are running the Check-MK instance via docker-compose
  • Check-MK is running well and you are able to log-in
  • Now you want to monitor the Ubuntu VM

if the above is correct - you have to install the CheckMK Agent “native” on your Ubuntu VM,
then add a host “Ubuntu VM” with the IPv4 address inside CheckMK and after that register
the agent → link from robin.gierse

This is incorrect;

  • I have a system with Ubuntu 20.04 running as a virtual machine
  • On this machine I am running the Check-MK instance via docker-compose
  • Check-MK is running well and I am able to log-in
  • I am able to monitor the docker-compose container Check-MK is in
  • I would like Check-MK to detect the containers hosted with docker-compose on this machine however Check-MK does not detect other containers and instead i get the error;
Check_MK Discovery; no unmonitored services found, no vanished services found, no new host labels, [agent] Communication failed: [Errno 111] Connection refused**CRIT**

OK - please have a look at this site: Monitoring Docker
In short:

  • Install the Agent on your Ubuntu VM and add this VM as a host
  • Install the docker agent plugin on your Ubuntu VM
1 Like

i would like to clarrify my last post, i have ubuntu 20.4 which is running on a virtual host. its within ubuntu i have installed docker and where Check-MK is installed as a docker container.

i would prefer to run Check-MK as a docker container, is there no way to get this working that way?

also, i have followed this tutorial on installing the docker plugin on my current setup however Check-MK wont automatically detect the containers running with docker

First the good news - it is possible :slight_smile:

What you want to do is monitor your docker-server (docker-v1).
For that the CheckMk Agent needs to be installed on your docker-server.
On top, the docker agent plugin needs to be installed on your docker-server.

Two more things:

  • your error message indicates that no communication to the agent is possible

Check_MK Discovery; no unmonitored services found, no vanished services found, no new host labels, [agent] Communication failed: [Errno 111] Connection refusedCRIT

Please check if you can reach the agent on your docker-v1 host

If that is not the case - look here How to access host port from docker container - Stack Overflow

And secondly the cmk command has nothing to do with cloudmonkey. It is a native and important CheckMK command which is automatically installed with your CheckMK site. For the command to work, you need to establish a console session with your CheckMK container.

1 Like

hi there, im returning to this as i never got it to work.

update on where i am at with the project;

  • i have a NEW ubunut 20.4 server created.
  • within ubuntu 20.4 server i have installed docker
  • i have several containers running successfuly in on this vm with docker
  • i have created a checkmk docker compose install and accessed the url with the login details provided
  • i have followed this tutorial to activate the agent for monitoring docker instances.
  • during the instructions to install pip3 install docker this command did not work, i had
    Command 'pip3' not found, but can be installed with: apt install python3-pip so instead i used python3 -m pip install docker which seemed to work.
  • returning to this section in the tutorial my services are not visible.
  • in the top right i have 2 critical warnings:
    no unmonitored services found, no vanished services found, no new host labels, [agent] Communication failed: [Errno 111] Connection refused
    [agent] Communication failed: [Errno 111] Connection refused**CRIT** , execution time 0.0 sec

here are the errors that the page you suggested gives me:

Ping:

PING 192.168.0.120 (192.168.0.120) 56(84) bytes of data.
64 bytes from 192.168.0.120: icmp_seq=1 ttl=64 time=0.094 ms
64 bytes from 192.168.0.120: icmp_seq=2 ttl=64 time=0.053 ms

--- 192.168.0.120 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 2ms

rtt min/avg/max/mdev = 0.053/0.073/0.094/0.020 ms, ipg/ewma 2.080/0.088 ms
Agent:
Communication failed: [Errno 111] Connection refused
SNMPv1:
SNMP Error on 192.168.0.120: Timeout: No Response from 192.168.0.120 (Exit-Code: 1)
SNMPv2c:
SNMP Error on 192.168.0.120: Timeout: No Response from 192.168.0.120 (Exit-Code: 1)
SNMPv2c (without Bulkwalk): SNMP Error on 192.168.0.120: Timeout: No Response from 192.168.0.120 (Exit-Code: 1)
SNMPv3:
SNMP Error on 192.168.0.120: Timeout: No Response from 192.168.0.120 (Exit-Code: 1)
Traceroute:
traceroute to 192.168.0.120 (192.168.0.120), 30 hops max, 60 byte packets 1 192.168.0.120 0.075 ms 0.039 ms 0.036 ms

  • after redeploying checkmk with the
extra_hosts:
    - "host.docker.internal:host-gateway"

i can no longer see “docker node and container” from the agent rules when searching for it so i am stuck
image