prometheus02-file_sd_configs
2019-10-21 16:09
2401 查看
1.配置文件(自动发现)
[root@zabbix-proxy prometheus]# 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: # - 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' file_sd_configs: - files: ['/usr/local/prometheus/sd_config/*.yml'] refresh_interval: 5s [root@zabbix-proxy prometheus]#
2. prometheus 软加载配置文件
kill -hup pid
3.prometheus 校验配置文件
[root@zabbix-proxy prometheus]# /usr/local/prometheus/promtool check config /usr/local/prometheus/prometheus.yml Checking /usr/local/prometheus/prometheus.yml SUCCESS: 0 rule files found [root@zabbix-proxy prometheus]#
4.查看被软加载(自动发现)的配置文件
[root@zabbix-proxy sd_config]# pwd /usr/local/prometheus/sd_config [root@zabbix-proxy sd_config]# cat prometheus-server.yml - labels: service: prometheus idc: su project: monitor targets: - 192.168.249.11:9090 [root@zabbix-proxy sd_config]#
5.同一类项目
相关文章推荐
- android 虚拟机,文件导入sdcard下报错,Read-only file system
- A simple config file (application / configs / application.ini)
- android copy raw file to sdcard
- Android出现W/System.err(384): java.io.FileNotFoundException: /mnt/sdcard/cache/XXX
- 文件存储之:File,Cache,Sdcard,三种存储方式
- Android使用FileObserver对sdcard文件或文件夹监控
- A simple config file (application / configs / application.ini)
- java.io.FileNotFoundException: /sdcard/fav.txt (Permission denied)
- SDService和SDClient的通信设计 -- 使用Event+Memory map file
- TraceView报错:unable to open trace file /mnt/sdcard/aa.trace: Permission denied
- Unable to chmod sdcard: Read-only file system
- android开发如何用file读出sdcard中含图片的文件夹,并将文件夹显示到listview上????
- IOS异步图片加载SDWebImage的使用时遇到file not found和Symbol Not Found: _objc_storeStrong
- Trying to attach a file from SD Card to email
- java.io.FileNotFoundException:/mnt/sdcard/......(Permission denied)
- SDCard存储和File存储 的总结
- /dev/sdxx is apparently in use by the system; will not make a filesystem here! 解决方法
- Error opening file: /sdcard/screenshot.png (Read-only file system) 问题解决
- java.io.FileNotFoundException: /sdcard/fav.txt (Permission denied)
- 【android】下载文件至本应用程序的file目录或者sdcard