tnyim / upcachet

Uptime Robot -> Cachet bridge
MIT License
4 stars 4 forks source link

Not working with Cachet 2.4-dev #1

Open Byolock opened 4 years ago

Byolock commented 4 years ago

I tried to implement this solution on an Ubuntu 18.04 Server. Everything works fine till I start upp upcachet the second time (configured api keys and endpoint).

Then i get : 2020/03/12 14:31:02 and here is the list of Cachet components: 2020/03/12 14:31:02 json: cannot unmarshal number into Go struct field Component.status of type string

I manually found out the id of cachet components an did the mapping. Started up cachet the second time and ... it said i should configure endpoints. Turns out upcachet resets my config file everytime I do the component mapping.

Below my config file before it gets reset:

"MonitorComponentMap": { "784469716": [ 5, 7 ], }, "MonitorMetricMap": {}, "MonitorComponentStatusMap": { "2": 1, "9": 4 }, "CheckInterval": 0, "CachetAPIkey": "secured", "CachetEndpoint": "http://secured", "UptimeRobotAPIkey": "secured", "BindAddress": "" }

ElJoelReis commented 4 years ago

Same here.

2020/03/29 19:16:11 Config loaded 2020/03/29 19:16:11 Initializing Cachet client... 2020/03/29 19:16:11 Pinging Cachet API endpoint... 2020/03/29 19:16:11 Ping success 2020/03/29 19:16:11 Starting Uptime Robot monitor... 2020/03/29 19:16:11 Uptime Robot account using 9 monitors out of 50 2020/03/29 19:16:11 UptimeRobot monitor interval is 5 minutes. 2020/03/29 19:16:11 Check interval is 150 seconds. 2020/03/29 19:16:12 Updating Cachet component 1 to Cachet status 1 2020/03/29 19:16:12 UpdateComponentStatus: json: cannot unmarshal number into Go struct field Component.data.status of type string