prometheus服务端相关内容

prometheus目录下的文件和目录概览

[root@aliyun-hk-yabo-prod-jiranew prometheus210]# ll
total 117924
drwxr-xr-x  2 3434 3434     4096 May 25 21:54 console_libraries
drwxr-xr-x  2 3434 3434     4096 May 25 21:54 consoles
drwxr-xr-x 21 root root     4096 Jul  8 03:00 data
-rw-r--r--  1 3434 3434    11357 May 25 21:54 LICENSE
-rw-r--r--  1 3434 3434     2770 May 25 21:54 NOTICE
-rwxr-xr-x  1 3434 3434 74561203 May 25 20:29 prometheus
-rw-r--r--  1 3434 3434     1232 Jun 30 01:17 prometheus.yml
-rwxr-xr-x  1 3434 3434 46152675 May 25 20:31 promtool

我们需要关注的主要文件

data                              为数据目录

prometheus                 为程序二进制文件

prometheus.ym            为prometheus主配置文件

1) data目录

73d70ff709b45f60272961fc63a0ca2f833.jpg

01****    开头的这些文件为历史数据文件目录

wal         数据保护文件目录,prometheus为了防止数据的突然断电等情况,如果出现断电状况恢复后wal下的文件会恢复到内存中

2) 主配置文件

[root@aliyun-hk-yabo-prod-jiranew prometheus210]# cat prometheus.yml
# my global config
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:
       - 127.0.0.1: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: 'jira-xxxxxx'          
    static_configs:
      - targets: ['IP:9100']     
        labels: 
          instance: jira-old


注:prometheus服务器默认监听端口为9090 ,client端默认监听9100

转载于:https://my.oschina.net/54188zz/blog/3070845

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值