Service discovery - Setting up the targets

Our service discovery integration using file based discovery will need a file to watch, which will be a targets.yml file that needs to be located in the same Prometheus instance directory holding your workshop-prometheus.yml file. Edit this target file to look like this (note for container installs we are using a podman variable, if using source install then replace all configuration targets with localhost:PORT_NUMBER):
							- targets: ["host.containers.internal:11111"]
- targets: ["host.containers.internal:22222"]
  labels:
    job: "services"
    env: "production"

- targets: ["host.containers.internal:44444"]
  labels:
    job: "services"
    env: "development"
						
Service discovery - Setting up the targets Our service discovery integration using file based discovery will need a file to watch, which will be a targets.yml file that needs to be located in the same Prometheus instance directory holding your workshop-prometheus.yml file. Edit this target file to look like this (note for container installs we are using a podman variable, if using source install then replace all configuration targets with localhost:PORT_NUMBER ): - target s: [ "host.containers.internal:11111" ] - target s: [ "host.containers.internal:22222" ] label s: jo b: "services" en v: "production" - target s: [ "host.containers.internal:44444" ] label s: jo b: "services" en v: "development"