栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

prometheus中文手册(prometheus部署)

prometheus中文手册(prometheus部署)

1.下载安装包

下载|普罗 米修斯 (prometheus.io)

2.安装

进入linux里在/opt/下创建prometheus目录,将prometheus压缩包通过XShell或XFTP拖入prometheus目录。

tar -zxvf prometheus-2.34.0.linux-amd64.tar.gz
3.设置配置文件

进入解压后的目录

vim prometheus.yml

# my global config
global:
  scrape_interval:     15s # (设置抓取(pull)时间间隔,默认是1分钟)
  evaluation_interval: 15s # (设置rules评估时间间隔,默认是1分钟)
  # scrape_timeout is set to the global default (10s).

#(告警管理配置,无特殊需要默认就行)
alerting:
  alertmanagers:
  - static_configs:
    - targets:
      # - alertmanager:9093

#加载rules,并根据设置的时间间隔定期评估,无特殊需要默认就行
rule_files:
  # - "first_rules.yml"
  # - "second_rules.yml"

# (监控目标配置):
# (默认只有普罗米修斯自己的监控).
scrape_configs:
  # The job name is added as a label `job=` to any timeseries scraped from this config.
  - job_name: 'prometheus'

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

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

可以在scrape_configs配置中配置监控任务
4.运行
./prometheus
5.查看网页
默认监听端口是9090
localhost:9090访问
 

 

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/772003.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号