[collectd] mapping read plugin outputs onto thresholds
Dave Cottlehuber
dch at skunkwerks.at
Fri Mar 3 16:08:36 CET 2017
bump - how to map plugin outputs to thresholds? any ideas?
On Thu, 19 Jan 2017, at 08:10, Dave Cottlehuber wrote:
> Ahoy
>
> I have this working for load, cpu and these sorts of things already
> since quite a few years, but can't quite find the incantation for curl.
>
> I'm trying to trigger a threshold & subsequent notification on result
> from a curl plugin response code - basically < 300 is ok, 300+ is fail.
> I have a large number of these curl results from a bunch of APIs.
>
> I don't understand what values Type & DataSource should take, and how
> they related to e.g. Plugin, Page, & response_time/response_code or
> other matched values from collectd's read plugins in general. Any tips?
>
> This is the value I get from the curl plugin (via csv/log output)
>
> PUTVAL continuity.skunkwerks.at/curl-frontend/response_code
> interval=1.000 1484777513.551:200.000000
>
> here's my collectd.conf snippet:
>
> ##############################################################################
> # Threshold configuration
> <Plugin "curl">
> <Page "frontend">
> URL "https://wintermute.skunkwerks.at/"
> Timeout 2000
> MeasureResponseTime false
> MeasureResponseCode true
> </Page>
> </Plugin>
>
> <Plugin "threshold">
> <Plugin "curl">
> <Type "curl-frontend">
> DataSource "response_code"
> WarningMax 299
> Persist true
> PersistOK true
> Interesting true
> </Type>
> </Type>
> </Plugin>
>
> collectd 5.6.0 FreeBSD amd64 11.0Rp7 with a few extra plugins enabled
>
> A+
> Dave
>
> _______________________________________________
> collectd mailing list
> collectd at verplant.org
> https://mailman.verplant.org/listinfo/collectd
--
—
Dave Cottlehuber
+43 67 67 22 44 78
Managing Director
Skunkwerks, GmbH
http://skunkwerks.at/
ATU70126204
Firmenbuch 410811i
More information about the collectd
mailing list