mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-04 09:36:35 +00:00
Merge pull request #1059 from kaffarell/master
Added WebService uptime metric in iis collector
This commit is contained in:
@@ -69,6 +69,7 @@ type IISCollector struct {
|
|||||||
CurrentConnections *prometheus.Desc
|
CurrentConnections *prometheus.Desc
|
||||||
CurrentISAPIExtensionRequests *prometheus.Desc
|
CurrentISAPIExtensionRequests *prometheus.Desc
|
||||||
CurrentNonAnonymousUsers *prometheus.Desc
|
CurrentNonAnonymousUsers *prometheus.Desc
|
||||||
|
ServiceUptime *prometheus.Desc
|
||||||
TotalBytesReceived *prometheus.Desc
|
TotalBytesReceived *prometheus.Desc
|
||||||
TotalBytesSent *prometheus.Desc
|
TotalBytesSent *prometheus.Desc
|
||||||
TotalAnonymousUsers *prometheus.Desc
|
TotalAnonymousUsers *prometheus.Desc
|
||||||
@@ -242,6 +243,12 @@ func NewIISCollector() (Collector, error) {
|
|||||||
[]string{"site"},
|
[]string{"site"},
|
||||||
nil,
|
nil,
|
||||||
),
|
),
|
||||||
|
ServiceUptime: prometheus.NewDesc(
|
||||||
|
prometheus.BuildFQName(Namespace, subsystem, "service_uptime"),
|
||||||
|
"Number of seconds the WebService is up (WebService.ServiceUptime)",
|
||||||
|
[]string{"site"},
|
||||||
|
nil,
|
||||||
|
),
|
||||||
TotalBytesReceived: prometheus.NewDesc(
|
TotalBytesReceived: prometheus.NewDesc(
|
||||||
prometheus.BuildFQName(Namespace, subsystem, "received_bytes_total"),
|
prometheus.BuildFQName(Namespace, subsystem, "received_bytes_total"),
|
||||||
"Number of data bytes that have been received by the Web service (WebService.TotalBytesReceived)",
|
"Number of data bytes that have been received by the Web service (WebService.TotalBytesReceived)",
|
||||||
@@ -845,6 +852,7 @@ type perflibWebService struct {
|
|||||||
CurrentConnections float64 `perflib:"Current Connections"`
|
CurrentConnections float64 `perflib:"Current Connections"`
|
||||||
CurrentISAPIExtensionRequests float64 `perflib:"Current ISAPI Extension Requests"`
|
CurrentISAPIExtensionRequests float64 `perflib:"Current ISAPI Extension Requests"`
|
||||||
CurrentNonAnonymousUsers float64 `perflib:"Current NonAnonymous Users"`
|
CurrentNonAnonymousUsers float64 `perflib:"Current NonAnonymous Users"`
|
||||||
|
ServiceUptime float64 `perflib:"Service Uptime"`
|
||||||
|
|
||||||
TotalBytesReceived float64 `perflib:"Total Bytes Received"`
|
TotalBytesReceived float64 `perflib:"Total Bytes Received"`
|
||||||
TotalBytesSent float64 `perflib:"Total Bytes Sent"`
|
TotalBytesSent float64 `perflib:"Total Bytes Sent"`
|
||||||
@@ -925,6 +933,12 @@ func (c *IISCollector) collectWebService(ctx *ScrapeContext, ch chan<- prometheu
|
|||||||
app.CurrentNonAnonymousUsers,
|
app.CurrentNonAnonymousUsers,
|
||||||
app.Name,
|
app.Name,
|
||||||
)
|
)
|
||||||
|
ch <- prometheus.MustNewConstMetric(
|
||||||
|
c.ServiceUptime,
|
||||||
|
prometheus.GaugeValue,
|
||||||
|
app.ServiceUptime,
|
||||||
|
app.Name,
|
||||||
|
)
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.TotalBytesReceived,
|
c.TotalBytesReceived,
|
||||||
prometheus.CounterValue,
|
prometheus.CounterValue,
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ Name | Description | Type | Labels
|
|||||||
`windows_iis_current_connections` | The number of active connections to the web service | counter | `site`
|
`windows_iis_current_connections` | The number of active connections to the web service | counter | `site`
|
||||||
`windows_iis_current_isapi_extension_requests` | The number of [ISAPI extension](https://docs.microsoft.com/en-us/previous-versions/iis/6.0-sdk/ms525172(v=vs.90)) requests that are being processed simultaneously by the web service | counter | `site`
|
`windows_iis_current_isapi_extension_requests` | The number of [ISAPI extension](https://docs.microsoft.com/en-us/previous-versions/iis/6.0-sdk/ms525172(v=vs.90)) requests that are being processed simultaneously by the web service | counter | `site`
|
||||||
`windows_iis_current_non_anonymous_users` | The number of users who currently have a nonanonymous request pending with the web service | counter | `site`
|
`windows_iis_current_non_anonymous_users` | The number of users who currently have a nonanonymous request pending with the web service | counter | `site`
|
||||||
`windows_iis_service_uptime` | The uptime for the web service or a Web site (seconds) | counter | `site`
|
`windows_iis_service_uptime` | The uptime for the web service or a Web site (seconds) | gauge | `site`
|
||||||
`windows_iis_received_bytes_total` | The total bytes of data that have been received by the web service since the service started | counter | `site`
|
`windows_iis_received_bytes_total` | The total bytes of data that have been received by the web service since the service started | counter | `site`
|
||||||
`windows_iis_sent_bytes_total` | The number of data bytes that have been sent by the web service since the service started | counter | `site`
|
`windows_iis_sent_bytes_total` | The number of data bytes that have been sent by the web service since the service started | counter | `site`
|
||||||
`windows_iis_anonymous_users_total` | The number of users who have established an anonymous request since the web service started | counter | `site`
|
`windows_iis_anonymous_users_total` | The number of users who have established an anonymous request since the web service started | counter | `site`
|
||||||
|
|||||||
Reference in New Issue
Block a user