Ratchet.io服务器端代理
ratchet-agent的Python项目详细描述
监视日志文件并将消息推送到Ratchet.io的守护进程。
安装
使用pip安装:
pip install ratchet-agent
这将在virtualenv的根目录中安装棘轮代理文件。或者,如果您愿意,请克隆此git repo:
git clone https://github.com/ratchetio/ratchet-agent.git
有关配置选项和设置,请参阅配置。
Ratchet代理附带了一个示例init.d脚本,chkconfig兼容,并在FedoraLinux上进行了测试。要安装它,符号链接ratchet-agent-init.sh到/etc/init.d/ratchet-agent,并添加到chkconfig:
ln -s /path/to/ratchet-agent/ratchet-agent-init.sh /etc/init.d/ratchet-agent chkconfig --add ratchet-agent chkconfig on ratchet-agent service ratchet-agent start
配置
棘轮代理本身的配置选项位于rachet agent.conf中。如果您使用的是init脚本,它有一些自己的配置变量,可以在其中控制它的运行方式。
ratchet agent.conf 您至少需要更改以下变量:
- params.access_token–您的Ratchet.io访问令牌
- targets–要处理的文件或目录(非递归)的空白分隔列表。
设置以下变量将改善github集成:
- params.root–代码根路径
- params.branch–当前分支
其他选项记录在示例配置文件中。
棘轮代理init.sh 配置变量应该是自解释的。如果不使用virtualenv,请设置VIRTUALENV=""。
贡献
欢迎捐款。该项目位于github上的http://github.com/ratchetio/ratchet-agent
附加帮助
如果您有任何问题、反馈等,请在brian@ratchet.io