alignak-web服务的接收器模块
alignak_module_ws的Python项目详细描述
alignak网络服务模块
重要信息
此模块将一些web服务公开为alignak监视框架的rest api。事实上,它扩展了现有的API API与一些外部新服务,如:报告主机/服务检查结果,发送命令对齐,从Orack获得信息,……/P>
重要的是要考虑到此模块公开的服务目前实现了作为概念证明而开发的第一个版本,并且它们可能在没有任何升序兼容性的情况下被重构。
如果您想使用当前界面,请随时与我们联系,我们将随时向您通报当前的操作和决定;)
安装
此模块的安装将复制alignak默认配置目录中的一些配置文件(例如/usr/local/etc/alignak)。复制的文件位于用于模块的默认子目录中(例如arbiter/modules)。
来自Pypi
从pypi安装模块:
sudo pip install alignak-module-ws
从源文件
从源文件安装模块(用于开发):
git clone https://github.com/Alignak-monitoring-contrib/alignak-module-ws cd alignak-module-ws sudo pip install . -e
注意:使用“sudo python setup.py install”将无法正确管理包配置文件!推荐的方法是使用'pip';)
简短说明
alignak的这个模块公开了一些alignak web服务:
- GET / will return the list of the available endpoints
- GET /alignak_map that will return the map and status of all the Alignak running daemons
- GET /host to get an host information
- GET /hostgroup to get an hostgroup information
- GET /alignak_logs to view the Alignak events history from an Alignak backend
- POST /alignak_command that will notify an external command to the Alignak framework
- PATCH /host/<host_name> that allows to send live state for an host and its services, update host custom variables, enable/disable host checks
配置
安装后,此模块在/usr/local/etc/alignak/arbiter/modules目录中有自己的配置文件。 默认配置文件是mod-ws.cfg。对该文件进行了注释,以帮助配置所有参数。
要配置alignak守护进程(receiver是推荐的守护进程),请使用此模块:
- edit your daemon configuration file (eg. receiver-master.cfg)
- add your module alias value (web-services) to the modules parameter of the daemon
注意当前此模块的ssl部分尚未测试!
错误、问题和贡献
欢迎并鼓励对本项目的贡献…issues in the project repository是提出信息的常见方式。