mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-17 10:09:05 +02:00
mixin: add a dashboard per tab next to the full dashboard (#2678)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
b3d043d9dc
commit
1cdea1f42a
@@ -4,7 +4,7 @@ on:
|
||||
pull_request:
|
||||
paths:
|
||||
- contrib/mixin/**
|
||||
- dashboard/windows-exporter-dashboard.json
|
||||
- dashboard/*.json
|
||||
- .github/workflows/mixin.yml
|
||||
push:
|
||||
branches:
|
||||
@@ -13,7 +13,7 @@ on:
|
||||
- main
|
||||
paths:
|
||||
- contrib/mixin/**
|
||||
- dashboard/windows-exporter-dashboard.json
|
||||
- dashboard/*.json
|
||||
- .github/workflows/mixin.yml
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ their runtime behavior.
|
||||
and examples. [`docs/collector-template.md`](docs/collector-template.md) is the
|
||||
documentation template.
|
||||
- [`contrib/mixin`](contrib/mixin): Jsonnet recording rules, alerts and dashboard
|
||||
sources. [`dashboard`](dashboard) contains the generated Grafana dashboard;
|
||||
sources. [`dashboard`](dashboard) contains the generated Grafana dashboards;
|
||||
[`docs/runbooks`](docs/runbooks) documents the alerts.
|
||||
- [`installer`](installer), [`kubernetes`](kubernetes) and [`tools`](tools): MSI
|
||||
packaging, deployment examples, CI fixtures and end-to-end helpers. The CI
|
||||
@@ -178,8 +178,10 @@ running unless the user requests changes to it.
|
||||
Read [`contrib/mixin/README.md`](contrib/mixin/README.md) and
|
||||
[`dashboard/README.md`](dashboard/README.md) before editing monitoring artifacts.
|
||||
Edit the Jsonnet/Grafonnet source under `contrib/mixin/dashboards`, including its
|
||||
tab modules and shared builders, and regenerate
|
||||
`dashboard/windows-exporter-dashboard.json`. Do not hand-edit generated JSON.
|
||||
tab modules and shared builders, and regenerate `dashboard/windows-exporter-*.json`:
|
||||
the full dashboard `windows-exporter-dashboard.json` and one dashboard per tab.
|
||||
Do not hand-edit generated JSON. Tab dashboards keep only the variables their
|
||||
panels reference, so reference variables as `$name` or `${name}`.
|
||||
Gate every tab, row, panel and variable on the collectors it queries with
|
||||
`on('<collector>')` (names from `_config.collectors`), and run
|
||||
`jsonnet -J vendor tests/dashboard.test.jsonnet` to check the layout for several
|
||||
|
||||
@@ -1,42 +1,34 @@
|
||||
# Keep exceptions scoped to the existing sample dashboard and panels.
|
||||
# Exceptions apply to all sample dashboards; entries without a dashboard
|
||||
# match every dashboard title.
|
||||
exclusions:
|
||||
target-promql-rule:
|
||||
reason: dashboard-linter 0.3.0's v2 adapter omits custom variable current values and options, so the numeric process_top value becomes a vector identifier. These queries are validated against live Prometheus with limits 5, 10 and 20.
|
||||
entries:
|
||||
- dashboard: Windows Exporter
|
||||
panel: Process CPU usage
|
||||
- dashboard: Windows Exporter
|
||||
panel: Process working set
|
||||
- dashboard: Windows Exporter
|
||||
panel: Process private bytes
|
||||
- dashboard: Windows Exporter
|
||||
panel: Process I/O throughput
|
||||
- dashboard: Windows Exporter
|
||||
panel: Process threads
|
||||
- dashboard: Windows Exporter
|
||||
panel: Process handles
|
||||
- dashboard: Windows Exporter
|
||||
panel: Process I/O operations
|
||||
- dashboard: Windows Exporter
|
||||
panel: Process page faults
|
||||
- panel: Process CPU usage
|
||||
- panel: Process working set
|
||||
- panel: Process private bytes
|
||||
- panel: Process I/O throughput
|
||||
- panel: Process threads
|
||||
- panel: Process handles
|
||||
- panel: Process I/O operations
|
||||
- panel: Process page faults
|
||||
target-instance-rule:
|
||||
reason: Fleet panels intentionally span instances; per-host panels use an exact matcher for the single-select instance variable.
|
||||
entries:
|
||||
- dashboard: Windows Exporter
|
||||
- {}
|
||||
template-instance-rule:
|
||||
reason: Per-host tabs require one instance, so the instance variable has neither multi-select nor an All value.
|
||||
entries:
|
||||
- dashboard: Windows Exporter
|
||||
- {}
|
||||
template-job-rule:
|
||||
reason: Grafana expands All to the discovered job values rather than using a custom .+ wildcard.
|
||||
entries:
|
||||
- dashboard: Windows Exporter
|
||||
- {}
|
||||
uneditable-dashboard:
|
||||
reason: This sample dashboard is editable so users can adapt it to their environment.
|
||||
entries:
|
||||
- dashboard: Windows Exporter
|
||||
- {}
|
||||
panel-units-rule:
|
||||
reason: This table displays service names and states; the numeric query value is hidden.
|
||||
entries:
|
||||
- dashboard: Windows Exporter
|
||||
panel: Automatic services not running
|
||||
- panel: Automatic services not running
|
||||
|
||||
+46
-24
@@ -202,16 +202,22 @@ Fork users should override `runbookURLPattern` to match their published URL.
|
||||
|
||||
## Dashboard
|
||||
|
||||
`grafanaDashboards` contains `windows-exporter.json`, the sample dashboard in
|
||||
[dashboard/windows-exporter-dashboard.json](../../dashboard/windows-exporter-dashboard.json).
|
||||
It is a Grafana v2 dashboard with tabs and needs Grafana 13 or later. See the
|
||||
[dashboard documentation](../../dashboard/README.md) for its content.
|
||||
`grafanaDashboards` contains `windows-exporter.json`, the full sample dashboard
|
||||
with all tabs in
|
||||
[dashboard/windows-exporter-dashboard.json](../../dashboard/windows-exporter-dashboard.json),
|
||||
and a shorter dashboard per tab, such as `windows-exporter-cpu.json`, in
|
||||
[dashboard](../../dashboard). They are Grafana v2 dashboards and need Grafana 13
|
||||
or later. See the [dashboard documentation](../../dashboard/README.md) for their
|
||||
content.
|
||||
|
||||
The dashboard uses additive builders with [grafonnet](https://github.com/grafana/grafonnet),
|
||||
pinned in `jsonnetfile.json`:
|
||||
|
||||
- `dashboards/windows-exporter.libsonnet` composes the dashboard, with one source
|
||||
file per tab for its panels, queries, rows, and grid positions.
|
||||
- `dashboards/windows-exporter.libsonnet` composes the full dashboard and the
|
||||
dashboard of each tab, with one source file per tab for its panels, queries,
|
||||
rows, and grid positions. A tab dashboard keeps only the variables its panels
|
||||
reference, directly or through other variables, and the annotations of those
|
||||
variables.
|
||||
- `dashboards/builders.libsonnet` uses Grafonnet's native `apps.dashboard.v2`
|
||||
builders for the dashboard and layout and wraps its Prometheus query builders
|
||||
into the v2 panel/query-group schema.
|
||||
@@ -242,41 +248,56 @@ b.panel.new(200, 'CPU usage', 'timeseries')
|
||||
+ b.panel.withDefaults({ unit: 'percentunit', min: 0, max: 1 })
|
||||
```
|
||||
|
||||
Regenerate the committed file after changing the dashboard source:
|
||||
Regenerate the committed files after changing the dashboard source:
|
||||
|
||||
```sh
|
||||
mise run dashboard
|
||||
```
|
||||
|
||||
This runs `jb install` and writes `../../dashboard/windows-exporter-dashboard.json`.
|
||||
This runs `jb install` and writes `../../dashboard/windows-exporter-*.json`.
|
||||
`mise run dashboards` is an alias. `mise run generate` builds both the rules and the
|
||||
dashboard, while `mise run rules` builds only the rules. The same commands work
|
||||
inside WSL; mise supplies the tool binaries on `PATH`.
|
||||
|
||||
The checked-in JSON remains the reference for the rendered dashboard, including
|
||||
The checked-in JSON remains the reference for the rendered dashboards, including
|
||||
queries, IDs, variables, annotations, transformations, and tab/row layout.
|
||||
`mise run check-dashboards` regenerates it and runs `git diff --exit-code`, displaying
|
||||
any drift. CI runs that check before the mixin tests. The dashboard uses its own
|
||||
`mise run check-dashboards` regenerates them, marks new dashboard files with
|
||||
`git add --intent-to-add` and runs `git diff --exit-code`, displaying any drift. CI runs that check before the mixin tests. The dashboard uses its own
|
||||
variables for selectors; from `_config` it reads only `collectors`,
|
||||
`enableFleetTab`, `enableOverviewTab` and the dashboard metadata below.
|
||||
`enableFleetTab`, `enableOverviewTab`, `enableTabDashboards` and the dashboard
|
||||
metadata below.
|
||||
|
||||
### Metadata
|
||||
|
||||
`dashboardUID`, `dashboardTitle`, `dashboardDescription` and `dashboardTags`
|
||||
set the dashboard's UID (`metadata.name`), title, description and tags. Give a
|
||||
customized dashboard its own UID so it can be imported next to the sample
|
||||
dashboard instead of replacing it:
|
||||
Every dashboard has a readable UID (`metadata.name`) built from
|
||||
`dashboardUIDPrefix`, and a title built from `dashboardTitlePrefix`:
|
||||
|
||||
| Dashboard | UID | Title |
|
||||
| --- | --- | --- |
|
||||
| Full, all tabs | `windows-exporter-full` | Windows Exporter / Full |
|
||||
| One tab | `windows-exporter-<tab>`, for example `windows-exporter-cpu` or `windows-exporter-scheduled-tasks` | Windows Exporter / `<tab>` |
|
||||
|
||||
`dashboardUID`, `dashboardTitle` and `dashboardDescription` override the UID,
|
||||
title and description of the full dashboard. `dashboardTags` sets the tags of
|
||||
all dashboards; each tab dashboard links to the others through a dropdown of
|
||||
dashboards with these tags, keeping the time range and variables. Set
|
||||
`enableTabDashboards: false` to render only the full dashboard. Give customized
|
||||
dashboards their own UIDs so they can be imported next to the sample dashboards
|
||||
instead of replacing them:
|
||||
|
||||
```jsonnet
|
||||
(import 'mixin.libsonnet') {
|
||||
_config+:: {
|
||||
dashboardUID: 'windows-compact',
|
||||
dashboardTitle: 'Windows (compact)',
|
||||
dashboardUIDPrefix: 'windows-compact',
|
||||
dashboardTitlePrefix: 'Windows (compact)',
|
||||
dashboardTags+: ['compact'],
|
||||
},
|
||||
}.grafanaDashboards['windows-exporter.json']
|
||||
}.grafanaDashboards
|
||||
```
|
||||
|
||||
In the Fleet dashboard, a hostname links to the Overview dashboard; in the full
|
||||
dashboard, it links to the Overview tab.
|
||||
|
||||
### Collectors
|
||||
|
||||
`_config.collectors` lists the windows_exporter collectors by their exporter
|
||||
@@ -309,7 +330,7 @@ dashboard with only the collector tabs and the Exporter tab, turn them off:
|
||||
}.grafanaDashboards['windows-exporter.json']
|
||||
```
|
||||
|
||||
The committed sample dashboard enables every collector. The Fleet hosts table
|
||||
The committed sample dashboards enable every collector. The Fleet hosts table
|
||||
always queries the default collectors; its columns stay empty for collectors
|
||||
that are turned off. Tab sources are
|
||||
functions of `on(collector)`; return `null` instead of a row, a `[id, width,
|
||||
@@ -325,8 +346,9 @@ Install Python 3, run `mise install`, then run:
|
||||
mise run test
|
||||
```
|
||||
|
||||
This checks Jsonnet formatting, checks that the committed dashboard is up to
|
||||
date, runs `dashboard-linter lint --strict`, validates generated rules with
|
||||
This checks Jsonnet formatting, runs `jsonnet-lint` on the Jsonnet sources to
|
||||
find unused variables and references to missing fields, checks that the
|
||||
committed dashboards are up to date, runs `dashboard-linter lint --strict`, validates generated rules with
|
||||
`promtool`, runs `pint --offline lint`, and evaluates the rules against synthetic
|
||||
time series.
|
||||
Tests cover all 25 recordings, alert timing and recovery, threshold
|
||||
@@ -347,8 +369,8 @@ committed dashboard JSON or its own workflow file, and can also be started
|
||||
manually. It caches pinned tool binaries and runs the same `mise run test` checks
|
||||
used locally.
|
||||
|
||||
Run `mise run lint-dashboards` to lint just the committed dashboard. `.dashboard-lint.yaml`
|
||||
documents exceptions for the sample dashboard's single-host selection, fleet
|
||||
Run `mise run lint-dashboards` to lint just the committed dashboards. `.dashboard-lint.yaml`
|
||||
documents exceptions for the sample dashboards' single-host selection, fleet
|
||||
queries, editable state, and the service table without numeric units. All panels
|
||||
include descriptions; missing titles or descriptions fail validation, including
|
||||
warnings.
|
||||
|
||||
@@ -11,11 +11,19 @@
|
||||
// Requires the time collector with its ntp subcollector enabled.
|
||||
enableTime: false,
|
||||
|
||||
// Grafana dashboard metadata. dashboardUID is the v2 metadata.name; change
|
||||
// it to import the dashboard next to the sample one.
|
||||
dashboardUID: 'Kdaassddw',
|
||||
dashboardTitle: 'Windows Exporter',
|
||||
// Grafana dashboard metadata. A UID is the v2 metadata.name; change the
|
||||
// UIDs to import the dashboards next to the sample ones.
|
||||
// Every tab also renders as a dashboard of its own with the UID
|
||||
// <dashboardUIDPrefix>-<tab> and the title "<dashboardTitlePrefix> / <tab>",
|
||||
// for example windows-exporter-cpu and "Windows Exporter / CPU".
|
||||
enableTabDashboards: true,
|
||||
dashboardUIDPrefix: 'windows-exporter',
|
||||
dashboardTitlePrefix: 'Windows Exporter',
|
||||
// The full dashboard has all tabs.
|
||||
dashboardUID: self.dashboardUIDPrefix + '-full',
|
||||
dashboardTitle: self.dashboardTitlePrefix + ' / Full',
|
||||
dashboardDescription: 'Fleet overview and per-host details for Windows hosts monitored by windows_exporter.',
|
||||
// The dashboards link to each other through their tags.
|
||||
dashboardTags: ['prometheus', 'windows', 'windows_exporter'],
|
||||
|
||||
// Dashboard tabs that don't belong to a single collector. Turn them off
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
// Renders dashboard/windows-exporter-dashboard.json. Run with jsonnet -J vendor -S.
|
||||
// The sample dashboard shows every collector; mixin users select theirs with
|
||||
// _config.collectors.
|
||||
// Renders the sample dashboards into ../../dashboard. Run with
|
||||
// jsonnet -J vendor -S -m <directory>. The sample dashboards show every
|
||||
// collector; mixin users select theirs with _config.collectors.
|
||||
local manifest = import 'lib/manifest.libsonnet';
|
||||
local mixin = (import 'mixin.libsonnet') + {
|
||||
_config+:: { collectors: { [collector]: true for collector in std.objectFields(super.collectors) } },
|
||||
};
|
||||
|
||||
(import 'lib/manifest.libsonnet')(mixin.grafanaDashboards['windows-exporter.json'])
|
||||
// The full dashboard keeps the file name it had before the tab dashboards.
|
||||
{
|
||||
[if name == 'windows-exporter.json' then 'windows-exporter-dashboard.json' else name]: manifest(mixin.grafanaDashboards[name])
|
||||
for name in std.objectFields(mixin.grafanaDashboards)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
{
|
||||
grafanaDashboards+:: {
|
||||
'windows-exporter.json': (import 'windows-exporter.libsonnet')($._config),
|
||||
},
|
||||
local dashboards = (import 'windows-exporter.libsonnet')($._config),
|
||||
grafanaDashboards+:: { 'windows-exporter.json': dashboards.full } + dashboards.tabs,
|
||||
}
|
||||
|
||||
@@ -8,7 +8,9 @@ local volumeFree = '100 * windows_logical_disk_free_bytes{job=~"$job", volume!~"
|
||||
local attention = [{ color: 'green', value: null }, { color: 'orange', value: 1 }];
|
||||
|
||||
// config supplies the alert thresholds, so a counter turns orange when the matching alert condition holds.
|
||||
function(on, config)
|
||||
// Hostnames link to the Overview tab of this dashboard, or to the dashboard with
|
||||
// the UID overview when it is given. Without the Overview tab, they link nowhere.
|
||||
function(on, config, overview=null)
|
||||
b.tab(
|
||||
'Fleet',
|
||||
b.rows([
|
||||
@@ -171,23 +173,27 @@ function(on, config)
|
||||
options: 'hostname',
|
||||
},
|
||||
properties: [
|
||||
{
|
||||
id: 'links',
|
||||
value: [
|
||||
{
|
||||
title: 'Show details for ${__data.fields.hostname}',
|
||||
url: '/d/${__dashboard.uid}?${__url_time_range}&${datasource:queryparam}&${job:queryparam}&var-hostname=$__all&var-instance=${__data.fields.instance}&dtab=Overview',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'custom.width',
|
||||
value: 180,
|
||||
},
|
||||
{
|
||||
id: 'custom.filterable',
|
||||
value: true,
|
||||
},
|
||||
property
|
||||
for property in [
|
||||
if config.enableOverviewTab then {
|
||||
id: 'links',
|
||||
value: [
|
||||
{
|
||||
title: 'Show details for ${__data.fields.hostname}',
|
||||
url: '/d/' + (if overview == null then '${__dashboard.uid}' else overview) + '?${__url_time_range}&${datasource:queryparam}&${job:queryparam}&var-hostname=$__all&var-instance=${__data.fields.instance}' + (if overview == null then '&dtab=Overview' else ''),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'custom.width',
|
||||
value: 180,
|
||||
},
|
||||
{
|
||||
id: 'custom.filterable',
|
||||
value: true,
|
||||
},
|
||||
]
|
||||
if property != null
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
@@ -70,9 +70,6 @@ function(on) [variable for variable in [
|
||||
new('instance', 'label_values(windows_os_hostname{job=~"$job", hostname=~"$hostname"}, instance)')
|
||||
+ query.spec.withLabel('Instance')
|
||||
,
|
||||
new('show_hostname', 'label_values(windows_os_hostname{job=~"$job", instance="$instance"}, hostname)')
|
||||
+ query.spec.withHide('hideVariable')
|
||||
,
|
||||
if on('logical_disk') then new('volume', 'label_values(windows_logical_disk_size_bytes{job=~"$job", instance="$instance"}, volume)')
|
||||
+ query.spec.withCurrent({
|
||||
text: [
|
||||
|
||||
@@ -1,10 +1,42 @@
|
||||
local b = import 'builders.libsonnet';
|
||||
local dashboard = b.dashboard;
|
||||
|
||||
// config.collectors selects the collectors the dashboard renders,
|
||||
// Descriptions of the dashboards of single tabs, by tab title.
|
||||
local descriptions = {
|
||||
Fleet: 'Health, utilization and stopped services of all Windows hosts monitored by windows_exporter.',
|
||||
Overview: 'Operating system, uptime, CPU, memory, volumes, disk and network throughput of one Windows host.',
|
||||
CPU: 'CPU utilization by mode and core, scheduling, system calls and frequency of one Windows host.',
|
||||
Memory: 'Physical memory, commit charge, paging and kernel memory of one Windows host.',
|
||||
Disk: 'Volumes, physical disks, drives and Storage Spaces of one Windows host.',
|
||||
Network: 'Interface throughput, errors and discards, TCP and UDP of one Windows host.',
|
||||
SMB: 'SMB shares served and used by one Windows host.',
|
||||
Processes: 'CPU, memory, I/O, threads and handles per process of one Windows host.',
|
||||
Services: 'Service states and automatic services that are not running on one Windows host.',
|
||||
'Scheduled tasks': 'Scheduled task states, results and missed runs of one Windows host.',
|
||||
Updates: 'Pending Windows updates and the last update check of one Windows host.',
|
||||
GPU: 'GPU utilization, memory, sensors and top processes of one Windows host.',
|
||||
'Hyper-V': 'Hyper-V virtual machines, virtual disks, switches and network adapters of one Windows host.',
|
||||
Time: 'Clock synchronization, NTP sources and clock offset of one Windows host.',
|
||||
Exporter: 'Scrape status, collector health and resource usage of windows_exporter on one host.',
|
||||
};
|
||||
|
||||
local wordChar(c) = std.member('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_', c);
|
||||
// The leading identifier of text.
|
||||
local identifier(text) =
|
||||
local chars = std.stringChars(std.substr(text, 0, 32));
|
||||
local length = std.foldl(function(acc, c) if acc.done || !wordChar(c) then acc { done: true } else acc { n+: 1 }, chars, { n: 0, done: false }).n;
|
||||
std.substr(text, 0, length);
|
||||
// The variable names that value references as $name or ${name...}.
|
||||
local references(value) = std.set([
|
||||
identifier(if std.startsWith(part, '{') then std.substr(part, 1, 33) else part)
|
||||
for part in std.split(std.manifestJsonMinified(value), '$')[1:]
|
||||
]);
|
||||
|
||||
// config.collectors selects the collectors the dashboards render,
|
||||
// config.enableFleetTab and config.enableOverviewTab the tabs across
|
||||
// collectors, and config.dashboard* its UID, title, description and tags, see
|
||||
// config.libsonnet.
|
||||
// collectors, and config.dashboard* their UIDs, titles, description and tags,
|
||||
// see config.libsonnet. Returns the full dashboard with all tabs and, with
|
||||
// config.enableTabDashboards, a dashboard per tab by its file name.
|
||||
function(config)
|
||||
local known = std.objectFields((import '../config.libsonnet')._config.collectors);
|
||||
local unknown = std.setDiff(std.objectFields(config.collectors), known);
|
||||
@@ -15,10 +47,14 @@ function(config)
|
||||
std.get(config.collectors, collector, false);
|
||||
// All variables select hosts through windows_os_hostname.
|
||||
assert on('os') : 'The dashboard requires the os collector';
|
||||
local tabs = [
|
||||
local slug(title) = std.strReplace(std.asciiLower(title), ' ', '-');
|
||||
local uid(title) = config.dashboardUIDPrefix + '-' + slug(title);
|
||||
// overview is the UID of the Overview dashboard that Fleet links hosts to,
|
||||
// or null for the Overview tab of the same dashboard.
|
||||
local tabs(overview) = [
|
||||
tab
|
||||
for tab in [
|
||||
if config.enableFleetTab then (import 'fleet.libsonnet')(on, config),
|
||||
if config.enableFleetTab then (import 'fleet.libsonnet')(on, config, overview),
|
||||
if config.enableOverviewTab then (import 'overview.libsonnet')(on),
|
||||
(import 'cpu.libsonnet')(on),
|
||||
(import 'memory.libsonnet')(on),
|
||||
@@ -36,51 +72,113 @@ function(config)
|
||||
]
|
||||
if tab != null && !tab.empty
|
||||
];
|
||||
local fullTabs = tabs(null);
|
||||
|
||||
local panelNames = std.flattenArrays([std.objectFields(tab.elements) for tab in tabs]);
|
||||
local panelNames = std.flattenArrays([std.objectFields(tab.elements) for tab in fullTabs]);
|
||||
assert std.length(panelNames) == std.length(std.set(panelNames)) : 'Panel IDs must be unique across tabs';
|
||||
|
||||
dashboard.new(config.dashboardUID, config.dashboardTitle)
|
||||
+ dashboard.spec.withCursorSync('Crosshair')
|
||||
+ dashboard.spec.withDescription(config.dashboardDescription)
|
||||
+ dashboard.spec.withEditable(true)
|
||||
+ dashboard.spec.withLinks([
|
||||
{
|
||||
asDropdown: false,
|
||||
icon: 'doc',
|
||||
includeVars: false,
|
||||
keepTime: false,
|
||||
tags: [],
|
||||
targetBlank: true,
|
||||
title: 'windows_exporter',
|
||||
tooltip: '',
|
||||
type: 'link',
|
||||
url: 'https://github.com/prometheus-community/windows_exporter',
|
||||
},
|
||||
])
|
||||
+ dashboard.spec.withLiveNow(false)
|
||||
+ dashboard.spec.withPreload(false)
|
||||
+ dashboard.spec.withTags(config.dashboardTags)
|
||||
+ dashboard.spec.withTimeSettings({
|
||||
autoRefresh: '1m',
|
||||
autoRefreshIntervals: [
|
||||
'5s',
|
||||
'10s',
|
||||
'30s',
|
||||
'1m',
|
||||
'5m',
|
||||
'15m',
|
||||
'30m',
|
||||
'1h',
|
||||
'2h',
|
||||
'1d',
|
||||
],
|
||||
fiscalYearStartMonth: 0,
|
||||
from: 'now-3h',
|
||||
hideTimepicker: false,
|
||||
to: 'now',
|
||||
})
|
||||
+ dashboard.spec.withAnnotations((import 'annotations.libsonnet')(on))
|
||||
+ dashboard.spec.withVariables((import 'variables.libsonnet')(on))
|
||||
+ dashboard.spec.withElements(std.foldl(function(elements, tab) elements + tab.elements, tabs, {}))
|
||||
+ dashboard.spec.withLayout(b.tabs([tab.layout for tab in tabs]))
|
||||
local variables = (import 'variables.libsonnet')(on);
|
||||
local annotations = (import 'annotations.libsonnet')(on);
|
||||
|
||||
// Tab dashboards link to each other through a dropdown of the dashboards
|
||||
// with the same tags; the full dashboard has the tabs instead.
|
||||
local new(uid, title, description, elements, layout, dropdown=true) =
|
||||
// Grafana rejects longer dashboard UIDs.
|
||||
assert std.length(uid) <= 40 : 'Dashboard UID ' + uid + ' is longer than 40 characters; shorten dashboardUIDPrefix or dashboardUID';
|
||||
// Keeps the variables that the panels reference, directly or through
|
||||
// other variables, and the annotations whose variables are kept.
|
||||
// Variables only reference variables defined before them.
|
||||
local kept = std.foldl(
|
||||
function(used, variable)
|
||||
if std.setMember(variable.spec.name, used)
|
||||
then std.setUnion(used, references(variable))
|
||||
else used,
|
||||
std.reverse(variables),
|
||||
references(elements),
|
||||
);
|
||||
local dropped = std.set([variable.spec.name for variable in variables if !std.setMember(variable.spec.name, kept)]);
|
||||
dashboard.new(uid, title)
|
||||
+ dashboard.spec.withCursorSync('Crosshair')
|
||||
+ dashboard.spec.withDescription(description)
|
||||
+ dashboard.spec.withEditable(true)
|
||||
+ dashboard.spec.withLinks([
|
||||
link
|
||||
for link in [
|
||||
if dropdown then {
|
||||
asDropdown: true,
|
||||
icon: 'external link',
|
||||
includeVars: true,
|
||||
keepTime: true,
|
||||
tags: config.dashboardTags,
|
||||
targetBlank: false,
|
||||
title: config.dashboardTitlePrefix,
|
||||
tooltip: 'Dashboards for windows_exporter',
|
||||
type: 'dashboards',
|
||||
url: '',
|
||||
},
|
||||
{
|
||||
asDropdown: false,
|
||||
icon: 'doc',
|
||||
includeVars: false,
|
||||
keepTime: false,
|
||||
tags: [],
|
||||
targetBlank: true,
|
||||
title: 'windows_exporter',
|
||||
tooltip: '',
|
||||
type: 'link',
|
||||
url: 'https://github.com/prometheus-community/windows_exporter',
|
||||
},
|
||||
]
|
||||
if link != null
|
||||
])
|
||||
+ dashboard.spec.withLiveNow(false)
|
||||
+ dashboard.spec.withPreload(false)
|
||||
+ dashboard.spec.withTags(config.dashboardTags)
|
||||
+ dashboard.spec.withTimeSettings({
|
||||
autoRefresh: '1m',
|
||||
autoRefreshIntervals: [
|
||||
'5s',
|
||||
'10s',
|
||||
'30s',
|
||||
'1m',
|
||||
'5m',
|
||||
'15m',
|
||||
'30m',
|
||||
'1h',
|
||||
'2h',
|
||||
'1d',
|
||||
],
|
||||
fiscalYearStartMonth: 0,
|
||||
from: 'now-3h',
|
||||
hideTimepicker: false,
|
||||
to: 'now',
|
||||
})
|
||||
+ dashboard.spec.withAnnotations([
|
||||
annotation
|
||||
for annotation in annotations
|
||||
if std.length(std.setInter(references(annotation), dropped)) == 0
|
||||
])
|
||||
+ dashboard.spec.withVariables([variable for variable in variables if std.setMember(variable.spec.name, kept)])
|
||||
+ dashboard.spec.withElements(elements)
|
||||
+ dashboard.spec.withLayout(layout);
|
||||
|
||||
{
|
||||
full: new(
|
||||
config.dashboardUID,
|
||||
config.dashboardTitle,
|
||||
config.dashboardDescription,
|
||||
std.foldl(function(elements, tab) elements + tab.elements, fullTabs, {}),
|
||||
b.tabs([tab.layout for tab in fullTabs]),
|
||||
dropdown=false,
|
||||
),
|
||||
tabs: if config.enableTabDashboards then {
|
||||
['windows-exporter-' + slug(tab.layout.spec.title) + '.json']: new(
|
||||
uid(tab.layout.spec.title),
|
||||
config.dashboardTitlePrefix + ' / ' + tab.layout.spec.title,
|
||||
descriptions[tab.layout.spec.title],
|
||||
tab.elements,
|
||||
tab.layout.spec.layout,
|
||||
)
|
||||
for tab in tabs(if config.enableOverviewTab then uid('Overview'))
|
||||
} else {},
|
||||
}
|
||||
|
||||
+32
-12
@@ -8,7 +8,7 @@
|
||||
[vars]
|
||||
sources = "*.libsonnet *.jsonnet lib/*.libsonnet rules/*.libsonnet alerts/*.libsonnet dashboards/*.libsonnet tests/*.libsonnet tests/*.jsonnet"
|
||||
fmt_flags = "-n 2 --max-blank-lines 2 --string-style s --comment-style s"
|
||||
dashboard = "../../dashboard/windows-exporter-dashboard.json"
|
||||
dashboards = "../../dashboard"
|
||||
|
||||
[tasks.generate]
|
||||
description = "Generate Prometheus rules, alerts, and the dashboard"
|
||||
@@ -27,24 +27,35 @@ description = "Install dashboard Jsonnet libraries"
|
||||
run = "jb install"
|
||||
|
||||
[tasks.dashboard]
|
||||
description = "Regenerate the committed Grafana dashboard"
|
||||
description = "Regenerate the committed Grafana dashboards"
|
||||
alias = "dashboards"
|
||||
depends = ["vendor"]
|
||||
run = '''
|
||||
set -eu
|
||||
trap 'rm -f {{vars.dashboard}}.tmp' EXIT
|
||||
jsonnet -J vendor -S dashboard.jsonnet > {{vars.dashboard}}.tmp
|
||||
mv {{vars.dashboard}}.tmp {{vars.dashboard}}
|
||||
out=$(mktemp -d)
|
||||
trap 'rm -rf "$out"' EXIT
|
||||
jsonnet -J vendor -S -m "$out" dashboard.jsonnet > /dev/null
|
||||
rm -f {{vars.dashboards}}/windows-exporter-*.json
|
||||
cp "$out"/*.json {{vars.dashboards}}/
|
||||
'''
|
||||
|
||||
[tasks.check-dashboards]
|
||||
description = "Regenerate the dashboard and fail on uncommitted changes"
|
||||
description = "Regenerate the dashboards and fail on uncommitted changes"
|
||||
depends = ["dashboard"]
|
||||
run = "git diff --exit-code -- {{vars.dashboard}}"
|
||||
run = '''
|
||||
set -eu
|
||||
git add --intent-to-add -- {{vars.dashboards}}/windows-exporter-*.json
|
||||
git diff --exit-code -- {{vars.dashboards}}
|
||||
'''
|
||||
|
||||
[tasks.lint-dashboards]
|
||||
description = "Lint the committed dashboard in strict mode"
|
||||
run = "dashboard-linter lint --strict --config .dashboard-lint.yaml {{vars.dashboard}}"
|
||||
description = "Lint the committed dashboards in strict mode"
|
||||
run = '''
|
||||
set -eu
|
||||
for file in {{vars.dashboards}}/windows-exporter-*.json; do
|
||||
dashboard-linter lint --strict --config .dashboard-lint.yaml "$file"
|
||||
done
|
||||
'''
|
||||
|
||||
[tasks.fmt]
|
||||
description = "Format all mixin Jsonnet sources"
|
||||
@@ -59,15 +70,24 @@ run = [
|
||||
]
|
||||
|
||||
[tasks.lint]
|
||||
description = "Check Jsonnet formatting, dashboard drift, and Prometheus rules"
|
||||
description = "Check Jsonnet formatting and lint, dashboard drift, and Prometheus rules"
|
||||
depends = ["rules", "custom-rules", "vendor", "lint-dashboards"]
|
||||
run = '''
|
||||
set -eu
|
||||
for file in {{vars.sources}}; do
|
||||
jsonnetfmt {{vars.fmt_flags}} "$file" | diff -u "$file" -
|
||||
jsonnet-lint -J vendor "$file"
|
||||
done
|
||||
out=$(mktemp -d)
|
||||
trap 'rm -rf "$out"' EXIT
|
||||
jsonnet -J vendor -S -m "$out" dashboard.jsonnet > /dev/null
|
||||
(cd "$out" && ls windows-exporter-*.json) > "$out/generated"
|
||||
(cd {{vars.dashboards}} && ls windows-exporter-*.json) | diff -u "$out/generated" - \
|
||||
|| { echo "{{vars.dashboards}} has missing or stale dashboards; run mise run dashboard"; exit 1; }
|
||||
for file in $(cat "$out/generated"); do
|
||||
diff -u {{vars.dashboards}}/"$file" "$out/$file" \
|
||||
|| { echo "{{vars.dashboards}}/$file is out of date; run mise run dashboard"; exit 1; }
|
||||
done
|
||||
jsonnet -J vendor -S dashboard.jsonnet | diff -u {{vars.dashboard}} - \
|
||||
|| { echo "{{vars.dashboard}} is out of date; run mise run dashboard"; exit 1; }
|
||||
promtool check rules windows_rules.yaml windows_alerts.yaml tests/custom_rules.yaml tests/custom_alerts.yaml
|
||||
pint --offline lint windows_rules.yaml windows_alerts.yaml
|
||||
pint --offline lint tests/custom_rules.yaml tests/custom_alerts.yaml
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Renders the dashboard for several collector selections and checks that every
|
||||
// layout reference has an element, every element is placed and no tab or row is
|
||||
// empty. Run with jsonnet -J vendor tests/dashboard.test.jsonnet.
|
||||
// Renders the dashboards for several collector selections and checks that every
|
||||
// layout reference has an element, every element is placed, no tab or row is
|
||||
// empty and every tab dashboard matches its tab. Run with
|
||||
// jsonnet -J vendor tests/dashboard.test.jsonnet.
|
||||
local mixin = import '../mixin.libsonnet';
|
||||
|
||||
local render(collectors, config={}) =
|
||||
@@ -55,6 +56,59 @@ assert metadata.spec.title == 'Custom title' : 'metadata: got title ' + metadata
|
||||
assert metadata.spec.description == 'Custom description' : 'metadata: got description ' + metadata.spec.description;
|
||||
assert metadata.spec.tags == ['prometheus', 'windows', 'windows_exporter', 'custom'] : 'metadata: got tags ' + std.manifestJson(metadata.spec.tags);
|
||||
|
||||
// Every tab renders as a dashboard of its own with the panels and rows of that
|
||||
// tab and only the variables its panels use.
|
||||
local dashboards(collectors, config={}) = (mixin { _config+:: { collectors: collectors(super.collectors) } + config }).grafanaDashboards;
|
||||
local defaults = dashboards(function(collectors) collectors);
|
||||
local full = defaults['windows-exporter.json'];
|
||||
assert full.metadata.name == 'windows-exporter-full' : 'full: got UID ' + full.metadata.name;
|
||||
assert full.spec.title == 'Windows Exporter / Full' : 'full: got title ' + full.spec.title;
|
||||
assert std.objectFields(defaults) == [
|
||||
'windows-exporter-cpu.json',
|
||||
'windows-exporter-disk.json',
|
||||
'windows-exporter-exporter.json',
|
||||
'windows-exporter-fleet.json',
|
||||
'windows-exporter-memory.json',
|
||||
'windows-exporter-network.json',
|
||||
'windows-exporter-overview.json',
|
||||
'windows-exporter-services.json',
|
||||
'windows-exporter.json',
|
||||
] : 'tab dashboards: got ' + std.join(', ', std.objectFields(defaults));
|
||||
assert std.all([
|
||||
local tab = std.filter(function(tab) tab.spec.title == dashboard.spec.title[std.length('Windows Exporter / '):], full.spec.layout.spec.tabs)[0];
|
||||
dashboard.spec.layout == tab.spec.layout
|
||||
&& std.objectFields(dashboard.spec.elements) == std.set(placed(tab.spec.layout))
|
||||
&& std.startsWith(dashboard.metadata.name, 'windows-exporter-')
|
||||
for dashboard in [defaults[name] for name in std.objectFields(defaults) if name != 'windows-exporter.json']
|
||||
]) : 'A tab dashboard differs from its tab';
|
||||
local linkTypes(dashboard) = [link.type for link in dashboard.spec.links];
|
||||
assert linkTypes(full) == ['link'] : 'full: got links ' + std.join(', ', linkTypes(full));
|
||||
assert linkTypes(defaults['windows-exporter-cpu.json']) == ['dashboards', 'link'] : 'cpu: got links ' + std.join(', ', linkTypes(defaults['windows-exporter-cpu.json']));
|
||||
local variableNames(dashboard) = [variable.spec.name for variable in dashboard.spec.variables];
|
||||
local annotationNames(dashboard) = [annotation.spec.name for annotation in dashboard.spec.annotations];
|
||||
local fleet = defaults['windows-exporter-fleet.json'];
|
||||
assert variableNames(fleet) == ['datasource', 'job', 'hostname'] : 'fleet: got variables ' + std.join(', ', variableNames(fleet));
|
||||
assert annotationNames(fleet) == ['Annotations & Alerts'] : 'fleet: got annotations ' + std.join(', ', annotationNames(fleet));
|
||||
assert std.length(std.findSubstr('/d/windows-exporter-overview?', std.manifestJson(fleet.spec.elements))) == 1 : 'fleet: hosts do not link to the Overview dashboard';
|
||||
assert std.length(std.findSubstr('dtab=Overview', std.manifestJson(full.spec.elements))) == 1 : 'full: hosts do not link to the Overview tab';
|
||||
// Without the Overview tab, hostnames in Fleet link nowhere.
|
||||
local withoutOverview = dashboards(function(collectors) collectors, { enableOverviewTab: false });
|
||||
assert std.all([
|
||||
std.length(std.findSubstr('Show details for', std.manifestJson(dashboard.spec.elements))) == 0
|
||||
for dashboard in [withoutOverview['windows-exporter.json'], withoutOverview['windows-exporter-fleet.json']]
|
||||
]) : 'fleet without overview: hostnames link to a missing Overview';
|
||||
assert !std.objectHas(withoutOverview, 'windows-exporter-overview.json') : 'fleet without overview: got an Overview dashboard';
|
||||
local cpu = defaults['windows-exporter-cpu.json'];
|
||||
assert variableNames(cpu) == ['datasource', 'job', 'hostname', 'instance'] : 'cpu: got variables ' + std.join(', ', variableNames(cpu));
|
||||
assert annotationNames(cpu) == ['Annotations & Alerts', 'Reboots'] : 'cpu: got annotations ' + std.join(', ', annotationNames(cpu));
|
||||
local processes = dashboards(only({ process: true }))['windows-exporter-processes.json'];
|
||||
assert variableNames(processes) == ['datasource', 'job', 'hostname', 'instance', 'process', 'process_top'] : 'processes: got variables ' + std.join(', ', variableNames(processes));
|
||||
local custom = dashboards(function(collectors) collectors, { dashboardUIDPrefix: 'win', dashboardTitlePrefix: 'Windows' });
|
||||
assert custom['windows-exporter-cpu.json'].metadata.name == 'win-cpu' : 'custom prefix: got UID ' + custom['windows-exporter-cpu.json'].metadata.name;
|
||||
assert custom['windows-exporter-cpu.json'].spec.title == 'Windows / CPU' : 'custom prefix: got title ' + custom['windows-exporter-cpu.json'].spec.title;
|
||||
assert custom['windows-exporter.json'].metadata.name == 'win-full' : 'custom prefix: got full UID ' + custom['windows-exporter.json'].metadata.name;
|
||||
assert std.objectFields(dashboards(function(collectors) collectors, { enableTabDashboards: false })) == ['windows-exporter.json'] : 'enableTabDashboards: false renders tab dashboards';
|
||||
|
||||
assert std.length(std.objectFields(results.all)) == 15 : 'all: got ' + std.join(', ', std.objectFields(results.all));
|
||||
assert expect('defaults', {
|
||||
CPU: ['Summary', 'Utilization', 'Scheduling', 'System calls and frequency'],
|
||||
|
||||
+22
-12
@@ -1,6 +1,7 @@
|
||||
## Sample dashboard for Windows Exporter
|
||||
## Sample dashboards for Windows Exporter
|
||||
|
||||
[windows-exporter-dashboard.json](windows-exporter-dashboard.json) is a Grafana dashboard for hosts monitored by windows_exporter.
|
||||
[windows-exporter-dashboard.json](windows-exporter-dashboard.json) is a Grafana dashboard for hosts monitored by windows_exporter, with all tabs described below.
|
||||
Each tab is also a shorter dashboard of its own, such as [windows-exporter-cpu.json](windows-exporter-cpu.json) or [windows-exporter-fleet.json](windows-exporter-fleet.json).
|
||||
It was originally inspired by [this dashboard in Chinese](https://grafana.com/grafana/dashboards/10467-windows-exporter-for-prometheus-dashboard-cn-v20230531/)
|
||||
and takes several ideas from Grafana's [windows-observ-lib](https://github.com/grafana/jsonnet-libs/tree/master/windows-observ-lib).
|
||||
|
||||
@@ -13,7 +14,16 @@ and takes several ideas from Grafana's [windows-observ-lib](https://github.com/g
|
||||
The process names in the GPU tab need the `process` collector.
|
||||
GPU temperature, fan, power and clock panels require WDDM 2.4 or newer and driver support; unsupported sensors are absent.
|
||||
|
||||
Import the JSON file through **Dashboards > New > Import** and pick the Prometheus data source in the **Data source** variable.
|
||||
Import the JSON files through **Dashboards > New > Import** and pick the Prometheus data source in the **Data source** variable.
|
||||
|
||||
| Dashboard | File | UID |
|
||||
|-----------|------|-----|
|
||||
| Windows Exporter / Full | [windows-exporter-dashboard.json](windows-exporter-dashboard.json) | `windows-exporter-full` |
|
||||
| Windows Exporter / `<tab>` | `windows-exporter-<tab>.json`, for example [windows-exporter-cpu.json](windows-exporter-cpu.json) | `windows-exporter-<tab>`, for example `windows-exporter-cpu` |
|
||||
|
||||
The tab dashboards show only the variables their panels use.
|
||||
The **Windows Exporter** dropdown in the links of the tab dashboards opens the other imported dashboards and keeps the time range and variables.
|
||||
Before these UIDs, the full dashboard used the UID `Kdaassddw`; importing the new file creates a second dashboard, so delete the old one afterwards.
|
||||
|
||||
### Variables
|
||||
|
||||
@@ -22,7 +32,7 @@ Import the JSON file through **Dashboards > New > Import** and pick the Promethe
|
||||
| Data source | The Prometheus data source to query. |
|
||||
| Job | One or more scrape jobs. |
|
||||
| Hostname | Narrows the fleet overview and the instance list to the selected hostnames. |
|
||||
| Instance | The host shown in all tabs except Fleet. |
|
||||
| Instance | The host shown in all tabs and dashboards except Fleet. |
|
||||
| Volume | Volumes shown in the Overview and Disk tabs. `HarddiskVolume*` are hidden. |
|
||||
| Network interface | Interfaces shown in the Overview and Network tabs. |
|
||||
| Process | One or more process names shown in the Processes tab, or All. |
|
||||
@@ -50,7 +60,7 @@ The **Reboots** annotation marks each reboot of the selected host on all graphs.
|
||||
| Time | Time zone, clock sync source, NTP time sources, clock offset and NTP round-trip delay. |
|
||||
| Exporter | Scrape status and duration, exporter version and uptime, collector status, duration, failures and timeouts, and the exporter's CPU, memory, handles and Go runtime. |
|
||||
|
||||
Click a hostname in the Fleet tab to open that host in the Overview tab.
|
||||
Click a hostname in the Fleet tab to open that host in the Overview tab. In the Fleet dashboard, it opens the Overview dashboard.
|
||||
|
||||
Each per-host tab starts with a row of current values, each with a sparkline
|
||||
of the time range behind it. Green, orange and red show health against fixed
|
||||
@@ -66,15 +76,15 @@ appear. I/O graphs combine read, write and other operations per process.
|
||||
|
||||
### Changing the dashboard
|
||||
|
||||
Don't edit the JSON file by hand. It is generated from Jsonnet with [grafonnet](https://github.com/grafana/grafonnet) as part of the [windows_exporter mixin](../contrib/mixin):
|
||||
Don't edit the JSON files by hand. They are generated from Jsonnet with [grafonnet](https://github.com/grafana/grafonnet) as part of the [windows_exporter mixin](../contrib/mixin):
|
||||
|
||||
- [dashboards/windows-exporter.libsonnet](../contrib/mixin/dashboards/windows-exporter.libsonnet) composes the dashboard from one file per tab.
|
||||
- [dashboards/windows-exporter.libsonnet](../contrib/mixin/dashboards/windows-exporter.libsonnet) composes the dashboards from one file per tab.
|
||||
- [dashboards/builders.libsonnet](../contrib/mixin/dashboards/builders.libsonnet) holds the panel, query, and layout builders.
|
||||
- [dashboards/styles.libsonnet](../contrib/mixin/dashboards/styles.libsonnet) shares the visualization defaults.
|
||||
|
||||
The generator writes the v2 schema directly, so it needs neither Grafana nor Prometheus.
|
||||
Install [mise](https://mise.jdx.dev/) and Go, then install the pinned tools and
|
||||
regenerate the file in `contrib/mixin` (use WSL on Windows):
|
||||
regenerate the files in `contrib/mixin` (use WSL on Windows):
|
||||
|
||||
```sh
|
||||
cd contrib/mixin
|
||||
@@ -83,10 +93,10 @@ mise install
|
||||
mise run dashboard
|
||||
```
|
||||
|
||||
`mise run dashboard` runs `jb install` to fetch grafonnet into `contrib/mixin/vendor` and renders the dashboard.
|
||||
`mise run lint` fails if the committed JSON file differs from the generated one.
|
||||
`mise run check-dashboards` rebuilds it and runs `git diff --exit-code`, as CI does before the mixin tests.
|
||||
Check new or changed queries in Grafana before you open a pull request, for example by importing the file into a local Grafana 13.
|
||||
`mise run dashboard` runs `jb install` to fetch grafonnet into `contrib/mixin/vendor` and renders the dashboards.
|
||||
`mise run lint` fails if the committed JSON files differ from the generated ones.
|
||||
`mise run check-dashboards` rebuilds them and runs `git diff --exit-code`, as CI does before the mixin tests.
|
||||
Check new or changed queries in Grafana before you open a pull request, for example by importing the files into a local Grafana 13.
|
||||
|
||||

|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
"apiVersion": "dashboard.grafana.app/v2",
|
||||
"kind": "Dashboard",
|
||||
"metadata": {
|
||||
"name": "Kdaassddw"
|
||||
"name": "windows-exporter-full"
|
||||
},
|
||||
"spec": {
|
||||
"annotations": [
|
||||
@@ -30311,7 +30311,7 @@
|
||||
"hideTimepicker": false,
|
||||
"to": "now"
|
||||
},
|
||||
"title": "Windows Exporter",
|
||||
"title": "Windows Exporter / Full",
|
||||
"variables": [
|
||||
{
|
||||
"kind": "DatasourceVariable",
|
||||
@@ -30443,39 +30443,6 @@
|
||||
"sort": "alphabeticalAsc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "QueryVariable",
|
||||
"spec": {
|
||||
"allowCustomValue": true,
|
||||
"current": {
|
||||
"text": "",
|
||||
"value": ""
|
||||
},
|
||||
"definition": "label_values(windows_os_hostname{job=~\"$job\", instance=\"$instance\"}, hostname)",
|
||||
"hide": "hideVariable",
|
||||
"includeAll": false,
|
||||
"multi": false,
|
||||
"name": "show_hostname",
|
||||
"options": [],
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"qryType": 1,
|
||||
"query": "label_values(windows_os_hostname{job=~\"$job\", instance=\"$instance\"}, hostname)",
|
||||
"refId": "PrometheusVariableQueryEditor-VariableQuery"
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refresh": "onTimeRangeChanged",
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": "alphabeticalAsc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "QueryVariable",
|
||||
"spec": {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,943 @@
|
||||
{
|
||||
"apiVersion": "dashboard.grafana.app/v2",
|
||||
"kind": "Dashboard",
|
||||
"metadata": {
|
||||
"name": "windows-exporter-services"
|
||||
},
|
||||
"spec": {
|
||||
"annotations": [
|
||||
{
|
||||
"kind": "AnnotationQuery",
|
||||
"spec": {
|
||||
"builtIn": true,
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"legacyOptions": {
|
||||
"type": "dashboard"
|
||||
},
|
||||
"name": "Annotations & Alerts",
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "-- Grafana --"
|
||||
},
|
||||
"group": "grafana",
|
||||
"kind": "DataQuery",
|
||||
"spec": {},
|
||||
"version": "v0"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "AnnotationQuery",
|
||||
"spec": {
|
||||
"enable": true,
|
||||
"hide": false,
|
||||
"iconColor": "orange",
|
||||
"legacyOptions": {
|
||||
"expr": "windows_system_boot_time_timestamp{job=~\"$job\", instance=\"$instance\"} * 1000 > $__from < $__to",
|
||||
"step": "1m",
|
||||
"tagKeys": "instance",
|
||||
"textFormat": "",
|
||||
"titleFormat": "Reboot",
|
||||
"useValueForTime": "on"
|
||||
},
|
||||
"name": "Reboots",
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {},
|
||||
"version": "v0"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"cursorSync": "Crosshair",
|
||||
"description": "Service states and automatic services that are not running on one Windows host.",
|
||||
"editable": true,
|
||||
"elements": {
|
||||
"panel-50": {
|
||||
"kind": "Panel",
|
||||
"spec": {
|
||||
"data": {
|
||||
"kind": "QueryGroup",
|
||||
"spec": {
|
||||
"queries": [
|
||||
{
|
||||
"kind": "PanelQuery",
|
||||
"spec": {
|
||||
"hidden": false,
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"editorMode": "code",
|
||||
"expr": "sum(windows_service_state{job=~\"$job\", instance=\"$instance\", state=\"running\"})",
|
||||
"instant": false,
|
||||
"legendFormat": "__auto",
|
||||
"range": true
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
}
|
||||
],
|
||||
"queryOptions": {
|
||||
"maxDataPoints": 100
|
||||
},
|
||||
"transformations": []
|
||||
}
|
||||
},
|
||||
"description": "Number of services currently in the running state, reported by the service collector. Compare unexpected drops with the stopped automatic services table and service change history.",
|
||||
"id": 50,
|
||||
"links": [],
|
||||
"title": "Running services",
|
||||
"vizConfig": {
|
||||
"group": "stat",
|
||||
"kind": "VizConfig",
|
||||
"spec": {
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"fixedColor": "text",
|
||||
"mode": "fixed"
|
||||
},
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "text",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"showPercentChange": false,
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
}
|
||||
},
|
||||
"version": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"panel-51": {
|
||||
"kind": "Panel",
|
||||
"spec": {
|
||||
"data": {
|
||||
"kind": "QueryGroup",
|
||||
"spec": {
|
||||
"queries": [
|
||||
{
|
||||
"kind": "PanelQuery",
|
||||
"spec": {
|
||||
"hidden": false,
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"editorMode": "code",
|
||||
"expr": "count(windows_service_state{job=~\"$job\", instance=\"$instance\", state=\"running\"} == 0 and on (name) windows_service_start_mode{job=~\"$job\", instance=\"$instance\", start_mode=\"auto\"} == 1) or vector(0)",
|
||||
"instant": false,
|
||||
"legendFormat": "__auto",
|
||||
"range": true
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
}
|
||||
],
|
||||
"queryOptions": {
|
||||
"maxDataPoints": 100
|
||||
},
|
||||
"transformations": []
|
||||
}
|
||||
},
|
||||
"description": "Services with start mode \"auto\" that are not running.",
|
||||
"id": 51,
|
||||
"links": [],
|
||||
"title": "Stopped auto services",
|
||||
"vizConfig": {
|
||||
"group": "stat",
|
||||
"kind": "VizConfig",
|
||||
"spec": {
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"showPercentChange": false,
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
}
|
||||
},
|
||||
"version": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"panel-52": {
|
||||
"kind": "Panel",
|
||||
"spec": {
|
||||
"data": {
|
||||
"kind": "QueryGroup",
|
||||
"spec": {
|
||||
"queries": [
|
||||
{
|
||||
"kind": "PanelQuery",
|
||||
"spec": {
|
||||
"hidden": false,
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"editorMode": "code",
|
||||
"expr": "sum(windows_service_state{job=~\"$job\", instance=\"$instance\", state=~\".* pending\"}) or vector(0)",
|
||||
"instant": false,
|
||||
"legendFormat": "__auto",
|
||||
"range": true
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
}
|
||||
],
|
||||
"queryOptions": {
|
||||
"maxDataPoints": 100
|
||||
},
|
||||
"transformations": []
|
||||
}
|
||||
},
|
||||
"description": "Services in a start, stop, pause or continue pending state. A service that stays pending is hung.",
|
||||
"id": 52,
|
||||
"links": [],
|
||||
"title": "Pending services",
|
||||
"vizConfig": {
|
||||
"group": "stat",
|
||||
"kind": "VizConfig",
|
||||
"spec": {
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"showPercentChange": false,
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
}
|
||||
},
|
||||
"version": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"panel-53": {
|
||||
"kind": "Panel",
|
||||
"spec": {
|
||||
"data": {
|
||||
"kind": "QueryGroup",
|
||||
"spec": {
|
||||
"queries": [
|
||||
{
|
||||
"kind": "PanelQuery",
|
||||
"spec": {
|
||||
"hidden": false,
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"editorMode": "code",
|
||||
"expr": "sum(windows_service_start_mode{job=~\"$job\", instance=\"$instance\", start_mode=\"disabled\"})",
|
||||
"instant": false,
|
||||
"legendFormat": "__auto",
|
||||
"range": true
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
}
|
||||
],
|
||||
"queryOptions": {
|
||||
"maxDataPoints": 100
|
||||
},
|
||||
"transformations": []
|
||||
}
|
||||
},
|
||||
"description": "Number of services configured with disabled startup. A disabled service cannot start until its startup mode changes; disabled services are not necessarily unhealthy.",
|
||||
"id": 53,
|
||||
"links": [],
|
||||
"title": "Disabled services",
|
||||
"vizConfig": {
|
||||
"group": "stat",
|
||||
"kind": "VizConfig",
|
||||
"spec": {
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"fixedColor": "text",
|
||||
"mode": "fixed"
|
||||
},
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "text",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"showPercentChange": false,
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
}
|
||||
},
|
||||
"version": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"panel-54": {
|
||||
"kind": "Panel",
|
||||
"spec": {
|
||||
"data": {
|
||||
"kind": "QueryGroup",
|
||||
"spec": {
|
||||
"queries": [
|
||||
{
|
||||
"kind": "PanelQuery",
|
||||
"spec": {
|
||||
"hidden": false,
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"editorMode": "code",
|
||||
"expr": "max by (name, state) (windows_service_state{job=~\"$job\", instance=\"$instance\"} == 1) and on (name) (windows_service_state{job=~\"$job\", instance=\"$instance\", state=\"running\"} == 0) and on (name) (windows_service_start_mode{job=~\"$job\", instance=\"$instance\", start_mode=\"auto\"} == 1)",
|
||||
"format": "table",
|
||||
"instant": true,
|
||||
"legendFormat": "__auto",
|
||||
"range": false
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
}
|
||||
],
|
||||
"queryOptions": {},
|
||||
"transformations": [
|
||||
{
|
||||
"group": "organize",
|
||||
"kind": "Transformation",
|
||||
"spec": {
|
||||
"options": {
|
||||
"excludeByName": {
|
||||
"Time": true,
|
||||
"Time 1": true,
|
||||
"Value": true
|
||||
},
|
||||
"includeByName": {},
|
||||
"indexByName": {
|
||||
"name": 0,
|
||||
"state": 1
|
||||
},
|
||||
"renameByName": {
|
||||
"name": "Service",
|
||||
"state": "State"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"description": "Services configured to start automatically that are not in the running state. Delayed-start and trigger-start services may show up here until they start.",
|
||||
"id": 54,
|
||||
"links": [],
|
||||
"title": "Automatic services not running",
|
||||
"vizConfig": {
|
||||
"group": "table",
|
||||
"kind": "VizConfig",
|
||||
"spec": {
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"cellOptions": {
|
||||
"type": "auto"
|
||||
},
|
||||
"filterable": false,
|
||||
"inspect": false,
|
||||
"minWidth": 60
|
||||
},
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"cellHeight": "sm",
|
||||
"enablePagination": false,
|
||||
"footer": {
|
||||
"countRows": false,
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"sum"
|
||||
],
|
||||
"show": false
|
||||
},
|
||||
"showHeader": true,
|
||||
"sortBy": [
|
||||
{
|
||||
"desc": false,
|
||||
"displayName": "Service"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"panel-55": {
|
||||
"kind": "Panel",
|
||||
"spec": {
|
||||
"data": {
|
||||
"kind": "QueryGroup",
|
||||
"spec": {
|
||||
"queries": [
|
||||
{
|
||||
"kind": "PanelQuery",
|
||||
"spec": {
|
||||
"hidden": false,
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"editorMode": "code",
|
||||
"expr": "windows_service_state{job=~\"$job\", instance=\"$instance\", state=\"running\"} and on (name) (changes(windows_service_state{job=~\"$job\", instance=\"$instance\", state=\"running\"}[$__range] @ end()) > 0)",
|
||||
"instant": false,
|
||||
"legendFormat": "{{name}}",
|
||||
"range": true
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
}
|
||||
],
|
||||
"queryOptions": {},
|
||||
"transformations": []
|
||||
}
|
||||
},
|
||||
"description": "Services that started or stopped in the selected time range.",
|
||||
"id": 55,
|
||||
"links": [],
|
||||
"title": "Service state changes",
|
||||
"vizConfig": {
|
||||
"group": "state-timeline",
|
||||
"kind": "VizConfig",
|
||||
"spec": {
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"fillOpacity": 90,
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineWidth": 0,
|
||||
"spanNulls": false
|
||||
},
|
||||
"mappings": [
|
||||
{
|
||||
"options": {
|
||||
"0": {
|
||||
"color": "red",
|
||||
"index": 0,
|
||||
"text": "not running"
|
||||
},
|
||||
"1": {
|
||||
"color": "green",
|
||||
"index": 1,
|
||||
"text": "running"
|
||||
}
|
||||
},
|
||||
"type": "value"
|
||||
}
|
||||
],
|
||||
"max": 1,
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "red",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "none"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"alignValue": "left",
|
||||
"legend": {
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": false
|
||||
},
|
||||
"mergeValues": false,
|
||||
"rowHeight": 1,
|
||||
"showValue": "never",
|
||||
"tooltip": {
|
||||
"hideZeros": false,
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
"version": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"layout": {
|
||||
"kind": "RowsLayout",
|
||||
"spec": {
|
||||
"rows": [
|
||||
{
|
||||
"kind": "RowsLayoutRow",
|
||||
"spec": {
|
||||
"collapse": false,
|
||||
"layout": {
|
||||
"kind": "GridLayout",
|
||||
"spec": {
|
||||
"items": [
|
||||
{
|
||||
"kind": "GridLayoutItem",
|
||||
"spec": {
|
||||
"element": {
|
||||
"kind": "ElementReference",
|
||||
"name": "panel-50"
|
||||
},
|
||||
"height": 4,
|
||||
"width": 6,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "GridLayoutItem",
|
||||
"spec": {
|
||||
"element": {
|
||||
"kind": "ElementReference",
|
||||
"name": "panel-51"
|
||||
},
|
||||
"height": 4,
|
||||
"width": 6,
|
||||
"x": 6,
|
||||
"y": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "GridLayoutItem",
|
||||
"spec": {
|
||||
"element": {
|
||||
"kind": "ElementReference",
|
||||
"name": "panel-52"
|
||||
},
|
||||
"height": 4,
|
||||
"width": 6,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "GridLayoutItem",
|
||||
"spec": {
|
||||
"element": {
|
||||
"kind": "ElementReference",
|
||||
"name": "panel-53"
|
||||
},
|
||||
"height": 4,
|
||||
"width": 6,
|
||||
"x": 18,
|
||||
"y": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"title": "Summary"
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "RowsLayoutRow",
|
||||
"spec": {
|
||||
"collapse": false,
|
||||
"layout": {
|
||||
"kind": "GridLayout",
|
||||
"spec": {
|
||||
"items": [
|
||||
{
|
||||
"kind": "GridLayoutItem",
|
||||
"spec": {
|
||||
"element": {
|
||||
"kind": "ElementReference",
|
||||
"name": "panel-54"
|
||||
},
|
||||
"height": 10,
|
||||
"width": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "GridLayoutItem",
|
||||
"spec": {
|
||||
"element": {
|
||||
"kind": "ElementReference",
|
||||
"name": "panel-55"
|
||||
},
|
||||
"height": 10,
|
||||
"width": 12,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"title": "State"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"links": [
|
||||
{
|
||||
"asDropdown": true,
|
||||
"icon": "external link",
|
||||
"includeVars": true,
|
||||
"keepTime": true,
|
||||
"tags": [
|
||||
"prometheus",
|
||||
"windows",
|
||||
"windows_exporter"
|
||||
],
|
||||
"targetBlank": false,
|
||||
"title": "Windows Exporter",
|
||||
"tooltip": "Dashboards for windows_exporter",
|
||||
"type": "dashboards",
|
||||
"url": ""
|
||||
},
|
||||
{
|
||||
"asDropdown": false,
|
||||
"icon": "doc",
|
||||
"includeVars": false,
|
||||
"keepTime": false,
|
||||
"tags": [],
|
||||
"targetBlank": true,
|
||||
"title": "windows_exporter",
|
||||
"tooltip": "",
|
||||
"type": "link",
|
||||
"url": "https://github.com/prometheus-community/windows_exporter"
|
||||
}
|
||||
],
|
||||
"liveNow": false,
|
||||
"preload": false,
|
||||
"tags": [
|
||||
"prometheus",
|
||||
"windows",
|
||||
"windows_exporter"
|
||||
],
|
||||
"timeSettings": {
|
||||
"autoRefresh": "1m",
|
||||
"autoRefreshIntervals": [
|
||||
"5s",
|
||||
"10s",
|
||||
"30s",
|
||||
"1m",
|
||||
"5m",
|
||||
"15m",
|
||||
"30m",
|
||||
"1h",
|
||||
"2h",
|
||||
"1d"
|
||||
],
|
||||
"fiscalYearStartMonth": 0,
|
||||
"from": "now-3h",
|
||||
"hideTimepicker": false,
|
||||
"to": "now"
|
||||
},
|
||||
"title": "Windows Exporter / Services",
|
||||
"variables": [
|
||||
{
|
||||
"kind": "DatasourceVariable",
|
||||
"spec": {
|
||||
"allowCustomValue": true,
|
||||
"current": {
|
||||
"text": "",
|
||||
"value": ""
|
||||
},
|
||||
"hide": "dontHide",
|
||||
"includeAll": false,
|
||||
"label": "Data source",
|
||||
"multi": false,
|
||||
"name": "datasource",
|
||||
"options": [],
|
||||
"pluginId": "prometheus",
|
||||
"refresh": "onDashboardLoad",
|
||||
"regex": "",
|
||||
"skipUrlSync": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "QueryVariable",
|
||||
"spec": {
|
||||
"allowCustomValue": true,
|
||||
"current": {
|
||||
"text": [
|
||||
"All"
|
||||
],
|
||||
"value": [
|
||||
"$__all"
|
||||
]
|
||||
},
|
||||
"definition": "label_values(windows_os_hostname, job)",
|
||||
"hide": "dontHide",
|
||||
"includeAll": true,
|
||||
"label": "Job",
|
||||
"multi": true,
|
||||
"name": "job",
|
||||
"options": [],
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"qryType": 1,
|
||||
"query": "label_values(windows_os_hostname, job)",
|
||||
"refId": "PrometheusVariableQueryEditor-VariableQuery"
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refresh": "onTimeRangeChanged",
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": "alphabeticalAsc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "QueryVariable",
|
||||
"spec": {
|
||||
"allowCustomValue": true,
|
||||
"current": {
|
||||
"text": [
|
||||
"All"
|
||||
],
|
||||
"value": [
|
||||
"$__all"
|
||||
]
|
||||
},
|
||||
"definition": "label_values(windows_os_hostname{job=~\"$job\"}, hostname)",
|
||||
"hide": "dontHide",
|
||||
"includeAll": true,
|
||||
"label": "Hostname",
|
||||
"multi": true,
|
||||
"name": "hostname",
|
||||
"options": [],
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"qryType": 1,
|
||||
"query": "label_values(windows_os_hostname{job=~\"$job\"}, hostname)",
|
||||
"refId": "PrometheusVariableQueryEditor-VariableQuery"
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refresh": "onTimeRangeChanged",
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": "alphabeticalAsc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "QueryVariable",
|
||||
"spec": {
|
||||
"allowCustomValue": true,
|
||||
"current": {
|
||||
"text": "",
|
||||
"value": ""
|
||||
},
|
||||
"definition": "label_values(windows_os_hostname{job=~\"$job\", hostname=~\"$hostname\"}, instance)",
|
||||
"hide": "dontHide",
|
||||
"includeAll": false,
|
||||
"label": "Instance",
|
||||
"multi": false,
|
||||
"name": "instance",
|
||||
"options": [],
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"qryType": 1,
|
||||
"query": "label_values(windows_os_hostname{job=~\"$job\", hostname=~\"$hostname\"}, instance)",
|
||||
"refId": "PrometheusVariableQueryEditor-VariableQuery"
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refresh": "onTimeRangeChanged",
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": "alphabeticalAsc"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,833 @@
|
||||
{
|
||||
"apiVersion": "dashboard.grafana.app/v2",
|
||||
"kind": "Dashboard",
|
||||
"metadata": {
|
||||
"name": "windows-exporter-time"
|
||||
},
|
||||
"spec": {
|
||||
"annotations": [
|
||||
{
|
||||
"kind": "AnnotationQuery",
|
||||
"spec": {
|
||||
"builtIn": true,
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"legacyOptions": {
|
||||
"type": "dashboard"
|
||||
},
|
||||
"name": "Annotations & Alerts",
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "-- Grafana --"
|
||||
},
|
||||
"group": "grafana",
|
||||
"kind": "DataQuery",
|
||||
"spec": {},
|
||||
"version": "v0"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "AnnotationQuery",
|
||||
"spec": {
|
||||
"enable": true,
|
||||
"hide": false,
|
||||
"iconColor": "orange",
|
||||
"legacyOptions": {
|
||||
"expr": "windows_system_boot_time_timestamp{job=~\"$job\", instance=\"$instance\"} * 1000 > $__from < $__to",
|
||||
"step": "1m",
|
||||
"tagKeys": "instance",
|
||||
"textFormat": "",
|
||||
"titleFormat": "Reboot",
|
||||
"useValueForTime": "on"
|
||||
},
|
||||
"name": "Reboots",
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {},
|
||||
"version": "v0"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"cursorSync": "Crosshair",
|
||||
"description": "Clock synchronization, NTP sources and clock offset of one Windows host.",
|
||||
"editable": true,
|
||||
"elements": {
|
||||
"panel-84": {
|
||||
"kind": "Panel",
|
||||
"spec": {
|
||||
"data": {
|
||||
"kind": "QueryGroup",
|
||||
"spec": {
|
||||
"queries": [
|
||||
{
|
||||
"kind": "PanelQuery",
|
||||
"spec": {
|
||||
"hidden": false,
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"editorMode": "code",
|
||||
"expr": "windows_time_timezone{job=~\"$job\", instance=\"$instance\"}",
|
||||
"format": "table",
|
||||
"instant": true,
|
||||
"legendFormat": "__auto",
|
||||
"range": false
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
}
|
||||
],
|
||||
"queryOptions": {},
|
||||
"transformations": []
|
||||
}
|
||||
},
|
||||
"description": "Needs the time collector, which is not enabled by default.",
|
||||
"id": 84,
|
||||
"links": [],
|
||||
"title": "Time zone",
|
||||
"vizConfig": {
|
||||
"group": "stat",
|
||||
"kind": "VizConfig",
|
||||
"spec": {
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "text",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": ""
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"colorMode": "none",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "/^timezone$/",
|
||||
"values": false
|
||||
},
|
||||
"showPercentChange": false,
|
||||
"textMode": "value",
|
||||
"wideLayout": true
|
||||
}
|
||||
},
|
||||
"version": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"panel-85": {
|
||||
"kind": "Panel",
|
||||
"spec": {
|
||||
"data": {
|
||||
"kind": "QueryGroup",
|
||||
"spec": {
|
||||
"queries": [
|
||||
{
|
||||
"kind": "PanelQuery",
|
||||
"spec": {
|
||||
"hidden": false,
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"editorMode": "code",
|
||||
"expr": "windows_time_clock_sync_source{job=~\"$job\", instance=\"$instance\"} == 1",
|
||||
"format": "table",
|
||||
"instant": true,
|
||||
"legendFormat": "__auto",
|
||||
"range": false
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
}
|
||||
],
|
||||
"queryOptions": {},
|
||||
"transformations": []
|
||||
}
|
||||
},
|
||||
"description": "Active Windows Time synchronization provider. A non-NTP provider can be expected on virtual machines; this requires the optional time collector.",
|
||||
"id": 85,
|
||||
"links": [],
|
||||
"title": "Clock sync source",
|
||||
"vizConfig": {
|
||||
"group": "stat",
|
||||
"kind": "VizConfig",
|
||||
"spec": {
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "text",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": ""
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"colorMode": "none",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "/^type$/",
|
||||
"values": false
|
||||
},
|
||||
"showPercentChange": false,
|
||||
"textMode": "value",
|
||||
"wideLayout": true
|
||||
}
|
||||
},
|
||||
"version": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"panel-86": {
|
||||
"kind": "Panel",
|
||||
"spec": {
|
||||
"data": {
|
||||
"kind": "QueryGroup",
|
||||
"spec": {
|
||||
"queries": [
|
||||
{
|
||||
"kind": "PanelQuery",
|
||||
"spec": {
|
||||
"hidden": false,
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"editorMode": "code",
|
||||
"expr": "windows_time_ntp_client_time_sources{job=~\"$job\", instance=\"$instance\"}",
|
||||
"instant": false,
|
||||
"legendFormat": "__auto",
|
||||
"range": true
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
}
|
||||
],
|
||||
"queryOptions": {
|
||||
"maxDataPoints": 100
|
||||
},
|
||||
"transformations": []
|
||||
}
|
||||
},
|
||||
"description": "Number of time sources the NTP client uses. 0 means the clock is not synchronized.",
|
||||
"id": 86,
|
||||
"links": [],
|
||||
"title": "NTP time sources",
|
||||
"vizConfig": {
|
||||
"group": "stat",
|
||||
"kind": "VizConfig",
|
||||
"spec": {
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "red",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "short"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"showPercentChange": false,
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
}
|
||||
},
|
||||
"version": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"panel-87": {
|
||||
"kind": "Panel",
|
||||
"spec": {
|
||||
"data": {
|
||||
"kind": "QueryGroup",
|
||||
"spec": {
|
||||
"queries": [
|
||||
{
|
||||
"kind": "PanelQuery",
|
||||
"spec": {
|
||||
"hidden": false,
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"editorMode": "code",
|
||||
"expr": "abs(windows_time_computed_time_offset_seconds{job=~\"$job\", instance=\"$instance\"})",
|
||||
"instant": false,
|
||||
"legendFormat": "__auto",
|
||||
"range": true
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
}
|
||||
],
|
||||
"queryOptions": {},
|
||||
"transformations": []
|
||||
}
|
||||
},
|
||||
"description": "Absolute offset between the system clock and the selected time source.",
|
||||
"id": 87,
|
||||
"links": [],
|
||||
"title": "Clock offset",
|
||||
"vizConfig": {
|
||||
"group": "stat",
|
||||
"kind": "VizConfig",
|
||||
"spec": {
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 0.5
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "s"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"showPercentChange": false,
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
}
|
||||
},
|
||||
"version": ""
|
||||
}
|
||||
}
|
||||
},
|
||||
"panel-88": {
|
||||
"kind": "Panel",
|
||||
"spec": {
|
||||
"data": {
|
||||
"kind": "QueryGroup",
|
||||
"spec": {
|
||||
"queries": [
|
||||
{
|
||||
"kind": "PanelQuery",
|
||||
"spec": {
|
||||
"hidden": false,
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"editorMode": "code",
|
||||
"expr": "windows_time_computed_time_offset_seconds{job=~\"$job\", instance=\"$instance\"}",
|
||||
"instant": false,
|
||||
"legendFormat": "clock offset",
|
||||
"range": true
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refId": "A"
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "PanelQuery",
|
||||
"spec": {
|
||||
"hidden": false,
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"editorMode": "code",
|
||||
"expr": "windows_time_ntp_round_trip_delay_seconds{job=~\"$job\", instance=\"$instance\"}",
|
||||
"instant": false,
|
||||
"legendFormat": "NTP round-trip delay",
|
||||
"range": true
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refId": "B"
|
||||
}
|
||||
}
|
||||
],
|
||||
"queryOptions": {},
|
||||
"transformations": []
|
||||
}
|
||||
},
|
||||
"description": "Signed offset from the selected time source and the NTP request round-trip delay, in seconds. Persistent offset or increased delay can affect time-sensitive applications; this compares the host to its chosen source and does not independently verify that source.",
|
||||
"id": 88,
|
||||
"links": [],
|
||||
"title": "Clock offset and NTP round-trip delay",
|
||||
"vizConfig": {
|
||||
"group": "timeseries",
|
||||
"kind": "VizConfig",
|
||||
"spec": {
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisBorderShow": false,
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "opacity",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"insertNulls": false,
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 4,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "s"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"mean",
|
||||
"max",
|
||||
"lastNotNull"
|
||||
],
|
||||
"displayMode": "table",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"hideZeros": false,
|
||||
"mode": "multi",
|
||||
"sort": "desc"
|
||||
}
|
||||
}
|
||||
},
|
||||
"version": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"layout": {
|
||||
"kind": "RowsLayout",
|
||||
"spec": {
|
||||
"rows": [
|
||||
{
|
||||
"kind": "RowsLayoutRow",
|
||||
"spec": {
|
||||
"collapse": false,
|
||||
"layout": {
|
||||
"kind": "GridLayout",
|
||||
"spec": {
|
||||
"items": [
|
||||
{
|
||||
"kind": "GridLayoutItem",
|
||||
"spec": {
|
||||
"element": {
|
||||
"kind": "ElementReference",
|
||||
"name": "panel-84"
|
||||
},
|
||||
"height": 4,
|
||||
"width": 6,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "GridLayoutItem",
|
||||
"spec": {
|
||||
"element": {
|
||||
"kind": "ElementReference",
|
||||
"name": "panel-85"
|
||||
},
|
||||
"height": 4,
|
||||
"width": 6,
|
||||
"x": 6,
|
||||
"y": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "GridLayoutItem",
|
||||
"spec": {
|
||||
"element": {
|
||||
"kind": "ElementReference",
|
||||
"name": "panel-86"
|
||||
},
|
||||
"height": 4,
|
||||
"width": 6,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "GridLayoutItem",
|
||||
"spec": {
|
||||
"element": {
|
||||
"kind": "ElementReference",
|
||||
"name": "panel-87"
|
||||
},
|
||||
"height": 4,
|
||||
"width": 6,
|
||||
"x": 18,
|
||||
"y": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"title": "Summary"
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "RowsLayoutRow",
|
||||
"spec": {
|
||||
"collapse": false,
|
||||
"layout": {
|
||||
"kind": "GridLayout",
|
||||
"spec": {
|
||||
"items": [
|
||||
{
|
||||
"kind": "GridLayoutItem",
|
||||
"spec": {
|
||||
"element": {
|
||||
"kind": "ElementReference",
|
||||
"name": "panel-88"
|
||||
},
|
||||
"height": 8,
|
||||
"width": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"title": "Clock"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"links": [
|
||||
{
|
||||
"asDropdown": true,
|
||||
"icon": "external link",
|
||||
"includeVars": true,
|
||||
"keepTime": true,
|
||||
"tags": [
|
||||
"prometheus",
|
||||
"windows",
|
||||
"windows_exporter"
|
||||
],
|
||||
"targetBlank": false,
|
||||
"title": "Windows Exporter",
|
||||
"tooltip": "Dashboards for windows_exporter",
|
||||
"type": "dashboards",
|
||||
"url": ""
|
||||
},
|
||||
{
|
||||
"asDropdown": false,
|
||||
"icon": "doc",
|
||||
"includeVars": false,
|
||||
"keepTime": false,
|
||||
"tags": [],
|
||||
"targetBlank": true,
|
||||
"title": "windows_exporter",
|
||||
"tooltip": "",
|
||||
"type": "link",
|
||||
"url": "https://github.com/prometheus-community/windows_exporter"
|
||||
}
|
||||
],
|
||||
"liveNow": false,
|
||||
"preload": false,
|
||||
"tags": [
|
||||
"prometheus",
|
||||
"windows",
|
||||
"windows_exporter"
|
||||
],
|
||||
"timeSettings": {
|
||||
"autoRefresh": "1m",
|
||||
"autoRefreshIntervals": [
|
||||
"5s",
|
||||
"10s",
|
||||
"30s",
|
||||
"1m",
|
||||
"5m",
|
||||
"15m",
|
||||
"30m",
|
||||
"1h",
|
||||
"2h",
|
||||
"1d"
|
||||
],
|
||||
"fiscalYearStartMonth": 0,
|
||||
"from": "now-3h",
|
||||
"hideTimepicker": false,
|
||||
"to": "now"
|
||||
},
|
||||
"title": "Windows Exporter / Time",
|
||||
"variables": [
|
||||
{
|
||||
"kind": "DatasourceVariable",
|
||||
"spec": {
|
||||
"allowCustomValue": true,
|
||||
"current": {
|
||||
"text": "",
|
||||
"value": ""
|
||||
},
|
||||
"hide": "dontHide",
|
||||
"includeAll": false,
|
||||
"label": "Data source",
|
||||
"multi": false,
|
||||
"name": "datasource",
|
||||
"options": [],
|
||||
"pluginId": "prometheus",
|
||||
"refresh": "onDashboardLoad",
|
||||
"regex": "",
|
||||
"skipUrlSync": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "QueryVariable",
|
||||
"spec": {
|
||||
"allowCustomValue": true,
|
||||
"current": {
|
||||
"text": [
|
||||
"All"
|
||||
],
|
||||
"value": [
|
||||
"$__all"
|
||||
]
|
||||
},
|
||||
"definition": "label_values(windows_os_hostname, job)",
|
||||
"hide": "dontHide",
|
||||
"includeAll": true,
|
||||
"label": "Job",
|
||||
"multi": true,
|
||||
"name": "job",
|
||||
"options": [],
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"qryType": 1,
|
||||
"query": "label_values(windows_os_hostname, job)",
|
||||
"refId": "PrometheusVariableQueryEditor-VariableQuery"
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refresh": "onTimeRangeChanged",
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": "alphabeticalAsc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "QueryVariable",
|
||||
"spec": {
|
||||
"allowCustomValue": true,
|
||||
"current": {
|
||||
"text": [
|
||||
"All"
|
||||
],
|
||||
"value": [
|
||||
"$__all"
|
||||
]
|
||||
},
|
||||
"definition": "label_values(windows_os_hostname{job=~\"$job\"}, hostname)",
|
||||
"hide": "dontHide",
|
||||
"includeAll": true,
|
||||
"label": "Hostname",
|
||||
"multi": true,
|
||||
"name": "hostname",
|
||||
"options": [],
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"qryType": 1,
|
||||
"query": "label_values(windows_os_hostname{job=~\"$job\"}, hostname)",
|
||||
"refId": "PrometheusVariableQueryEditor-VariableQuery"
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refresh": "onTimeRangeChanged",
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": "alphabeticalAsc"
|
||||
}
|
||||
},
|
||||
{
|
||||
"kind": "QueryVariable",
|
||||
"spec": {
|
||||
"allowCustomValue": true,
|
||||
"current": {
|
||||
"text": "",
|
||||
"value": ""
|
||||
},
|
||||
"definition": "label_values(windows_os_hostname{job=~\"$job\", hostname=~\"$hostname\"}, instance)",
|
||||
"hide": "dontHide",
|
||||
"includeAll": false,
|
||||
"label": "Instance",
|
||||
"multi": false,
|
||||
"name": "instance",
|
||||
"options": [],
|
||||
"query": {
|
||||
"datasource": {
|
||||
"name": "${datasource}"
|
||||
},
|
||||
"group": "prometheus",
|
||||
"kind": "DataQuery",
|
||||
"spec": {
|
||||
"qryType": 1,
|
||||
"query": "label_values(windows_os_hostname{job=~\"$job\", hostname=~\"$hostname\"}, instance)",
|
||||
"refId": "PrometheusVariableQueryEditor-VariableQuery"
|
||||
},
|
||||
"version": "v0"
|
||||
},
|
||||
"refresh": "onTimeRangeChanged",
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": "alphabeticalAsc"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user