In Prometheus, the scrape_config section of the configuration file defines how and which nodes (targets) should be scraped (monitored). This section specifies the endpoints Prometheus should scrape, the frequency of scraping, and any relabeling configurations.
scrape_config: This is the correct section where you define the targets to be monitored by Prometheus.
The other options are incorrect:
B. targets: This is part of scrape_config but not a top-level configuration section.
C. rules: This section is used to define alerting and recording rules, not targets.
D. listener: This is not a standard section in Prometheus configuration.
E. nodes: This is not a standard section in Prometheus configuration.
References:
Prometheus Documentation - Configuration
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit