caicloud / event_exporter

Exporter for kubernetes events

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question: What do the values mean for a kubernetes_events?

uckingleaf opened this issue · comments

/kind feature

I noticed that some of the kubernetes_event metrics have a value of 0.
I'm assuming that a kubernetes_event with a value of 1 means that the event happened at around the time of scrapping, however I'm not sure about what an event with a 0 value means.

Like in the example:
/# HELP kubernetes_events State of kubernetes events
/# TYPE kubernetes_events gauge
kubernetes_events{event_kind="Pod",event_name="nginx-pc-534913751-2yzev",event_namespace="allen",event_reason="BackOff",event_source="kube-node-3/kubelet",event_subobject="spec.containers{nginx}",event_type="Normal"} 1
kubernetes_events{event_kind="Pod",event_name="nginx-pc-534913751-2yzev",event_namespace="allen",event_reason="Failed",event_source="kube-node-3/kubelet",event_subobject="spec.containers{nginx}",event_type="Warning"} 0

My question is, what do the 0 and 1 values mean for the kubernetes_events ?

Thank you!

1 means that the event happened and 0 means that the event doesn't happen.

The event will be observed for maxPreserve, it may happen in last interval, then the value is 1; and does not happen in next interval, then the value is 0.

Thank you!