Comments (9)
Thanks. I will take a look.
from collectd-elasticsearch.
❤️ thanks!
from collectd-elasticsearch.
@mheffner could this be related to the other issue we saw with custom plugins?
from collectd-elasticsearch.
We noticed that with Python input plugins the write_http output will choke if the meta
field is not set correctly. A ticket was filed by @joncotton for this issue: collectd/collectd#716.
As an example, we had to set the meta field as follows. I'm still unsure what form the meta
parameter requires:
def reader(input_data=None):
metric = collectd.Values();
metric.plugin = 'customgauge'
metric.type = 'gauge'
metric.plugin_instance = "test_librato_metric"
metric.values = [0.88]
metric.meta = {'0':True}
metric.dispatch()
from collectd-elasticsearch.
/cc @obfuscurity
from collectd-elasticsearch.
Yup, it looks the same as my problem in Collectd with the write_http
plugin. Specifically when using JSON, it trips over the meta attribute that the Python system is setting by default. (NULL would work, a non-empty dict would work, but an empty dict breaks the JSON parser.)
To narrow down: try this and look for errors. I bet it'll work.
<Plugin "write_http">
<URL "http://example.com">
Format "Command" # not JSON
</URL>
</Plugin>
The Librato API expects JSON so that's not a solution. As far as workarounds, you can assign that dummy dict to meta as @mheffner showed (implications? probably nothing if your data is delivering to Librato) or use the now-deprecated Librato writer plugin at https://github.com/librato/collectd-librato instead of write_http.
from collectd-elasticsearch.
Yup - that was it. I added var.meta = {'0':True}
to approx here: https://github.com/phobos182/collectd-elasticsearch/blob/master/elasticsearch.py#L222
And now the metrics are getting sent up. Thanks all. I'm not going to submit a PR cause i'm not sure if that will cause issues with non-librato usage of write_http.
from collectd-elasticsearch.
@petecheslock AFAIK this isn't strictly limited to Librato. We just parse the JSON produced by write_http like any other target would. So this affects at least anyone using write_http to push JSON?
from collectd-elasticsearch.
I've had the same issue trying to use the write_http plugin. I created a pull request at #19 Would be great to get it fixed here as well, but since it's somewhat rare I also understand if rejected.
from collectd-elasticsearch.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from collectd-elasticsearch.