Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

(3) promethus.yml configuration explanation

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

1. Default configuration

Shell > cat / Download/prometheus/prometheus.yml | grep-v "#"

Global:alerting: alertmanagers:-static_configs:-targets:rule_files:scrape_configs:-job_name: 'docker38' scrape_interval: 5s static_configs:-targets: [' localhost:9090'] labels: instance: docker38

2. Module introduction

There are three configuration blocks in the sample configuration file: global,rule_files and scrape_configs.

Global

The global block controls the global configuration of the Prometheus server. We have two options. The first is scrape_interval, which controls how often the Prometheus grabs the target. You can override this value for a single target. In this case, the global setting is fetched every 15s. The evaluation_interval option controls the frequency of Prometheus evaluation rules. Prometheus uses rules to create new time series and generate alerts.

Rule_files

The rule_files block specifies the location of any rules that we want the Prometheus server to load. Now we have no rules.

Scrape_configs

The last block, scrape_configs, controls the resources that Prometheus monitors. Because Prometheus also exposes its own data as HTTP endpoints, it can crawl and monitor its own health. In the default configuration, there is a job called prometheus that grabs time series data exposed by the Prometheus server. This job contains a statically configured target, localhost on port 9090. Prometheus wants metrics to be available on targets on the / metrics path. So the default job is to grab through URL: http//localhost:9090/metrics.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report