Alert for automatic services not started

Need new test, action, option? Post request here.
meppyman
Posts: 118
Joined: Sun Sep 06, 2009 1:53 am
Location: Melbourne

Alert for automatic services not started

Post by meppyman »

Is there a way (maybe with WMI?) to monitor if all services set to automatic are started? That would be handy when not needing to monitor every service individually.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Is there a way (maybe with WMI?) to monitor if all services set to automatic are started? That would be handy when not needing to monitor every service individually.
Sure. Such example listed in the manual.
===================
The query: SELECT Name FROM Win32_Service WHERE Started=0 AND StartMode='Auto' shows all services which have not started and have the start mode configured to "Automatic".
===================
Set "Alert if row count is > than 0" option.

PS Please use "whish list" forum when you need some option that is not available in our software.

Regards
Alex
meppyman
Posts: 118
Joined: Sun Sep 06, 2009 1:53 am
Location: Melbourne

Post by meppyman »

Hi Alex,

thank you so much for the fast and helpful response, I am presales but am now convinced that HostMonitor is worth the investment and will be buying the Enterprise version at the end of trial period.
KS-Soft wrote:
PS Please use "whish list" forum when you need some option that is not available in our software.
All due respect but last time I was chastised for not using Wish List and this time for using it... you need a forum for people to ask questions when they don't know if it is a feature or not :D
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Yeah, it might be hard to find all options if you just started using HostMonitor. May be we just need to add "Newbie" forum and move all questions from that forum to appropriate sections from time to time :roll:

Regards
Alex
meppyman
Posts: 118
Joined: Sun Sep 06, 2009 1:53 am
Location: Melbourne

Post by meppyman »

Is there an easy option to add to the SQL that will ignore SysmonLog as that is often stopped on servers. I currently set it to alert if row count > 1 but would be nice to just ignore that service.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Not sure I understand the question. Are you asking about SQL query that you are using for ODBC logging or you are talking about WQL query used for WMI test?
If we are talking about WQL then you may easily add some conditions to the query. E.g.
SELECT Name FROM Win32_Service WHERE (Started=0) AND (StartMode='Auto') AND (NAME<>'SysmonLog')
http://msdn.microsoft.com/en-us/library ... S.85).aspx

Regards
Alex
meppyman
Posts: 118
Joined: Sun Sep 06, 2009 1:53 am
Location: Melbourne

Post by meppyman »

Yes my apologies, you are correct. I should have said WQL (Subset of SQL for WMI by MS definition). Thanks that will do it and was pretty much what I had guessed it would be, appreciate the help!
Last edited by meppyman on Thu Sep 10, 2009 4:21 pm, edited 1 time in total.
meppyman
Posts: 118
Joined: Sun Sep 06, 2009 1:53 am
Location: Melbourne

Post by meppyman »

When I add that to the Query I get an empty reply and the query fails with an unknown status. I can change the status to OK for instance not available but worried that if something stops the query working it will return ok then also?
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

If HostMonitor will not be able to execute query at all, it will set Unknown status anyway (regardless of "If instance not available" option)

Regards
Alex
meppyman
Posts: 118
Joined: Sun Sep 06, 2009 1:53 am
Location: Melbourne

Post by meppyman »

If it returns NULL does that get taken as not being able to execute? Trying to figure out how to return something else but WQL is fairly limited. Just changed it back to looking for >1 and removed the NAME check.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

If it returns NULL does that get taken as not being able to execute
Not really. null is still good response from remote system.
You may try to setup test for dead system or system with disabled WMI, you will get Unknown status and error message in Reply field.

Regards
Alex
meppyman
Posts: 118
Joined: Sun Sep 06, 2009 1:53 am
Location: Melbourne

Post by meppyman »

OK so why is my query not working then? It returns unknown for the NULL response. The query works, I tested it in WMI Explorer ok, but when used for the test it thinks there is a problem.
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Why not? As I see everything works fine.
Just set "If instance not available, set Ok status" option.

Regards
Alex
meppyman
Posts: 118
Joined: Sun Sep 06, 2009 1:53 am
Location: Melbourne

Post by meppyman »

and if the instance becomes unavailable for some other reason will it change to BAD or stay as OK?
meppyman
Posts: 118
Joined: Sun Sep 06, 2009 1:53 am
Location: Melbourne

Post by meppyman »

Also is there a way to view the result so we can see quickly what services are down without logging on to the remote server?
Post Reply