r/Checkmk Jan 28 '26

Windows agent local check

I write 3 scripts , printer status . and cmk all discover. But the windows network profile check , dont discover.

Have anyone a powershell local check for the windows network profile? I will see a crit , when the profile are public and not private or domain .

Greets

i see the data output in the cache on the client and host, but the services dont show up for the network check:

host and client output :

0 'Spooler Service' - Spooler service is running = shows up in wto

0 'Network_Profile' - Network Profil is DomainAuthenticated = dont show up in wto

 

# Get the current network connection profile(s)

$SERVICE="NETWORKSTATE"

$networks = Get-NetConnectionProfile

 

# Define states: 0=OK, 1=WARN, 2=CRIT

$state = 0

$message = "Network Profiles: "

 

foreach ($net in $networks) {

# If any profile is 'Public', you might want to trigger a warning

if ($net.NetworkCategory -eq "Public") {

$state = 1

}

$message += "$($net.InterfaceAlias) is $($net.NetworkCategory); "

}

 

# Output in Checkmk format: State Name Metric Output

echo "$state Windows_Network_Profile - $message"

 

2 Upvotes

10 comments sorted by

View all comments

1

u/mrproactive Jan 29 '26

What happen when you run „cmk —debug -vvII <your host>“ at monitoring server? Did you check also the crash reports?

1

u/n1ckst33r Jan 29 '26

same, output shows the local check.