mtakaki/cachet-url-monitor

latency_unit is read from cachet section

Closed this issue · 1 comments

nijel commented

The code behaves differently than documented, the docs says, that latency_unit should be placed in endpoint configuration, but it is read from cachet section:

# The latency_unit configuration is not mandatory and we fallback to seconds, by default.
self.latency_unit = self.data['cachet'].get('latency_unit') or 's'

I can submit a PR once it's clear whether code or docs is the one to follow :-).

Good catch! The configuration should be per endpoint, as metrics are 1:1 with resources. I'll let you decide if you want to tackle this or should I do it :)