Question

UNKNOWN: Cannot decode json response Centreon plugin Kubernetes

  • 11 July 2022
  • 1 reply
  • 237 views

Badge +9

Hello,

 

I used centreon-plugin-Cloud-Prometheus-Kubernetes.

Suddenly my service return  Cannot decode json response  with the extra large output like:

UNKNOWN: Cannot decode json response: {"kind":"DeploymentList","apiVersion":"apps/v1","metadata":{"resourceVersion":"285898050"},"items":[{"metadata":{"name":"frt-user-compet","namespace":"cmp","uid":"1584f994-863e-4753-8178-f1d4be407dc9","resourceVersion":"282014202","generation":18,"creationTimestamp":"2022-06-22T10:35:46Z","labels":{"k8s-app":"frt-user-compet"},"annotations":{"deployment.kubernetes.io/revision":"11","kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"annotations\":{},\"labels\":{\"k8s-app\":\"frt-user-compet\"},\"name\":\"frt-user-compet\",\"namespace\":\"cmp\"},\"spec\":{\"revisionHistoryLimit\":1,\"selector\":{\"matchLabels\":{\"k8s-app\":\"frt-user-compet\"}},\"strategy\":{\"rollingUpdate\":{\"maxSurge\":\"25%\",\"maxUnavailable\":\"25%\"},\"type\":\"RollingUpdate\"},\"template\":{\"metadata\":{\"annotations\":…………………………

 

 

 

What does that mean? How to solve the problem?

 

Cordialy,

Francis


1 reply

Userlevel 6
Badge +19

Something the JSON parser doesn’t like.

 

Redirect the whole json to a txt file and try to display it: 

 

python -m json.tool /path/to/the/file.json

 

It will help understanding where it fails. 

Reply