mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-20 11:46:36 +00:00
net: expose operation status of nic (#1956)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -277,6 +277,8 @@ windows_exporter_collector_timeout{collector="udp"} 0
|
||||
# TYPE windows_net_nic_address_info gauge
|
||||
# HELP windows_net_nic_info A metric with a constant '1' value labeled with the network interface's general information.
|
||||
# TYPE windows_net_nic_info gauge
|
||||
# HELP windows_net_nic_operation_status The operational status for the interface as defined in RFC 2863 as IfOperStatus.
|
||||
# TYPE windows_net_nic_operation_status gauge
|
||||
# HELP windows_net_output_queue_length_packets (Network.OutputQueueLength)
|
||||
# TYPE windows_net_output_queue_length_packets gauge
|
||||
# HELP windows_net_packets_outbound_discarded_total (Network.PacketsOutboundDiscarded)
|
||||
|
||||
@@ -66,7 +66,8 @@ try {
|
||||
throw $_
|
||||
}
|
||||
|
||||
$output_diff = Compare-Object ((Get-Content 'e2e-output.txt' | Out-String).Trim()) ((Get-Content "$($temp_dir)/e2e-output.txt" | Out-String).Trim())
|
||||
# Compare the expected and actual output
|
||||
$output_diff = Compare-Object (Get-Content 'e2e-output.txt' | Where-Object { $_ -ne "" }) (Get-Content "$($temp_dir)/e2e-output.txt" | Where-Object { $_ -ne "" })
|
||||
|
||||
# Fail if differences in output are detected
|
||||
if (-not ($null -eq $output_diff)) {
|
||||
@@ -74,6 +75,7 @@ if (-not ($null -eq $output_diff)) {
|
||||
|
||||
Write-Host "STDOUT"
|
||||
Get-Content "$($temp_dir)/windows_exporter.log"
|
||||
Write-Host "----------------------------------------"
|
||||
Write-Host "STDERR"
|
||||
Get-Content "$($temp_dir)/windows_exporter_error.log"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user