Where is my configuration wrong?

Hello,
I’m a newbie in Grafana and Prometheus. I’m having some issues that I don’t know if it’s related to my configuration or something else. I did not make any changes to the Grafana configuration file and I just changed the Prometheus configuration file as follows:

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'

    # Override the global default and scrape targets from this job every 5 seconds.
    scrape_interval: 5s
    scrape_timeout: 5s

  - job_name: "Local_Linux"
    scrape_interval: 10s
    static_configs:
      - targets: ["localhost:9100"]

  - job_name: "Windows_10"
    scrape_interval: 10s
    static_configs:
      - targets: ["192.168.1.3:9182"]

  - job_name: "Windows_2"
    scrape_interval: 10s
    static_configs:
      - targets: ["192.168.1.3:9182"]

    # metrics_path defaults to '/metrics'
    # scheme defaults to 'http'.

#    static_configs:
#      - targets: ['localhost:9090']

  - job_name: node
    # If prometheus-node-exporter is installed, grab stats about the local
    # machine by default.
    static_configs:
      - targets: ['localhost:9100']

As you can see, I have only defined two jobs with different names and the same IP address 192.168.1.3.
These servers have been added to the dashboard:

When I click on the IP address in theInstance section, the server information disappears from the dashboard:

Which part of the configuration is this problem related to?

Thank you.

1 Like

Hi,
Is this a bug? Have others encountered this problem?

Cheers.

Hi,
When I click on the IP address in the instance, the value of the JOB field changes to ${__cell_4} and after this the information disappears!
Is there anyone else having this problem?

Hi,
Someone suggested me the following solution:

  1. Go to the panel in Edit mode.
  2. Inspect Data Links
    • Under “Field” or “Overrides,” look for “Data Links.”
    • See if ${__cell_4} is used. If so, change it to the correct variable reference—for example, ${instance} or ${__cell_0} if that cell now corresponds to the instance.
  3. Check Templating/Variables
    • In “Dashboard settings,” confirm any variables referencing “instance” or “job” are correct.
    • If a variable is missing or incorrectly named, fix it so that your panel can properly filter by the correct label.
  4. Re-test
    • After correcting the references, click on the IP in the panel. The “job” or “instance” value should carry over correctly, and the data should remain visible.

I did:

As you can see, the query has changed to something like below:

100 - avg(irate(windows_cpu_time_total{job=~"${__cell_5}",instance=~"",mode="idle"}[5m]))*100

Why?