Configuring prometheus monitoring service container

Earlier we deployed prometheus configuration is automatically discovered, that is behind us does not need too much to change. For the new monitoring service container, we add the appropriate annotation in the annotations to deployment:

Configuring traefik container monitoring:

I use the k8s the dashboard, directly modify the deployment on the page:

"annotations": {
  "prometheus_io_scheme": "traefik",
  "prometheus_io_path": "/metrics",
  "prometheus_io_port": "8080"
}

image.png

image.pngThen restart the POD, to target prom page you can view:

image.png

Configuring blackbox-exporter monitoring service is alive, that monitor TCP services:

Also, add annotations in the deployment we want to monitor container:

"annotations": {
  "blackbox_port": "20880",
  "blackbox_scheme": "tcp"
}

image.png

prometheus has been found to automatically:

image.pngConfiguring blackbox-exporter monitoring service http:

"annotations": {
  "blackbox_path": "/",
  "blackbox_port": "8080",
  "blackbox_scheme": "http"
}

image.png

image.png

Jvm configuration information:

"annotations": {
  "prometheus_io_scrape": "true",
  "prometheus_io_port": "12346",
  "prometheus_io_path": "/"
}



Guess you like

Origin blog.51cto.com/13520772/2485116