Windows and IIS configuration for windows_exporter

I am setting up the Grafana agent, and looking to collect both Windows system metrics and IIS metrics. I have been following the instructions for windows_exporter for both:

- target_label: job
replacement: ‘integrations/windows_exporter’

- target_label: job
replacement: ‘integrations/iis’

Both configurations use windows_exporter, but it seems that they each require the job label to be set to their own value; integrations/windows_exporter and integrations/iis, respectively.

Is there a way to configure it to use both at the same time?

Hi Daniel

The agent would only allows one definition of an enabled exporter under the integration section.
So I would recommend using the IIS config snippet for the integrations as it involves both the standard Windows integration metrics and also enables the additional IIS collector.

A single job name can be used and it should come up in both IIS / Windows dashboards unless a regex filter has been applied (Which I have checked is not the case for both IIS / Windows integration)

Log scrape configs can be defined multiple times either with the same job names or different ones.

Thanks. I will give it a try.

1 Like