Open raffis opened 5 years ago
ideally you would want a health check on each pod similar to what https://github.com/Nexinto/check_kubernetes does
ideally you would want a health check on each pod similar to what https://github.com/Nexinto/check_kubernetes does
Yes indeed, but check_kubernetes is not a plugin shipped by icinga2. Therefore you need to manually configure kube-icinga to use that command by configuring:
kubernetes.pods.hostDefinition
or kubernetes.pods.serviceDefinition
to something like:
{"check_command":"check_kubernetes"}
.
It's not possible to dynamically add plugins for icinga2 due security reasons, if you have this plugin installed you may just do the custom config above.
Pods will probably be created via the check_dummy check_command by default since we can not be sure that icinga2 is deployed on kubernetes directly, if outside then icinga2 can't usually reach pods directly. But there are other ways as well. You may deploy a custom zone (An icinga satelite zone on kubernetes) and monitor resources via that satelite if icinga2 is deployed outside kubernetes. For example:
kubernetes.pods.hostDefinition
or kubernetes.pods.serviceDefinition
to something like:
{"check_command":"check_ping","zone":"kubernetes-cluster.local","command_endpoint":"kubernetes-endpoint.local"}
Sorry if I was being unclear. I know plugins can not be dynamically added. I was trying to point out it already exists - just to trying to show there is interest and to encourage you to implement this feature :-)
I agree with the rest of your statements. My test setup icinga2 is already able to reach the pods.
Is your feature request related to a problem? Please describe
Missing pods.
Describe the solution you'd like
Include pods as a new resource.
There are reasons to monitor single pods besides services:
Note that pod provisioning shall be disabled by default.