logical_disk: add bitlocker status sub-collector (#2077)

This commit is contained in:
Jan-Otto Kröpke
2025-06-16 12:48:23 +02:00
committed by GitHub
parent 3e8693f1e3
commit 34cfda306b
13 changed files with 623 additions and 283 deletions

View File

@@ -22,7 +22,7 @@ import (
"fmt"
"unsafe"
"github.com/prometheus-community/windows_exporter/internal/headers/guid"
"github.com/go-ole/go-ole"
"golang.org/x/sys/windows"
)
@@ -152,7 +152,7 @@ func GetIfEntry2Ex(row *MIB_IF_ROW2) error {
// locally unique identifier (LUID) for the interface.
//
// https://learn.microsoft.com/en-us/windows/win32/api/netioapi/nf-netioapi-convertinterfaceguidtoluid
func ConvertInterfaceGUIDToLUID(guid guid.GUID) (uint64, error) {
func ConvertInterfaceGUIDToLUID(guid ole.GUID) (uint64, error) {
var luid uint64
ret, _, _ := procConvertInterfaceGuidToLuid.Call(
uintptr(unsafe.Pointer(&guid)),

View File

@@ -21,7 +21,7 @@ import (
"encoding/binary"
"fmt"
"github.com/prometheus-community/windows_exporter/internal/headers/guid"
"github.com/go-ole/go-ole"
)
// MIB_TCPROW_OWNER_PID structure for IPv4.
@@ -120,7 +120,7 @@ const (
type MIB_IF_ROW2 struct {
InterfaceLuid uint64
InterfaceIndex uint32
InterfaceGuid guid.GUID
InterfaceGuid ole.GUID
Alias [IF_MAX_STRING_SIZE + 1]uint16
Description [IF_MAX_STRING_SIZE + 1]uint16
PhysicalAddressLength uint32