Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy pods to icinga2 #13

Open
raffis opened this issue Mar 8, 2019 · 3 comments
Open

Deploy pods to icinga2 #13

raffis opened this issue Mar 8, 2019 · 3 comments
Labels
feature New feature or request
Milestone

Comments

@raffis
Copy link
Contributor

raffis commented Mar 8, 2019

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:

  • There are pods which do not have a service but should be monitored
  • Cronjobs (Lead to pods in kubernetes, failed pods can be discovered that way)

Note that pod provisioning shall be disabled by default.

@raffis raffis added the feature New feature or request label Mar 8, 2019
@Sec42
Copy link

Sec42 commented May 15, 2019

ideally you would want a health check on each pod similar to what https://github.com/Nexinto/check_kubernetes does

@raffis
Copy link
Contributor Author

raffis commented May 16, 2019

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"}

@Sec42
Copy link

Sec42 commented May 21, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants