Xymon Mailing List Archive search

Monitor Windows service if installed

9 messages in this thread

list Colin Coe · Mon, 11 Oct 2021 10:38:36 +0800 ·
Hey all

Is there a way to alert if a particular Windows service is installed but
not running?

Thanks
list Zak Beck · Mon, 11 Oct 2021 08:16:01 +0000 ·
Hi

https://www.xymon.com/help/manpages/man5/analysis.cfg.5.html

You need to use the svc directive in analysis.cfg. You can alert on whether the service is started or stopped, and the startup setting. This should work with both the BBWIN client and the Powershell client.

Cheers

Zak

From: Xymon <xymon-bounces at xymon.com> On Behalf Of Colin Coe
Sent: 11 October 2021 03:39
To: Xymon Mailing List <xymon at xymon.com>
Subject: [External] [Xymon] Monitor Windows service if installed

This message is from an EXTERNAL SENDER - be CAUTIOUS, particularly with links and attachments.
quoted from Colin Coe

Hey all

Is there a way to alert if a particular Windows service is installed but not running?

Thanks


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. Your privacy is important to us. Accenture uses your personal data only in compliance with data protection laws. For further information on how Accenture processes your personal data, please see our privacy statement at https://www.accenture.com/us-en/privacy-policy.

www.accenture.com
list Colin Coe · Tue, 12 Oct 2021 05:53:52 +0800 ·
Thanks Zak but not quote what I was looking for.

A service installed on approx half our Windows VDI nodes randomly stops.  I
want the 'svcs' to go red if:
- the service is installed; and
- the service is not running.

Any ideas?
quoted from Zak Beck


On Mon, 11 Oct 2021 at 16:16, Beck, Zak <user-aada0fa38bf8@xymon.invalid> wrote:
Hi


https://www.xymon.com/help/manpages/man5/analysis.cfg.5.html


You need to use the svc directive in analysis.cfg. You can alert on
whether the service is started or stopped, and the startup setting. This
should work with both the BBWIN client and the Powershell client.


Cheers


Zak


*From:* Xymon <xymon-bounces at xymon.com> *On Behalf Of *Colin Coe
*Sent:* 11 October 2021 03:39
*To:* Xymon Mailing List <xymon at xymon.com>
*Subject:* [External] [Xymon] Monitor Windows service if installed


This message is from an EXTERNAL SENDER - be CAUTIOUS, particularly with
links and attachments.


Hey all


Is there a way to alert if a particular Windows service is installed but
not running?


Thanks


This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise confidential information. If you have
received it in error, please notify the sender immediately and delete the
original. Any other use of the e-mail by you is prohibited. Where allowed
by local law, electronic communications with Accenture and its affiliates,
including e-mail and instant messaging (including content), may be scanned
by our systems for the purposes of information security and assessment of
internal compliance with Accenture policy. Your privacy is important to us.
Accenture uses your personal data only in compliance with data protection
laws. For further information on how Accenture processes your personal
data, please see our privacy statement at
https://www.accenture.com/us-en/privacy-policy.


www.accenture.com
list Tom Schmidt · Mon, 11 Oct 2021 16:25:18 -0600 ·
Colin,
  An example from what I use to monitor that the Xymon Powershell
Client service is running, I have this in the server/etc/analysis.cfg
file:

# Windows Powershell client - WinPSClient
CLASS=powershell
        SVC     XymonPSClient startup=automatic status=%(start|started)

If the XymonPSClient service is not running or is not configured to
automatically start, then the alert for the service will be red.  If
the service is not installed, it likewise will go red.

Tom
quoted from Colin Coe

On Mon, Oct 11, 2021 at 3:55 PM Colin Coe <user-5b250cd7a540@xymon.invalid> wrote:
Thanks Zak but not quote what I was looking for.

A service installed on approx half our Windows VDI nodes randomly stops.  I want the 'svcs' to go red if:
- the service is installed; and
- the service is not running.

Any ideas?


On Mon, 11 Oct 2021 at 16:16, Beck, Zak <user-aada0fa38bf8@xymon.invalid> wrote:
Hi


https://www.xymon.com/help/manpages/man5/analysis.cfg.5.html


You need to use the svc directive in analysis.cfg. You can alert on whether the service is started or stopped, and the startup setting. This should work with both the BBWIN client and the Powershell client.


Cheers


Zak


From: Xymon <xymon-bounces at xymon.com> On Behalf Of Colin Coe
Sent: 11 October 2021 03:39
To: Xymon Mailing List <xymon at xymon.com>
Subject: [External] [Xymon] Monitor Windows service if installed


This message is from an EXTERNAL SENDER - be CAUTIOUS, particularly with links and attachments.


Hey all


Is there a way to alert if a particular Windows service is installed but not running?


Thanks


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. Your privacy is important to us. Accenture uses your personal data only in compliance with data protection laws. For further information on how Accenture processes your personal data, please see our privacy statement at https://www.accenture.com/us-en/privacy-policy.

www.accenture.com
list Colin Coe · Tue, 12 Oct 2021 06:38:21 +0800 ·
Thanks but how to make it go only if it is installed *and* not running?
quoted from Tom Schmidt

On Tue, 12 Oct 2021 at 06:25, Tom Schmidt <user-d34f6118b459@xymon.invalid> wrote:
Colin,
  An example from what I use to monitor that the Xymon Powershell
Client service is running, I have this in the server/etc/analysis.cfg
file:

# Windows Powershell client - WinPSClient
CLASS=powershell
        SVC     XymonPSClient startup=automatic status=%(start|started)

If the XymonPSClient service is not running or is not configured to
automatically start, then the alert for the service will be red.  If
the service is not installed, it likewise will go red.

Tom

On Mon, Oct 11, 2021 at 3:55 PM Colin Coe <user-5b250cd7a540@xymon.invalid> wrote:
Thanks Zak but not quote what I was looking for.

A service installed on approx half our Windows VDI nodes randomly
stops.  I want the 'svcs' to go red if:
- the service is installed; and
- the service is not running.

Any ideas?


On Mon, 11 Oct 2021 at 16:16, Beck, Zak <user-aada0fa38bf8@xymon.invalid> wrote:
Hi


https://www.xymon.com/help/manpages/man5/analysis.cfg.5.html


You need to use the svc directive in analysis.cfg. You can alert on
whether the service is started or stopped, and the startup setting. This
should work with both the BBWIN client and the Powershell client.


Cheers


Zak


From: Xymon <xymon-bounces at xymon.com> On Behalf Of Colin Coe
Sent: 11 October 2021 03:39
To: Xymon Mailing List <xymon at xymon.com>
Subject: [External] [Xymon] Monitor Windows service if installed


This message is from an EXTERNAL SENDER - be CAUTIOUS, particularly
with links and attachments.


Hey all


Is there a way to alert if a particular Windows service is installed
but not running?


Thanks


This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise confidential information. If you have
received it in error, please notify the sender immediately and delete the
original. Any other use of the e-mail by you is prohibited. Where allowed
by local law, electronic communications with Accenture and its affiliates,
including e-mail and instant messaging (including content), may be scanned
by our systems for the purposes of information security and assessment of
internal compliance with Accenture policy. Your privacy is important to us.
Accenture uses your personal data only in compliance with data protection
laws. For further information on how Accenture processes your personal
data, please see our privacy statement at
https://www.accenture.com/us-en/privacy-policy.

www.accenture.com
list Tom Schmidt · Mon, 11 Oct 2021 20:25:39 -0600 ·
Colin,
    There is not a configuration in Xymon to do that.  It would
require a custom external script to monitor and alert like you desire,
to only alert if a service is installed but not started.  I assume you
want the alert to be green or clear if the service is not installed.
quoted from Colin Coe

Tom

On Mon, Oct 11, 2021 at 4:38 PM Colin Coe <user-5b250cd7a540@xymon.invalid> wrote:
Thanks but how to make it go only if it is installed *and* not running?

On Tue, 12 Oct 2021 at 06:25, Tom Schmidt <user-d34f6118b459@xymon.invalid> wrote:
Colin,
  An example from what I use to monitor that the Xymon Powershell
Client service is running, I have this in the server/etc/analysis.cfg
file:

# Windows Powershell client - WinPSClient
CLASS=powershell
        SVC     XymonPSClient startup=automatic status=%(start|started)

If the XymonPSClient service is not running or is not configured to
automatically start, then the alert for the service will be red.  If
the service is not installed, it likewise will go red.

Tom

On Mon, Oct 11, 2021 at 3:55 PM Colin Coe <user-5b250cd7a540@xymon.invalid> wrote:
Thanks Zak but not quote what I was looking for.

A service installed on approx half our Windows VDI nodes randomly stops.  I want the 'svcs' to go red if:
- the service is installed; and
- the service is not running.

Any ideas?


On Mon, 11 Oct 2021 at 16:16, Beck, Zak <user-aada0fa38bf8@xymon.invalid> wrote:
Hi


https://www.xymon.com/help/manpages/man5/analysis.cfg.5.html


You need to use the svc directive in analysis.cfg. You can alert on whether the service is started or stopped, and the startup setting. This should work with both the BBWIN client and the Powershell client.


Cheers


Zak


From: Xymon <xymon-bounces at xymon.com> On Behalf Of Colin Coe
Sent: 11 October 2021 03:39
To: Xymon Mailing List <xymon at xymon.com>
Subject: [External] [Xymon] Monitor Windows service if installed


This message is from an EXTERNAL SENDER - be CAUTIOUS, particularly with links and attachments.


Hey all


Is there a way to alert if a particular Windows service is installed but not running?


Thanks


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. Your privacy is important to us. Accenture uses your personal data only in compliance with data protection laws. For further information on how Accenture processes your personal data, please see our privacy statement at https://www.accenture.com/us-en/privacy-policy.

www.accenture.com
list Alan Ford · Tue, 12 Oct 2021 03:25:08 +0000 ·
Colin,
The external script is the way to do it.
Use either xymondlog or xymonxlog(for xml output)
Like this

xymon xymonserver "xymondlog servname.svc"

and you can first check to see if the service exists, then check to see if its started...

You could get even trickier and use an external script to create a file in analysis.d for that servername (eg. svc_servername.cfg)
With this in it.

HOST=servername
   SVC "Name of service" "status=%^stop" RED


Alan Ford
quoted from Tom Schmidt


-----Original Message-----
From: Xymon <xymon-bounces at xymon.com> On Behalf Of Tom Schmidt
Sent: Tuesday, 12 October 2021 12:26 PM
To: Colin Coe <user-5b250cd7a540@xymon.invalid>
Cc: Xymon Mailing List <xymon at xymon.com>
Subject: [EXT] Re: [Xymon] [External] Monitor Windows service if installed

Colin,
    There is not a configuration in Xymon to do that.  It would require a custom external script to monitor and alert like you desire, to only alert if a service is installed but not started.  I assume you want the alert to be green or clear if the service is not installed.

Tom

On Mon, Oct 11, 2021 at 4:38 PM Colin Coe <user-5b250cd7a540@xymon.invalid> wrote:
Thanks but how to make it go only if it is installed *and* not running?

On Tue, 12 Oct 2021 at 06:25, Tom Schmidt <user-d34f6118b459@xymon.invalid> wrote:
Colin,
  An example from what I use to monitor that the Xymon Powershell
Client service is running, I have this in the server/etc/analysis.cfg
file:

# Windows Powershell client - WinPSClient CLASS=powershell
        SVC     XymonPSClient startup=automatic status=%(start|started)

If the XymonPSClient service is not running or is not configured to
automatically start, then the alert for the service will be red.  If
the service is not installed, it likewise will go red.

Tom

On Mon, Oct 11, 2021 at 3:55 PM Colin Coe <user-5b250cd7a540@xymon.invalid> wrote:
Thanks Zak but not quote what I was looking for.

A service installed on approx half our Windows VDI nodes randomly stops.  I want the 'svcs' to go red if:
- the service is installed; and
- the service is not running.

Any ideas?


On Mon, 11 Oct 2021 at 16:16, Beck, Zak <user-aada0fa38bf8@xymon.invalid> wrote:
Hi


https://www.xymon.com/help/manpages/man5/analysis.cfg.5.html


You need to use the svc directive in analysis.cfg. You can alert on whether the service is started or stopped, and the startup setting. This should work with both the BBWIN client and the Powershell client.


Cheers


Zak


From: Xymon <xymon-bounces at xymon.com> On Behalf Of Colin Coe
Sent: 11 October 2021 03:39
To: Xymon Mailing List <xymon at xymon.com>
Subject: [External] [Xymon] Monitor Windows service if installed


This message is from an EXTERNAL SENDER - be CAUTIOUS, particularly with links and attachments.


Hey all


Is there a way to alert if a particular Windows service is installed but not running?


Thanks


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. Your privacy is important to us. Accenture uses your personal data only in compliance with data protection laws. For further information on how Accenture processes your personal data, please see our privacy statement at https://www.accenture.com/us-en/privacy-policy.

www.accenture.com
Note: This email, including any attachments, has been sent by AWP Australia Pty Ltd (ABN 52 097 227 177) trading as Allianz Global Assistance and is intended solely for the addressee. It is confidential, may contain personal information and may be subject to legal professional privilege. If you have received this by mistake, confidentiality and any legal privilege are not waived or lost and we ask that you contact the sender and delete and destroy this and any other copies. In relation to any lawful use you may make of the contents of this email, you must ensure that you comply with the Privacy Act (C'th) 1988 and you should note that the contents may be subject to copyright and therefore may not be reproduced, communicated or adapted without the express consent of the owner of the copyright. Allianz Global Assistance will not be liable in connection with any data corruption, delay, computer virus or unauthorised access, interception, or amendment to the contents of this email. If you no longer want to receive messages from us, please contact us at Allianz Global Assistance, PO Box 162 Toowong, Qld, 4066, ph +61 7 3305 7000.
list Jeremy Ruffer · Tue, 12 Oct 2021 07:27:10 +0100 ·
Hi Colin,

I use BBWin for this.

If the service isn't installed it is ignored but if it does exist it must
be running or it will go red.

HTH

Jeremy
quoted from Colin Coe


On Mon, 11 Oct 2021, 22:55 Colin Coe, <user-5b250cd7a540@xymon.invalid> wrote:
Thanks Zak but not quote what I was looking for.

A service installed on approx half our Windows VDI nodes randomly stops.
I want the 'svcs' to go red if:
- the service is installed; and
- the service is not running.

Any ideas?


On Mon, 11 Oct 2021 at 16:16, Beck, Zak <user-aada0fa38bf8@xymon.invalid> wrote:
Hi


https://www.xymon.com/help/manpages/man5/analysis.cfg.5.html


You need to use the svc directive in analysis.cfg. You can alert on
whether the service is started or stopped, and the startup setting. This
should work with both the BBWIN client and the Powershell client.


Cheers


Zak


*From:* Xymon <xymon-bounces at xymon.com> *On Behalf Of *Colin Coe
*Sent:* 11 October 2021 03:39
*To:* Xymon Mailing List <xymon at xymon.com>
*Subject:* [External] [Xymon] Monitor Windows service if installed


This message is from an EXTERNAL SENDER - be CAUTIOUS, particularly with
links and attachments.


Hey all


Is there a way to alert if a particular Windows service is installed but
not running?


Thanks


This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise confidential information. If you have
received it in error, please notify the sender immediately and delete the
original. Any other use of the e-mail by you is prohibited. Where allowed
by local law, electronic communications with Accenture and its affiliates,
including e-mail and instant messaging (including content), may be scanned
by our systems for the purposes of information security and assessment of
internal compliance with Accenture policy. Your privacy is important to us.
Accenture uses your personal data only in compliance with data protection
laws. For further information on how Accenture processes your personal
data, please see our privacy statement at
https://www.accenture.com/us-en/privacy-policy.


www.accenture.com
list Zak Beck · Tue, 12 Oct 2021 07:49:06 +0000 ·
Hi

It depends on how it is stopping or not running. If the service is stopping but still shows as ?started? in the Services control panel, then maybe you could monitor the process behind the service? Then it depends on whether the process is running or hung.

To monitor a process you should be able to use the PROC directive in analysis.cfg. To find the process name, go to Task Manager -> Services, right-click the service (it must be running) and select ?Go to details?, it will take you to the process name on the Details tab. This process should be listed on the [procs] page and the [cpu] page (analysis.cfg will turn the procs test red if the process is not there).

Of course if the nature of ?not running? is that the process is still present but doing nothing, I would think most bets are off.

Zak
quoted from Colin Coe

From: Colin Coe <user-5b250cd7a540@xymon.invalid>
Sent: 11 October 2021 22:54
To: Beck, Zak <user-aada0fa38bf8@xymon.invalid>
Cc: Xymon Mailing List <xymon at xymon.com>
Subject: Re: [External] [Xymon] Monitor Windows service if installed

Thanks Zak but not quote what I was looking for.

A service installed on approx half our Windows VDI nodes randomly stops.  I want the 'svcs' to go red if:
- the service is installed; and
- the service is not running.

Any ideas?


On Mon, 11 Oct 2021 at 16:16, Beck, Zak <user-aada0fa38bf8@xymon.invalid<mailto:user-aada0fa38bf8@xymon.invalid>> wrote:

Hi

https://www.xymon.com/help/manpages/man5/analysis.cfg.5.html<https://urldefense.proofpoint.com/v2/url?u=https-3A__www.xymon.com_help_manpages_man5_analysis.cfg.5.html&d=DwMFaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=S-aLwpx-PHBTBMIG_c2JczRC0SfuZCmsiH9Iams25FI&m=7LXi29xuhqF277zepRG4bw9Nq8QKYsyY06-ASwA0-ew&s=vfq7Tu_B8mlvKnXb_1P8rzLSEBQPUn08sd9gmCwcv9c&e=>;
signature

You need to use the svc directive in analysis.cfg. You can alert on whether the service is started or stopped, and the startup setting. This should work with both the BBWIN client and the Powershell client.

Cheers

Zak

quoted from Colin Coe
From: Xymon <xymon-bounces at xymon.com<mailto:xymon-bounces at xymon.com>> On Behalf Of Colin Coe
Sent: 11 October 2021 03:39
To: Xymon Mailing List <xymon at xymon.com<mailto:xymon at xymon.com>>
Subject: [External] [Xymon] Monitor Windows service if installed

This message is from an EXTERNAL SENDER - be CAUTIOUS, particularly with links and attachments.

Hey all

Is there a way to alert if a particular Windows service is installed but not running?

Thanks


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited. Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy. Your privacy is important to us. Accenture uses your personal data only in compliance with data protection laws. For further information on how Accenture processes your personal data, please see our privacy statement at https://www.accenture.com/us-en/privacy-policy.

www.accenture.com<http://www.accenture.com>;