node_exporter和cAdvisor部署

前端侠
• 阅读 551

node_exporter install

wget https://github.com/prometheus/node_exporter/releases/download/v1.6.0/node_exporter-1.6.0.linux-amd64.tar.gz

cat /usr/lib/systemd/system/node_export.service
[Unit]
Description=node_exporter
Documentation=https://prometheus.io/
After=network.target
 
[Service]
Type=simple
User=root
ExecStart=/usr/local/bin/node_exporter --web.listen-address=0.0.0.0:39100 --collector.systemd --collector.systemd.unit-whitelist=(docker|sshd).service --collector.textfile.directory /var/lib/node_exporter/textfile_collector/
Restart=on-failure
 
[Install]
WantedBy=multi-user.target
mv /usr/lib/systemd/system/node_export.service /usr/lib/systemd/system/node_exporter.service
systemctl daemon-reload
systemctl enable node_exporter
Created symlink from /etc/systemd/system/multi-user.target.wants/node_exporter.service to /usr/lib/systemd/system/node_exporter.service.

systemctl start node_exporter
netstat -tnpl
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1079/sshd           
tcp6       0      0 :::22                   :::*                    LISTEN      1079/sshd           
tcp6       0      0 ::1:25                  :::*                    LISTEN      1399/master         
tcp6       0      0 :::39100                :::*                    LISTEN      6735/node_exporter  
tcp6       0      0 :::39104                :::*                    LISTEN      4456/mysqld_exporte 

node_exporter和cAdvisor部署

cadvisor


[root@vm5 ~]# docker run --publish=38081:8080 --detach=true --name=cadvisor google/cadvisor
Unable to find image 'google/cadvisor:latest' locally
latest: Pulling from google/cadvisor
ff3a5c916c92: Pull complete 
44a45bb65cdf: Pull complete 
0bbe1a2fe2a6: Pull complete 
Digest: sha256:815386ebbe9a3490f38785ab11bda34ec8dacf4634af77b8912832d4f85dca04
Status: Downloaded newer image for google/cadvisor:latest
6765d0b66bab4fceb43c8b9ca4f4ab4a681981cee56534692c616e8ce24ee51b
[root@vm5 ~]# netstat -tnlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      957/sshd            
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1469/master                
tcp6       0      0 :::38080                :::*                    LISTEN      30961/docker-proxy  
tcp6       0      0 :::38081                :::*                    LISTEN      3147/docker-proxy 
[root@server01 ~]# vi /opt/prometheus/prometheus.yml 
 
  - job_name: 'docker'
    static_configs:
    - targets: ['10.xx.x.1:38081']

node_exporter和cAdvisor部署

点赞
收藏
评论区
推荐文章
blmius blmius
4年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
美凌格栋栋酱 美凌格栋栋酱
7个月前
Oracle 分组与拼接字符串同时使用
SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(
GoCoding GoCoding
4年前
Prometheus + Grafana 快速上手
快速上手,监控主机的CPU,GPU,MEM,IO等状态。前提客户端NodeExporter用于采集UNIX内核主机的数据,并解压:bashwgethttps://github.com/prometheus/nodeexporter/releases/download/v1.1.2/nodeexporter1.1.2.linux
Johnny21 Johnny21
4年前
Prometheus学习系列(四)之FAQ
一、一般问题1\.Prometheus是什么?Prometheus是一款高活跃生态系统的开源系统监控和警告工具包。详见2\.Prometheus与其他的监控系统比较详见3\.Prometheus有什么依赖?Prometheus服务独立运行,没有其他依赖4\.Prometheus有高可用的保证吗?
Stella981 Stella981
3年前
Prometheus部署+邮箱告警+企业微信告警+钉钉告警
Prometheus部署邮箱报警企业微信报警钉钉报警1部署Prometheusserver1.1下载二进制包$wgethttps://github.com/prometheus/prometheus/releases/download/v2
Stella981 Stella981
3年前
Prometheus Node_exporter
NodeExporternode\_exporter(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fgithub.com%2Fprometheus%2Fnode_exporter)主要用于\NIX系统监控,用Golang编写。功能对照表
Stella981 Stella981
3年前
CentOS 6部署监控神器普罗米修斯(详细部署说明)
部署说明:环境说明:组件版本下载地址Prometheus2.6.1https://prometheus.io/download/prometheus(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fprometheus.io%2Fdo
Stella981 Stella981
3年前
Prometheus Node_exporter 详解
BasicCPU/Mem/DiskInfo    https://www.cnblogs.com/qianyuliang/p/10479515.html(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fwww.cnblogs.com%2Fqianyuliang%2Fp%2F
Stella981 Stella981
3年前
SpringBoot整合Redis乱码原因及解决方案
问题描述:springboot使用springdataredis存储数据时乱码rediskey/value出现\\xAC\\xED\\x00\\x05t\\x00\\x05问题分析:查看RedisTemplate类!(https://oscimg.oschina.net/oscnet/0a85565fa
Easter79 Easter79
3年前
SpringBoot整合Redis乱码原因及解决方案
问题描述:springboot使用springdataredis存储数据时乱码rediskey/value出现\\xAC\\xED\\x00\\x05t\\x00\\x05问题分析:查看RedisTemplate类!(https://oscimg.oschina.net/oscnet/0a85565fa
Ansible部署Node_exporter
Ansible是基于Python开发的自动化运维工具,集合了众多运维工具(puppet、cfengine、chef、func、fabric)的优点,实现了批量系统配置、批量程序部署、批量运行命令等功能。