KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

Monitoring Status of Many Services

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
jromariz



Joined: 03 Apr 2002
Posts: 264
Location: Brasil

PostPosted: Tue Jul 26, 2011 1:34 pm    Post subject: Monitoring Status of Many Services Reply with quote

Hi,

Would like your help in an issue: today I have to monitor 18 different services on 10 different servers, that makes 180 different tests! Would it be possible to create only one test per server that would monitor all 18 services? I was trying to use "NT Event Log" test but I´m facing a problem: if, for example, 5 services stop at the same time, how would the operator identify wich services are having problem if only one test is performing?

Any ideas?

Thanks for helping.

Regards,

Jromariz.
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12792
Location: USA

PostPosted: Tue Jul 26, 2011 1:59 pm    Post subject: Reply with quote

If you just want to check that service was not stopped, you may use "Report about all events" option for NT Event Log test.
If you want to check that service really works and responds to commands, you should use Service test method (one test per service).

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
AlexL



Joined: 18 Jul 2006
Posts: 62
Location: Switzerland

PostPosted: Wed Jul 27, 2011 7:01 am    Post subject: Re: Monitoring Status of Many Services Reply with quote

jromariz wrote:
Would like your help in an issue: today I have to monitor 18 different services on 10 different servers, that makes 180 different tests! Would it be possible to create only one test per server that would monitor all 18 services?


I am using the Microsoft's SC.EXE command line utility in this generic script

Code:
@ECHO OFF
setlocal enabledelayedexpansion
SET not_running=
SET skip=
SET count=
FOR /F "tokens=2" %%a IN ('SC \\%1 QUERY ^| FIND /I "SERVICE_NAME: "') DO SET "var=!var! %%a"
FOR %%a IN (%*) DO CALL :next %%a %var%
IF NOT "%not_running%"=="" (
   ECHO ScriptRes:Bad:Missing: %not_running%
) ELSE (
   ECHO ScriptRes:Ok:%count% of %count% OK
)
GOTO :EOF
:next
IF NOT DEFINED skip SET skip=1 & GOTO :EOF
SET match=
SET serviceut=%1
:loop
IF /I %serviceut%==%2 SET match=1 & SET /A count=count+1
SHIFT
IF NOT %2.==. GOTO :loop
IF NOT DEFINED match SET not_running=%not_running% %serviceut%

with these Params:

<SERVER> <service> <service> ....

where <service> is the "service name" (one word, w/o blanks), not the "display name". On Bad status, the Reply lists the services which do not run.

Alex
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index