Icinga monitor client

@fpoulain I was able to run your monitoring_client and sent a tiny contribution.

molecule converge -s monitoring_client

However, when I go to the web interface there still is just one host being monitored. I think it’s because the files created before restarting the icinga service are not in the container, they are in the host and unknown to the container.

- name: disable local configuration
  lineinfile:
    line: 'include_recursive "conf.d"'
    state: absent
    path: /etc/icinga2/icinga2.conf

- name: disable configuration checker
  icinga2_feature:
    name: checker
    state: absent
...

I think the proper way to do this would be to write the files in /srv/icinga2/icinga/etc/icinga2 which is bind mounted on /etc/icinga2 in the container.

Does that make sense ?

Yeah sure (if docker is ok with that workflow). This is corrected on my working copy but I didn’t took time to push it.

By the way, it is not yet sufficient. I have to produce a suitable configuration for monitoring on the master. It is on the way but not yet done.

Finally, as a functional test, I should ask icinga master’s API to dump all defined checks for the defined client, and verify their quantity and their status.

1 Like

Now we have a correct set up for icinga master and clients, tested via molecule. Each zone are well defined. I will have now to

  • produce a test file for molecule, acknowledging client stuff setup from API and from icingaweb2 points of view;
  • deploying needed configuration allowing automated tests for all required stuff.
1 Like