当前位置: 首页 > 工具软件 > Shinken > 使用案例 >

shinken监控mongodb

堵鸿光
2023-12-01

1.su - shinken


2.shinken install mongodb


3.新建host或者在已有的host.cfg中use中添加mongodb


4.systemctl restart shinken 重启


5.报错,mongodb的serviece报错connection refused


6./etc/shinken/packs/mongodb中的commands.cfg

其中command_line 为$PLUGINSDIR$check_mongodb.py

其中$PLUGINSDIR$是/var/lib/shinken/libexec,其中有check_mongodb.py

可以在其目录下测试./check_mongodb.py -D -H 192.168.67.130 -P 27017 -A connections -W 70 -C 80

connection refused

原因是mongodb的ip配置问题:

在/etc/mongodb.cfg中注释掉

bind_ip = 127.0.0.1



 类似资料: