[collectd] curl-plugin: returning a default value if regex doesn't match

André Luiz da Silva andresilvaluiz1 at gmail.com
Wed Sep 2 20:10:44 CEST 2015


I've been trying curl-plugin to collectd a few metrics from a webservice.
When there is no activity the webservice just return a 'nil' value and the
regex doest't match. Is there any option to curl-plugin to return a default
value if the regex doestn't match?

My config:

 <Page "worker">
    URL "http://localhost:85/metric/provisiona_fail/?flush=yes"
      Regex "^([0-9]+)$"
      DSType "GaugeLast"
      Type "gauge"
       Instance "spawned_fail"

This is what it returns when there is no activity:

curl http://localhost:85/metric/spawned_fail/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20150902/89befdfd/attachment.html>

More information about the collectd mailing list