agapoff / check_kubernetes

Nagios/Icinga/Zabbix style plugin for checking Kubernetes
64 stars 36 forks source link

kubectl warnings break check_kubernetes #19

Open ebourg opened 3 years ago

ebourg commented 3 years ago

kubectl prints warnings that are prepended to the JSON message returned by the getJSON() function, for example:

 Throttling request took 1.50705208s, request: GET:<URL>

This breaks the parsing of the message and the check fails.

I worked around this issue by adding --v=1 when calling kubectl. If it's possible if would be nice to separate the warning from the JSON message and print it to the output.