Notifications for Policies and Alerts

Hello, I wanted to know if somebody can help me with a script to only send me a notification of when a device goes offline and then we the device goes offline. In the default policy, it gives me an alert that the device goes offline, which is good, but then it keeps giving me alerts every 5 minutes which is not what I want. I just want one alert that tells me offline and that is it, and when it comes back online. My company recently had another RMM by Pulseway, and it would give us a notification when the device goes online or the device goes offline, or when the device was restarting, or when the device was shutting down. Please let me know. I contacted support via email and they told me to request the script here. Please help me with this issue.

HI @disaza

Let us get it done for you. I will update you here once required monitor script is completed.

Thanks

Hello, thank you for the response back and for helping me with this issue. May I get an ETA on the script?

Hi @disaza

We will complete and share you the script by tomorrow.

Thanks
Kannan

Alright, please keep me updated on the script.

Hi @disaza

We have created two custom monitoring scripts for you.

1.Script monitor to alert you (one time) when devices go offline,
Refer https://scripts.comodo.com/frontend/web/topic/alert-if-a-device-restarts-or-shutdown
Note: Set the monitoring duration as 1 minute

2.Script monitor to alert you (one time) when devices come online,
Refer: https://scripts.comodo.com/frontend/web/topic/alert-if-the-device-goes-online
Note: Set the monitoring duration as 5 Minutes

Please refer below wiki guide to configure custom script monitors,
https://wiki.comodo.com/frontend/web/topic/how-to-use-custom-script-procedure-monitoring

We are also developing combined procedure to alert you for both online and offline status. We will alert you once completed :slight_smile:

Let us know your feedback.

Thanks,
Kannan

To apply these scripts, I have to copy the script itself and then paste it in a custom script procedure?

Hi @disaza

It is possible to get indentation error if copy and paste the content directly.

So please import the .json format file to the Configuration Templates -> procedures and then you directly use it in the custom monitoring section using “Add Existing procedure” option

please refer this screenshot

Thanks
Kunavarthini

Considering this is a procedure if I apply it to a monitoring profile, an alert needs to be triggered for the procedure to run. I want it to be an alert, that is constantly checking the status of the endpoint and sends me an alert whenever the device goes offline or shuts down/restart or when it comes back online, etc. Please help me.

Hi,

If you copy the script and paste it directly in the custom monitoring, you may get some indentation (space) error during execution.

So we would like to suggest you another way to add the script to the custom monitoring

Step 1:Please download the .json format file of the script

Step 2:Import that file in Procedures.
Go to Configuration Templates -> Procedures -> click import button, select the script.Now the script will added to the procedures.

Step 3: You can now reuse the imported script procedure in the custom monitoring.
i)Go to Configuration Templates -> Profiles -> Select a profile
ii) In that profile -> go to monitoring -> Go to conditons tab -> select/add a condition.
a) A " Edit «Custom script» Condition" dialog box opens and click “Add Existing Procedure” button, and then you can select the script.

Please refer this guide https://wiki.comodo.com/frontend/web/topic/how-to-use-custom-script-procedure-monitoring for detailed information on custom monitoring

Hi,

We have combined the two scripts as a single script.

you can use this script to get an alert if the device goes online/offline.

Please refer this https://scripts.comodo.com/frontend/web/topic/alert-if-device-went-offline-or-online

To Whom It May Concern,
I see that these alerts don’t give me notifications for when the device loses connectivity and gains connectivity. I also need the network connectivity alerts to know if a device is offline or online in terms of Network. Please let me know if this script does support my request,

Can you guys provide me the script for the default online device status. I would like to try to alter it myself

Hi @disaza

Yes sure. We will update you the script to check online device status of the device by Monday.

Thanks

Hi @disaza

We are debugging the script “Send alert on device status based on network connectivity”. We will share you the script by tomorrow.

Hi @disaza

Script solution to monitor network connectivity status of the device would not be a good option as procedure communication will be cut off in the case of network down. We recommend you to use below script monitors to alert online/offline status as the scripts would work based on scheduled windows events.

1.Script monitor to alert you (one time) when devices go offline,
Refer https://scripts.comodo.com/frontend/web/topic/alert-if-a-device-restarts-or-shutdown
Note: Set the monitoring duration as 1 minute

2.Script monitor to alert you (one time) when devices come online,
Refer: https://scripts.comodo.com/frontend/web/topic/alert-if-the-device-goes-online
Note: Set the monitoring duration as 5 Minutes

3.Script to get an alert if the device goes online/offline.
Refer https://scripts.comodo.com/frontend/web/topic/alert-if-device-went-offline-or-online

Please let us know your feedback