satori icon indicating copy to clipboard operation
satori copied to clipboard

移植 swcollector

Open songjave opened this issue 7 years ago • 2 comments

open-falcon是使用 swcollector 来实现交换机监控的 ,不知道这个是否也可以使用 swcollector 来做交换机监控

songjave avatar Jul 06 '18 05:07 songjave

抱歉…… 这边没用到过交换机,就没有集成这个。

因为 tag 的格式已经变化了,所以暂时没法用……

feisuzhu avatar Jul 12 '18 06:07 feisuzhu

@songjave 麻烦看看 swcollector 分支,做过移植了,但是我没有交换机,没法测试,如果能帮忙测试下那真是很感谢~

正常的 build 过程会生成 /tmp/go-github/swcollector 文件,然后将下面的 json 自己做修改,保存成 cfg.json

[
  {
    "interval": 30,
    "snmpCommunity": "public",
    "logFile": "/dev/stderr",
    "ignore": [
      "unknownprotos"
    ],
    "ipRange": [
      "127.0.0.1"
    ]
  }
]

然后执行

# ./swcollector < cfg.json

看一下输出是否正常,能不能取得相应的监控项,以及会不会崩溃。

可以的话请反馈一下结果。

json 的文档在这里,跟之前的 swcollector 配置有些出入。

https://github.com/leancloud/satori/blob/swcollector/doc/shipped-plugins/swcollector.rst

feisuzhu avatar Aug 27 '18 08:08 feisuzhu