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

[Stupid question] improve readme #6

Closed
username1222 opened this issue Oct 30, 2019 · 3 comments
Closed

[Stupid question] improve readme #6

username1222 opened this issue Oct 30, 2019 · 3 comments
Labels
question Further information is requested

Comments

@username1222
Copy link

Hi,

I feel like this is a stupid question; How can I create Prometheus rules from this, and make this useful for my environment?

Can you add something like to the README in an ELI5 fashion?

Viele danke.

@username1222 username1222 changed the title [Stupid question] [Stupid question] improve readme Oct 30, 2019
@jabbrwcky
Copy link
Contributor

Hi,

you could use an alert definition like this one to alert on OOM killed pods:

alert: ComponentOutOfMemory
expr: sum_over_time(kube_pod_container_status_terminated_reason{reason="OOMKilled"}[5m])
  > 0
for: 10s
labels:
  severity: warning
annotations:
  description: Critical Pod {{$labels.namespace}}/{{$labels.pod}} was OOMKilled.

@boosty
Copy link
Contributor

boosty commented Nov 1, 2019

For completeness: kube_pod_container_status_terminated_reason is provided by /~https://github.com/kubernetes/kube-state-metrics.

@boosty boosty added the question Further information is requested label Nov 1, 2019
@boosty
Copy link
Contributor

boosty commented Nov 7, 2019

Please have a look at kubernetes/kube-state-metrics#535.

kube_pod_container_status_last_terminated_reason (notice the last part) seems like the better metric to use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants