How to display windows server and linux server in the same dashboard

Hi, Can I display windows server and linux server in the same dashboard. what I want to do is implement one dashboard instead of two. In my case , I need to vistualition windows servers and linux servers. I don’t want to switch two dashboards everytime.

welcome to the :grafana: forum, @iamwanging

have you tried using template variables for building dashboards? Here is an example:

https://play.grafana.org/d/000000063/prometheus-templating?orgId=1

Thanks a lot, It’s useful for me, however, I want to know if it is possible to compose windows exporter with node_exporter in one dashboard, for example, there is a data center, which contains multipul servers. and have different operate systems. we use windows exporter to collect the information of windows server and use node_exporter to collect the information of linux server. the issue is how to make a dashboard could show the graph both of them at the same time.

Same here… i have several servers of windows and linux OS.
I want to combine those servers on a single grafana dashboard. Is that possible?

Thanks

What is the datasource?

I’m using Prometheus.
For windows, I’m using wmi_exporter
For linux, I’m using node_exporter

1 Like

So they both go to the same prometheus. did you install prometheus plugin and create it as a data source already?

Can you explain about the Prometheus plugin? How it works and how to install it?

Yes, I’ve already set Prometheus as the data source as well. So far, I’ve already visualize several windows and linux based servers on grafana. But they still visualized in separate dashboards.

I’ve been trying to combine those servers ip addresss targets in a single / same job on the prometheus.yml configuration, but they still didn’t shown in a single dashboards

so the question still not answered is: do both exporters push data to 1 prometheus?

And the wmi_exporter and node_exporter are in the same prometheus.yml?

You don’t want them in the same job in the yml file, you want different jobs and use a variable for the instance in your grafana dashboard to display both separately but in the same dashboard.

1 Like

in same file but different jobs

# 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"

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

    static_configs:
      - targets: ["localhost:9090"]
      
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: "sqlserver"

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

    static_configs:
      - targets: ["localhost:9399"]    

Yes, both of the exporter push data to 1 prometheus and they’re in the same Prometheus.yml

I want them in the same job and same prometheus as well.
So one dashboard are displaying lists of servers using Windows (windows_exporter) and Linux (node_exporter)

You don’t need them in one job to achieve that is what we’re trying to make you understand. You need to configure your queries in your dashboard to support to query both jobs data by using a variable instead of specifying the job.

Will try to configure the queries. Thank you for the insight!