Forum Discussion
mnagel
5 years agoProfessor
I am incorporating this into my resource check script. For now, the first item I am testing is Windows_DHCP, which requires that the DHCP Server role is installed (we have an auto.winfeatures property that is populated by a PropertySource. I don't recall where we got it, somewhere in these forums IIRC :). The PS code is simple:
hostname=hostProps.get("system.hostname")
my_query="Select NAME from Win32_serverfeature"
def session = WMI.open(hostname);
import com.santaba.agent.groovyapi.win32.WMI
def result = session.queryAll("CIMv2", my_query, 15);
println "WinFeatures=" + result.NAME
If this list does not include DHCP Server and we have Windows_DHCP assigned, it will trigger a warning. I plan to extend this to catch more stale categories.
My check script tests a bunch of things, including lack of any FQDN or expected FQDNs, lack of NetFlow data (the new heartbeat datasource is not helpful there as it does not care if valid data arrives), and other stuff that can go wooorng.
Related Content
- 2 years ago
- 2 months ago