Closed faizshukri closed 7 years ago
Cachet is returning the status in a string and cachet-monitor expects only an integer in the json.
"status":"3"
The proper fix seems to be to fix the return value from Cachet but I can't figure out where exactly that lives in the code.
The other fix is to change the type of data that cachet-monitor expects from the return values in the code below and possibly other places. https://github.com/CastawayLabs/cachet-monitor/blob/master/incident.go#L85-L87
I believe this is Cachet issue, since their documentation state that status should be type integer. https://docs.cachethq.io/docs/incidents
It's actually the call to check the component status that cachet-monitor makes not the incident API. While the examples show an integer being returned it's not clearly stated that it will always be an integer and currently it's not and int, it's a string.
The original call from cachet-monitor: https://github.com/CastawayLabs/cachet-monitor/blob/master/incident.go#L75
The docs from Cachet site: https://docs.cachethq.io/docs/get-a-component
I agree though, it should be fixed on the Cachet side I just can't figure out where to fix it.. :) I'm opening an issue on the Cachet repo also just FYI.
Thanks!
Going to close in light of a new release
Cachet v2.2.2 and monitor v2.0
Got this error when it try to fetch component status.