Quantcast
Channel: Zenoss Community: Message List
Viewing all articles
Browse latest Browse all 1097

Re: Monitor windows update service in stop state zenoss shuld send alert if it starts

$
0
0

Finally spent some time to put togather this script and it did the job. Basicly the script is getting feed from one file(haveing IP address's) one line at a time and if the service is up on that host it will generate a alert

 

 

 

=================================

#!/bin/bash

while read line;

do

/opt/zenoss/libexec/wmic -U Domain\\Administrator%$password //$line \

"select State from Win32_Service where Name='wuauserv'" \

| egrep "^wuauserv\|Running$" >/dev/null 2>&1

 

if [ $? -eq 0 ]; then

/opt/zenoss/bin/zensendevent -c /App/Fail -s Critical -i $line Windows Update Running on $line

fi

done < hosts

=====================================


Viewing all articles
Browse latest Browse all 1097

Trending Articles