Check All Services Which Set To Automatic Mode Are Running

Hi All,

This is my first post emoticons_wink.png  OK, straight to the point:

Attached template is based on VBScript and will check status of all services on the Windows based machines. If those services which set to automatic are not running script will increase "Statistic" counter. I have set threshold to CRITICAL = "1", as there is no real reason why AUTOMATIC service should not be running (there are some exceptions of course). The template will also report back names (Service Display Name) of those services which are set to automatic and not running. This is handled by "Massage" variable and will be visible in SAM, so, you can see in SolarWinds SAM all you need straight away.

You can also define exceptions. Well, this can be improved to make it bit more easier to manage. At the moment you will need to modify VBScript itself. Just open it and you will see straight away the line of code which you need to copy-pase. Add additional exception if you need to.

Thank you very much for using it,

Best of luck,

Alex

Parents
  • In addition to the monitoring, I always like to couple it with a report.  This aids in alerting.

    select

    n.caption [Node]

    ,cast(substring(ARD,MultiValueStastics, 11,5) as numeric(5,0)) [Service Down]

    ,substring(ARD.MultiValueMessages, 37, 500) [ServiceNames]

    from nodes n with (nolock)

    inner join APM_AlertsAndReportsData ARD with (nolock) on (ARD.nodeid=n.nodeid)

    where (ARD.ComponentStatus like 'Crit%' and ARD.ApplicationName like 'Auto%')

    Order by [Service Down] Desc

    pastedImage_0.png

Comment
  • In addition to the monitoring, I always like to couple it with a report.  This aids in alerting.

    select

    n.caption [Node]

    ,cast(substring(ARD,MultiValueStastics, 11,5) as numeric(5,0)) [Service Down]

    ,substring(ARD.MultiValueMessages, 37, 500) [ServiceNames]

    from nodes n with (nolock)

    inner join APM_AlertsAndReportsData ARD with (nolock) on (ARD.nodeid=n.nodeid)

    where (ARD.ComponentStatus like 'Crit%' and ARD.ApplicationName like 'Auto%')

    Order by [Service Down] Desc

    pastedImage_0.png

Children
  • Oou yes, definitely emoticons_happy.png Well done. From my experience, when we first apply this template across all nodes in infrastructure - it picks up sooooo many problems, that we just have to use reporting to start with to go through all of them, before we enable alerts themselves.

  • Thank you for adding the report - very useful.  When I tried it I got "Query not valid" due to a typo.  Fixing that yielded no results as the app name didn't match.  Then the string split was slightly out.  So I tweaked it slightly to match the original template:

    select

    a.n.caption [Node]

    ,cast(substring(ARD.MultiValueStatistics, 11,5) as

    numeric(5,0)) [Service Down]

    ,substring(ARD.MultiValueMessages, 31, 500) [ServiceNames]

    from nodes n with (nolock)

    inner join APM_AlertsAndReportsData ARD with (nolock) on

    (ARD.nodeid=n.nodeid)

    where (ARD.ComponentStatus like 'Crit%' and

    ARD.ApplicationName like 'Check Automatic Services Are Running')

    Order by [Service Down] Desc

  • This is a great addition.  I'm trying to run get this report created and am encountering the *query not valid* exception.

    Assuming I'm just doing something wrong. I'm trying to create a new report (Web Manager, Manage Reports, Create New Report, Add Content: Custom Table, Advanced Database Query; when using this or the suggestion below from gcow, both show the query not valid exception.

    I found the string in question that should be included in the report via this simple SQL query:

    SELECT * FROM [dbo].[APM_AlertsAndReportsData]

    where ComponentName='Check Automatic Services Are Running' AND ComponentStatus='Critical'

    Desired Value contained in MultiValueMessages

    Can someone please point me in the right direction to get the report working correctly?