花了两天部署了一套监控服务 prometheus+node-exporter+grafana,公司的gitlab服务器准备部署node-exporter的时候突然发现gitlab已经有了这些服务,

也懒得去研究gitlab为啥要这些服务,既然gitlab服务器已经包含了node-exporter服务,我直接使用不就得了。

1.首先浏览器测试下接口并不能使用:http://ip:9100/metrics;

2.既然浏览器不能使用,那去gitlab服务器测试下:curl 127.0.0.1:9100/metrics  -s | head

  

  发现 node-exporter 服务正常

3.node-exporter服务正常,那基本是网络问题了,继续排除下:

  netstat -anp | grep node

  ps -ef | grep node

  

  发现 node-exporter 监听的是 localhost:9100 导致只能本地访问(红框是我改后的),那就修改监听地址吧

4.查看下监听地址是在哪里修改的,在gitlab目录下 :grep :9100 * -r

  

  发现好多地方有这个值(0.0.0.0:9100这个是已经修改后的,修改前看到的是localhost:9100),经过简单的排除再尝试,确认可以直接在缺省配置文件里面配置 :embedded/cookbooks/monitoring/attributes/default.rb

  

  把 localhost:9100 改成 0.0.0.0:9100 ,然后重新初始化配置 :gitlab-ctl reconfigure

  这样需要用到这个配置的地方都会从这里取值,由于很多地方用到这个值如果只单独去修改某个地方的值会导致其他地方的值不匹配,再查找下  grep :9100 * -r  ,发现所有的 localhost:9100 都会变成 0.0.0.0:9100

  再浏览器测试下发现已经正常:http://ip:9100/metrics

  

让gitlab暴露node-exporter供外部prometheus使用的更多相关文章

  1. 将gitlab内置node_exporter提供外部prometheus使用

    目录 修改gitlab的配置 重新初始化配置 gitlab服务已经包含了node_exporter服务,但是配置文件限制了9100端口的访问,所以主机信息不能直接被外部的prometheus收集 修改 ...

  2. Prometheus exporter的Node exporter是可以独立安装,用来测试的

    现在慢慢在把prometheus operator的一些概念组织完整. https://github.com/coreos/prometheus-operator/tree/master/contri ...

  3. Prometheus 集成 Node Exporter

    文章首发于公众号<程序员果果> 地址:https://mp.weixin.qq.com/s/40ULB9UWbXVA21MxqnjBxw 简介 Prometheus 官方和一些第三方,已经 ...

  4. 【开源监控】Prometheus+Node Exporter+Grafana监控linux服务器

    Prometheus Prometheus介绍 Prometheus新一代开源监控解决方案.github地址 Prometheus主要功能 多维 数据模型(时序由 metric 名字和 k/v 的 l ...

  5. Prometheus + Node Exporter + Grafana 监控主机运行信息

      上一篇文章中讲了如何利用Prometheus和Grafana监控SpringBoot应用的JVM信息,这次就来看看如何监控 服务器运行状态,先列出用到的工具: Prometheus node_ex ...

  6. Prometheus 使用之 node exporter

    本文使用的 Prometheus 版本为 2.22.0,node exporter 版本为 1.0.1:部署在 Linux 服务器Prometheus 是开源的监控报警系统和时序列数据库 (TSDB) ...

  7. Prometheus Node_exporter 之 Node Exporter

    Node Exporter 1. Node Exporter Scrape Time type: GraphUnit: secondsLabel: Seconds{{collector}} - 各个收 ...

  8. 在Salesforce中创建Web Service供外部系统调用

    在Salesforce中可以创建Web Service供外部系统调用,并且可以以SOAP或者REST方式向外提供调用接口,接下来的内容将详细讲述一下用SOAP的方式创建Web Service并且用As ...

  9. linux暴露端口可以被外部访问

    linux暴露端口可以被外部访问,把端口号换成要暴露的端口:/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT Centos 7 开启端口Cen ...

随机推荐

  1. k3 cloud列表中出现很多空白

    解决办法:找到单据体:过滤面板默认隐藏打勾

  2. 在eclipse里搜索maven项目需要的dependency

    eclipse直接就可以通过下载同步仓库索引,直接关键字查询需要的dependency. 前提是你已经在你的eclipse上配好了maven正确的环境. 1. 设置在开启eclipse时下载同步仓库索 ...

  3. php import require include use vendor

    一.use  调用命名空间 用法. use app\common\controller\Index as commonIndex 或  use app\common\controller\Index ...

  4. Mybatis(三)MyBatis 注解方式的基本 用法

    在 MyBatis注解 SQL 中,最基本的就是@Select.@Insert.@Update 和@Delete 四种.

  5. 5.Docker存储卷

    一.概述 1.Docker底层存储机制 Docker镜像由多个只读层叠加而成,启动容器时,Docker会加载只读镜像层并在镜像栈顶部添加一个读写层. 如果运行中的容器修改了现有的一个已经存在的文件,那 ...

  6. java int整数相乘溢出

    int整数相乘溢出 我们计算一天中的微秒数: * * * * ;// 正确结果应为:86400000000 System.out.println(microsPerDay);// 实际上为:50065 ...

  7. Linux find过滤掉没有查看权限的文件

    参考:https://blog.csdn.net/sinat_39416814/article/details/84993424 https://www.jianshu.com/p/2b056e1c0 ...

  8. unique && stl的全排列

    stl的全排列: 看代码. #include<iostream> #include<cstdio> #include<algorithm> #include< ...

  9. [USACO16JAN]愤怒的奶牛Angry Cows (单调队列优化dp)

    题目链接 Solution 应该可以用二分拿部分分,时间 \(O(n^2logn)\) . 然后可以考虑 \(n^2\) \(dp\) ,令 \(f_i\) 代表 \(i\) 点被激活,然后激活 \( ...

  10. C# WinForm 中Label自动换行 解决方法

    在TableLayoutPannel中放着一些Label如果把Label的AutoSize属性设成True的话,文字超过label长度时就会自动增加,直到后面的字出窗体以外设置成False时,一旦到达 ...