I want to restart a service in a time window (between 05:00 and 18:00) outside this time window only a notification e-mail. Is this possible in PRTG?
Article Comments
Attention: This article is a record of a conversation with the Paessler support team. The information in this conversation is not updated to preserve the historical record. As a result, some of the information or recommendations in this conversation might be out of date.
It is possible by setting up two notifications. One that sends only Email, another one as "Execute Program" notification utilizing "ServiceRestart" executable from here. Configure schedules for each notification and apply them accordingly so that only the desired one is active in the respective period. Make sure to configure triggers for both notifications in "Notifications" tab for the sensor in question.
Also make sure to NOT use the "restart service" option inside the WMI Service sensor, since this option can either be active or not, but it cannot be bound to only work in specific timeframes. Restarting is then taken care of by the aforementioned notification that restarts the service then.
Kind regards.
Aug, 2016 - Permalink
It is possible by setting up two notifications. One that sends only Email, another one as "Execute Program" notification utilizing "ServiceRestart" executable from here. Configure schedules for each notification and apply them accordingly so that only the desired one is active in the respective period. Make sure to configure triggers for both notifications in "Notifications" tab for the sensor in question.
Also make sure to NOT use the "restart service" option inside the WMI Service sensor, since this option can either be active or not, but it cannot be bound to only work in specific timeframes. Restarting is then taken care of by the aforementioned notification that restarts the service then.
Kind regards.
Aug, 2016 - Permalink