简体   繁体   English

Twitter处理程序(sensu和ruby)疑难解答

[英]Twitter handler (sensu and ruby) troubleshooting

I'm trying to get Sensu twitter-handler working on my environment. 我正在尝试让Sensu Twitter处理程序在我的环境中工作。 The issue is that I'm not getting any errors on screen or logs when I cat a .json event into the twitter-handler and, the tweets are not being shown on the linked account. 问题是,当我将一个.json事件添加到twitter-handler中时,在屏幕或日志上都没有出现任何错误,并且这些tweet没有显示在链接的帐户上。

Here're are my config files: 这是我的配置文件:

https://gist.github.com/Mariano-gon/8648427 https://gist.github.com/Mariano-gon/8648427

https://gist.github.com/Mariano-gon/8648455 https://gist.github.com/Mariano-gon/8648455

https://gist.github.com/Mariano-gon/8648489 https://gist.github.com/Mariano-gon/8648489

This is the output I get: 这是我得到的输出:

https://gist.github.com/Mariano-gon/8648480 https://gist.github.com/Mariano-gon/8648480

One important note is that in sensu-api.log the request are being recieved: 一个重要的注意事项是在sensu-api.log中正在接收该请求:

https://gist.github.com/Mariano-gon/8673758 https://gist.github.com/Mariano-gon/8673758

So, my question is: is there a way to troubleshoot this issue? 所以,我的问题是:有没有办法解决此问题? Any way to debug the handler.rb? 有什么方法可以调试handler.rb吗? Thanks! 谢谢!

Finally got it working! 终于成功了! Thing was the new 'twitter' gem (in my case v5.6) won't work with the code as it was written. 问题是新的“ twitter” gem(在我的案例中是v5.6)在编写时无法使用该代码。 I needed to follow this great answer and this thread too. 我需要遵循这个很好的答案和这个线程 Was just a matter of sintaxis (as usual). 只是一个刻板的问题(和往常一样)。 Thanks! 谢谢!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM