首页 > 其他分享 >Prometheus实践

Prometheus实践

时间:2022-11-13 20:02:36浏览次数:65  
标签:rules interval prometheus scrape 实践 Prometheus every targets

一、下载安装Prometheus

1.​下载地址:​​https://prometheus.io/download/​

2.解压缩后

Prometheus实践_解压缩

3.修改配置文件prometheus.yml 如下

global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).

# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093

# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
# - "first_rules.yml"
# - "second_rules.yml"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: "prometheus"

# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.

static_configs:
- targets: ["localhost:9090"]

- job_name: 'node'
scrape_interval: 5s
metrics_path: '/actuator/prometheus'
static_configs:
- targets: ['localhost:8080']
labels:
group: 'production'

4.进入bin目录,启动prometheus.exe

Prometheus实践_下载地址_02

5.查看启动成功后的页面 ​​http://localhost:9090/targets?search=​


标签:rules,interval,prometheus,scrape,实践,Prometheus,every,targets
From: https://blog.51cto.com/u_6478076/5847933

相关文章

  • 实验7:基于REST API的SDN北向应用实践
    一、实验目的能够编写程序调用OpenDaylightRESTAPI实现特定网络功能;能够编写程序调用RyuRESTAPI实现特定网络功能。三、实验要求(一)基本要求编写Python程序,调用Ope......
  • 实验7:基于REST API的SDN北向应用实践
    一、实验目的能够编写程序调用OpenDaylightRESTAPI实现特定网络功能;能够编写程序调用RyuRESTAPI实现特定网络功能。三、实验要求(一)基本要求编写Python程序,调用Ope......
  • 实验7:基于REST API的SDN北向应用实践
    实验7:基于RESTAPI的SDN北向应用实践一、实验目的1.能够编写程序调用OpenDaylightRESTAPI实现特定网络功能;2.能够编写程序调用RyuRESTAPI实现特定网络功能。二、实......
  • 实验1:SDN拓扑实践
    (一)基本要求使用Mininet可视化工具,生成下图所示的拓扑,并保存拓扑文件名为学号.py。使用Mininet的命令行生成如下拓扑:a)3台交换机,每个交换机连接1台主机,3台交换机连接成......
  • 实验2:Open vSwitch虚拟交换机实践
    一、实验目的能够对OpenvSwitch进行基本操作;能够通过命令行终端使用OVS命令操作OpenvSwitch交换机,管理流表;能够通过Mininet的Python代码运行OVS命令,控制网络拓扑中的O......
  • 实验7:基于REST API的SDN北向应用实践
    实验7:基于RESTAPI的SDN北向应用实践一、实验目的能够编写程序调用OpenDaylightRESTAPI实现特定网络功能;能够编写程序调用RyuRESTAPI实现特定网络功能。二、实验环......
  • 深入浅出学习透析Nginx服务器的基本原理和配置指南「进阶实践篇」
    proxy_pass的疑问?很多小伙伴们跟我沟通说之前章节的介绍的proxy_pass介绍的并不是很详细和清晰,那么我们就针对于Nginxproxy_pass使用在进行复习回顾一下。proxy_pass的使......
  • 实验6:开源控制器实践——RYU
    (一)基本要求1.搭建下图所示SDN拓扑,协议使用OpenFlow1.0,并连接Ryu控制器。 a.建立拓扑sudomn--topo=single,3--mac--controller=remote,ip=127.0.0.1,port=8080......
  • 实验5:开源控制器实践——POX
    一.基础要求1.使用命令创建拓扑:sudomn--topo=single,3--mac--controller=remote,ip=127.0.0.1,port=6633--switchovsk,protocols=OpenFlow102.Hub模块1)开启pox./p......
  • 实验7:基于REST API的SDN北向应用实践
    一、实验目的1.能够编写程序调用OpenDaylightRESTAPI实现特定网络功能;2.能够编写程序调用RyuRESTAPI实现特定网络功能。二、实验环境1.下载虚拟机软件OracleVisual......