首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Node_exporter -收集器.systemd.unit-包括regex故障

Node_exporter -收集器.systemd.unit-包括regex故障
EN

Stack Overflow用户
提问于 2022-03-16 10:05:21
回答 1查看 879关注 0票数 1

我试图限制node_exporter收集度量标准的系统单元,我在正则表达式上遇到了麻烦。我使用grafana-server.service作为主机上的测试,但导出程序在介绍regex时没有报告任何指标。我尝试过多种格式,但无法理解,这是我目前正在尝试的ATM机:

ExecStart=/opt/node_exporter/node_exporter --collector.systemd.unit-include "(grafana|ssh)\.service" --collector.filesystem.ignored-mount-points "^/(sys|proc|dev|run|boot|host|etc)($|/)" $ARGS

文件系统收集器regex正在工作,顺便说一下。我搞砸了有什么线索吗?

我的感谢

EN

回答 1

Stack Overflow用户

发布于 2022-03-30 06:47:48

我也有过同样的问题。我通过像这样配置服务(与您的情况相适应的名称)来实现它:

代码语言:javascript
复制
ExecStart=/opt/node_exporter/node_exporter --collector.systemd --collector.systemd.unit-include=(grafana|ssh).service

完成此操作后,请记住通过systemctl守护进程重新加载配置--重新加载并重新启动节点导出程序。在我的配置完成这些步骤之后,当我检查指标时,我只得到我想要的进程。希望它能帮上忙

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71495086

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档