Skip to content

Commit da36022

Browse files
committed
Added metadata for application pool uptime
1 parent 3871dc7 commit da36022

File tree

8 files changed

+100
-0
lines changed

8 files changed

+100
-0
lines changed

receiver/iisreceiver/documentation.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ The current state of the application pool.
2020
| ---- | ----------- | ---------- |
2121
| {state} | Gauge | Int |
2222
23+
### iis.application_pool.uptime
24+
25+
The application pools uptime period since the last restart.
26+
27+
| Unit | Metric Type | Value Type |
28+
| ---- | ----------- | ---------- |
29+
| {ms} | Gauge | Int |
30+
2331
### iis.connection.active
2432
2533
Number of active connections.

receiver/iisreceiver/internal/metadata/generated_config.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/iisreceiver/internal/metadata/generated_config_test.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/iisreceiver/internal/metadata/generated_metrics.go

Lines changed: 57 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/iisreceiver/internal/metadata/generated_metrics_test.go

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/iisreceiver/internal/metadata/testdata/config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ all_set:
33
metrics:
44
iis.application_pool.state:
55
enabled: true
6+
iis.application_pool.uptime:
7+
enabled: true
68
iis.connection.active:
79
enabled: true
810
iis.connection.anonymous:
@@ -36,6 +38,8 @@ none_set:
3638
metrics:
3739
iis.application_pool.state:
3840
enabled: false
41+
iis.application_pool.uptime:
42+
enabled: false
3943
iis.connection.active:
4044
enabled: false
4145
iis.connection.anonymous:

receiver/iisreceiver/metadata.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ metrics:
138138
iis.application_pool.state:
139139
description: The current state of the application pool.
140140
unit: "{state}"
141+
gauge:
142+
value_type: int
143+
enabled: true
144+
iis.application_pool.uptime:
145+
description: The application pools uptime period since the last restart.
146+
unit: "{ms}"
141147
gauge:
142148
value_type: int
143149
enabled: true

receiver/iisreceiver/recorder.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,9 @@ var appPoolPerfCounterRecorders = []perfCounterRecorderConf{
110110
"Current Application Pool State": func(mb *metadata.MetricsBuilder, ts pcommon.Timestamp, val float64) {
111111
mb.RecordIisApplicationPoolStateDataPoint(ts, int64(val))
112112
},
113+
"Current Application Pool Uptime": func(mb *metadata.MetricsBuilder, ts pcommon.Timestamp, val float64) {
114+
mb.RecordIisApplicationPoolUptimeDataPoint(ts, int64(val))
115+
},
113116
},
114117
},
115118
}

0 commit comments

Comments
 (0)