Prometheus Learning Series (X) and examples of tasks

For Prometheus on, pull the pull samples called endpoint service instance , typically corresponding to a process (instance). Having the same purpose instance , for example, as scalability, reliability or copying process called a job. , It constitutes a job

For example, a process called api-server tasks with the same four examples.

  • job: api-server
    • instance 1:1.2.3.4:5670
    • instance 2:1.2.3.4:5671
    • instance 3:5.6.7.8:5670
    • instance 4:5.6.7.8:5671

Automation generated label time series and

When pulling an object Prometheus, automatically adding two labels to list metric name label, namely:

  • the Job : name of the target configuration task belongs.
  • instance : Destination URL to be crawled part of the service:host:port

If one of these two labels are present in both samples, this depends on the honor_labelsconfiguration options. See Documentation

For each sampling point where the service instance, Prometheus will store the following metrics sampling points:

  • up{job="[job-name]", instance="instance-id"}: 1Representing a sampling point where health services; 0identifying fetch failed
  • scrape_duration_seconds{job="[job-name]", instance="[instance-id]"}: Duration of the crawl
  • scrape_samples_post_metric_relabeling{job="<job-name>", instance="<instance-id>"}: The number of samples remaining after application of the metric relabeled.
  • scrape_samples_scraped{job="<job-name>", instance="<instance-id>"}: Number of samples exposed target.

upMetrics to monitor the health service is very useful.

link

Prometheus official website address: prometheus.io/

My Github: github.com/Alrights/pr...

Reproduced in: https: //juejin.im/post/5d04aa8ef265da1bc94eeb95

Guess you like

Origin blog.csdn.net/weixin_34077371/article/details/93182139