首页 > 其他分享 >@prometheus的使用

@prometheus的使用

时间:2022-10-09 21:09:49浏览次数:57  
标签:node exporter prometheus web02 监控 使用 root


文章目录

prometheus

一、prometheus基础使用

1、测试访问

http://192.168.15.120:9090

@prometheus的使用_prometheus

2、查看监控主机

默认只监控一台,点击status-----> targets------->可以看到只监控了本机

@prometheus的使用_prometheus_02

3、查看监控数据

通过http://服务器ip:9090/metrics

可以查看到监控的数据,在web页面可以通过关键字查看到监控项目

@prometheus的使用_linux_03

查看数据

@prometheus的使用_开机自启_04

查看图形

@prometheus的使用_开机自启_05

监控远程linux主机

一、被监控点部署node_exporter

1、下载

[root@web02 /opt]# wget https://github.com/prometheus/node_exporter/releases/download/v1.1.1/node_exporter-1.1.1.linux-amd64.tar.gz

2、解压

[root@web02 /opt]# mkdir /prometheus_node/
[root@web02 /opt]# tar xf node_exporter-1.1.1.linux-amd64.tar.gz -C /prometheus_node/
[root@web02 /prometheus_node]# mv node_exporter-1.1.1.linux-amd64/* ./

3、加入systemd

[root@web02 /prometheus_node]# vim /usr/lib/systemd/system/node_exporter.service

[Unit]
Description=prometheus server daemon

[Service]
ExecStart=/prometheus_node/node_exporter
Restart=on-failure

[Install]
WantedBy=multi-user.target

# 重载

4、启动并加入开机自启

[root@web02 ~]# systemctl enable node_exporter.service --now

5、检查

[root@web02 ~]# netstat -lntup|grep 9100
tcp6 0 0 :::9100 :::* LISTEN 3224/node_exporter
[root@web02 ~]# curl 127.0.0.1:9100/metrics
...
好多监控数据啊
...

二、配置prometheus连接node

1、修改配置文件

[root@promethus /prometheus]# vim prometheus.yml 
...
- job_name: 'node-web'
static_configs:
- targets: ['192.168.15.8:9100']

2、重启服务

[root@promethus /prometheus]# systemctl restart prometheus.service

3、检查

@prometheus的使用_开机自启_06

三、获取远程linux监控指标

http://192.168.15.8:9100/metrics


标签:node,exporter,prometheus,web02,监控,使用,root
From: https://blog.51cto.com/u_15166421/5741538

相关文章

  • @prometheus监控远程mysql服务
    文章目录​​监控远程mysql服务​​​​一、被监控点部署mysql_exporter​​​​1、下载​​​​2、解压​​​​3、创建监控用户并授权​​​​4、创建客户端配置文件​​......
  • @prometheus集成grafana
    文章目录​​prometheus集成grafana​​​​一、什么是grafana​​​​二、特点​​​​1、可视化​​​​2、报警​​​​3、通知​​​​4、动态仪表盘​​​​5、混合数......
  • @prometheus容器化使用
    文章目录​​prometheus容器化​​​​一、下载prometheus配置清单​​​​1、查看集群状态​​​​2、代码下载​​​​3、解压使用​​​​4、部署prometheus​​​​5、......
  • @Splunk部署及数据监视使用|数据可视化展示
    文章目录​​1.splunk概述​​​​2.splunk的特点​​​​3.splunk安装​​​​4.Web使用splunk​​​​5.Splunk数据文件监控​​​​6.Splunk的服务器节点监视​​​​7.S......
  • DAP-LINK使用OpenOCD解锁STM32
    使用脚本:#!/usr/bin/envbashSOURCE=/usr/share/openocd/INTERFACE_CFG=${SOURCE}scripts/interface/cmsis-dap.cfgTARGET_CFG=${SOURCE}scripts/target/stm32f1x.cfg......
  • Oracle转Poatgresql,ora2pg工具安装使用
    一、ora2pg:ora2pg工具可以将oracle的结构转为postgresql格式,可以配置Oracle的模式导出、客户端编码、导出类型、ora2pg中使用的数据类型转换等,最终输出为sql文件,在postgre......
  • Springboot异常处理和自定义错误页面及@ControllerAdvice 注解的三种使用场景!五、@Con
    一、前言springboot默认发生4xx错误时候,pc端响应的页面如下如果是移动端(手机端)将会响应json格式的数据,如下二、Springboot异常处理为什么我们请求错误的路径,boot会给我们返......
  • Android——application全局类的使用
    目录 ​​1.概述​​​​2.Application基类​​​​3.自定义Application类​​​​4.Application的生命周期​​​​5.Application对象的回调函数​​​​6.Application对......
  • @使用VMware安装Ubuntu系统
    文章目录​​一、VMware虚拟机的下载​​​​二、VMware虚拟机的安装​​​​三、Ubuntu下载​​​​四、Ubuntu的安装​​一、VMware虚拟机的下载​​【VM官网】​​产品下......
  • 如何使用KrpanoToolJS在浏览器切图
    如何使用KrpanoToolJS在浏览器切图框架DEMO框架源码地址【独辟蹊径】逆推Krpano切图算法,实现在浏览器切多层级瓦片图一、功能介绍在浏览器中将全景图转为立方体图、......