srvstatus:SystemD服务状态

时间:2021-05-04 15:03:02
【文件属性】:
文件名称:srvstatus:SystemD服务状态
文件大小:68KB
文件格式:ZIP
更新时间:2021-05-04 15:03:02
services influxdb systemd grafana telegraf 状态 版本1.0 使用带有InfluxDB和Grafana的Telegraf获取SystemD服务的状态 1.0版中的新功能 添加了更多状态 修复了找不到systemd服务时输出为空的错误 测试并移至Python3 该python3脚本的主要目标是检查给定SystemD服务的列表并将其状态发送到InfluxDB数据库,以便可以将它们用于Grafana仪表板。 该脚本是用python编写的,我试图尽可能多地使用标准库,但是您仍然需要运行pip install。 该脚本发送JSON格式的服务状态,该服务状态由数字编码: active (running) = 1 active (exited) = 2 inactive (dead) = 3 failed = 4 no match = 0 因此您需要在Grafana中将其转换回字符串。 您可以在我的测试Grafana仪
【文件预览】:
srvstatus-master
----.gitignore(25B)
----README.md(3KB)
----service_status.json(35KB)
----services_grafana1.png(33KB)
----settings.ini.back(52B)
----service.py(4KB)
----LICENSE(1KB)
----services_grafana.png(34KB)
----requirements.txt(39B)

网友评论