Collected的curl_json插件未将数据发送到石墨 [英] Collectd's curl_json plugin not sending data to graphite

查看:153
本文介绍了Collected的curl_json插件未将数据发送到石墨的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经实现了curl_jason插件来识别LoadBalancer指标并将其发送到我的RabbitMQ,以便在Graphite中进行绘制.事实是,它不发送任何数据,但可以与其他插件(如内存,cpu,df根目录,网络等)一起正常工作(很好).我尝试按照以下建议进行故障排除:

I've implemented curl_jason plugin to recolect and send LoadBalancer metrics to my RabbitMQ to be graphed in Graphite. Thing is, it's not sending any data, while it is working just fine (and great) with other plugins like memory, cpu, df root, network, etc. I've tried to troubleshoot following this suggestion: https://serverfault.com/questions/499378/collectd-stores-nan-instead-of-correct-value-in-ubuntu-12-04, but there're no issues coming out.

这是我的collectd.conf: https://gist.github.com/Mariano-gon /8732467

Here's my collectd.conf: https://gist.github.com/Mariano-gon/8732467

这是我启动collectd.log的最后几行: https://gist.github.com/Mariano-gon/8732488

Here're the last lines of collectd.log when I start it: https://gist.github.com/Mariano-gon/8732488

该请求是针对我的LoadBalancer所在的Rackspace API发出的,如果手动运行,curl将使我得到一个完全正常的json响应.

The request is made against Rackspace API where my LoadBalancer is located, and if run manually, the curl gets me a json response perfectly normal.

下面是它的摘录: https://gist.github.com/Mariano-gon /8732518

我尝试在collectd.conf中添加新的标头:标头"Accept:/",但是没有用.

I've tried to add a new header in collectd.conf: Header "Accept: /", but didn't work.

最后,在启动时,collected除了网络,df,内存,cpu等(所有可正常工作并发送数据的插件)外,不会创建任何新文件夹.

Finally, collectd does not create any new folders besides network, df, memory, cpu, etc (all plugins that are correctly working and sending data) when started.

希望此信息对您有所帮助,我们将不胜感激任何评论.谢谢!

Hope this info helps and any comment will be really appreciated. Thanks!

推荐答案

我遇到了同样的问题,但是设法解决了.决定添加我的解决方案,以节省知识.

I had same issue, but managed to solve it. Decided to add my solution, to save knowledge.

我正在带有网络插件的Debian Jessie上运行collectd(数据发送到一个主服务器).如果您还有其他操作系统,请相应地更新命令和路径.

I'm running collectd on Debian Jessie with network plugin(data sent to one master server). If you have another OS update commands and paths accordingly.

我个人没有什么问题.在curl_json插件配置中,我使用单引号而不是双引号.我已经用

Personally I had few issues. In curl_json plugin configuration I used single quotes instead of double quotes. I've found this with

journalctl -u collectd.service

下一个问题与插件文档有关.我读得不够仔细.您必须将您在插件配置中使用的所有类型"字段添加到types.db中,以使用该插件中数据的所有服务器上:

Next issue was related to plugin documentation. Which I read not carefully enough. You MUST add all "type" fields you used in plugin configuration to types.db to ALL servers where data from this plugin will be used:

TypesDB "/usr/share/collectd/types.db"
TypesDB "/etc/collectd/my_types.db"

就我而言,我必须将custom types.db添加到收集数据的原始服务器和将数据发送到其中的主服务器中以进行存储. 请记住,您不能在collectd.conf中仅提及自定义types.db.两者都需要.

In my case, I had to add custom types.db to original server where data is collectd and master server to which data is sent for storage. Keep in mind that you cannot mention in collectd.conf only custom types.db. You'll need both.

这篇关于Collected的curl_json插件未将数据发送到石墨的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆