[collectd] Weird value mangling

Quentin Hartman qhartman at direwolfdigital.com
Fri Aug 8 17:22:28 CEST 2014


I'm using the curl_json plugin to get data from MongooseIM and write it out
to Graphite using the write_graphite plugin. Collectd is version 5.4.1,
built from source. I have everything talking, but all the numbers getting
sent to graphite are getting a decimal incorrectly inserted. For example
when I curl the endpoint providing the data I see "{"metric":1637}". That
ends up getting sent to graphite as 163.7xxxxx where "xxxxx" is 5
apparently random digits.

Any idea why this is happening? I've dug through the docs and I can't come
up with an explanation. I can compensate in graphite by applying a scaling
factor, but I'd rather just have good data getting in there. A config
snippet is below.

QH

collectd.conf

<Plugin syslog>
        LogLevel notice
        NotifyLevel OKAY
</Plugin>
LoadPlugin curl_json
LoadPlugin write_graphite
<Plugin write_graphite>
    <Node "graphite">
        Host "localhost"
        Port "2003"
        Protocol "tcp"
        LogSendErrors true
        Prefix "collectd."
        StoreRates true
        AlwaysAppendDS false
        EscapeCharacter "_"
    </Node>
</Plugin>
<Plugin curl_json>
    <URL "http://mongoose.local:5280/metrics/host/testing.local">
        Instance "mongooseim"
        <Key "metrics/sessionCount">
            Type "absolute"
        </Key>
    </URL>
</Plugin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20140808/b8c8b45d/attachment-0001.html>


More information about the collectd mailing list