mtakaki / cachet-url-monitor

URL monitor plugin for cachethq.io
MIT License
124 stars 48 forks source link

Sorting the endpoints based on status #135

Open monu56 opened 2 years ago

monu56 commented 2 years ago

Hi, I am looking out for a solution where our Cachet Status Page can sort the components based on the status (For ex: Outage URL should be listed first in the status page UI). I followed the documentation, but not clear where exactly to make changes. Can anyone help please.

Ref: https://docs.cachethq.io/docs/advanced-api-usage

What I think, I should make changes in the config.yml file -> api_url section, but that's giving me an error:

Config_File: capture

Error: Traceback (most recent call last): File "cachet_url_monitor/scheduler.py", line 160, in configuration = Configuration(config_data, endpoint_index, client, webhooks) File "/home/cachet/py3/lib64/python3.7/site-packages/cachet_url_monitor-0.6.11-py3.7.egg/cachet_url_monitor/configuration.py", line 105, in init self.status = self.client.get_component_status(self.component_id) File "/home/cachet/py3/lib64/python3.7/site-packages/cachet_url_monitor-0.6.11-py3.7.egg/cachet_url_monitor/client.py", line 82, in get_component_status return status.ComponentStatus(int(get_status_request.json()["data"]["status"])) TypeError: list indices must be integers or slices, not str