Closed jonathon2nd closed 4 years ago
Just changed config to double check:
expectation:
- type: HTTP_STATUS
status_range: 200-300
incident: MAJOR
And this is what is prints now:
cachet-url-monitor | INFO [2020-02-05 22:59:45,251] cachet_url_monitor.configuration.Configuration.example backend - Component current status: ComponentStatus.MAJOR_OUTAGE
cachet-url-monitor | INFO [2020-02-05 22:59:45,251] cachet_url_monitor.configuration.Configuration.example backend - Monitoring URL: GET https://example.com
cachet-url-monitor | INFO [2020-02-05 22:59:45,251] cachet_url_monitor.configuration.Configuration.example backend - Registered expectation: 'HTTP status range: [200, 300['
cachet-url-monitor | INFO [2020-02-05 22:59:45,251] cachet_url_monitor.scheduler - Registering action CREATE_INCIDENT
cachet-url-monitor | INFO [2020-02-05 22:59:45,251] cachet_url_monitor.scheduler - Registering action UPDATE_STATUS
cachet-url-monitor | INFO [2020-02-05 22:59:45,252] cachet_url_monitor.scheduler.Scheduler - Starting monitor agent...
...
cachet-url-monitor | INFO [2020-02-05 23:00:15,479] cachet_url_monitor.configuration.Configuration.example backend - Unexpected HTTP status (200)
cachet-url-monitor | INFO [2020-02-05 23:00:15,626] cachet_url_monitor.configuration.Configuration.example backend - Component update: status [ComponentStatus.MAJOR_OUTAGE]
cachet-url-monitor | INFO [2020-02-05 23:00:45,783] cachet_url_monitor.configuration.Configuration.example backend - Unexpected HTTP status (200)
cachet-url-monitor | INFO [2020-02-05 23:00:45,783] cachet_url_monitor.configuration.Configuration.example backend - No changes to component status.
Thanks for reporting this, @jonathon2nd. This should be fixed now. Please, feel free to re-open if you find it's still happening to you.
Except from config.yml
Except from logs:
At first I thought it may be a parsing issue, looking at this line of the log
cachet_url_monitor.configuration.Configuration.example backend - Registered expectation: 'HTTP status range: [200, 201['
But from the code that seems to be expected.