Ad Widget

Collapse

Execute Action on certain time of day?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GPegel
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2015
    • 113

    #1

    Execute Action on certain time of day?

    I'm using Zabbix version 2.4.6. in a production environment and I was wondering if it is possible to execute an Action on a certain time of the day?

    Let me explain what I mean.

    I have a cluster of 9 servers who are running the same application. Unfortunately, this application is written by a third-party company and I discovered that the application has a memory leak. So, to prevent the application of crashing I reset the application every day at 12:00 at Server 1. Ten minutes later the application on Server 2 gets a restart, again, ten minutes later the application on Server 3 gets a restart and so on. At this moment I use the Windows Task Scheduler to execute a batch file to restart the application on every server.

    What I would like to do is to let Zabbix take care of this. My idea is to create these steps in an Action:

    For Server 1:
    1. If it's 12:00 then go to step 2 else do nothing
    2. Stop the process of the application by sending a remote command
    3. Wait 5 minutes to be sure the process has stopped
    4. Start the application by sending a remote command

    For Server 2:
    1. If it's 12:10 then go to step 2 else do nothing
    2. Stop the process of the application by sending a remote command
    3. Wait 5 minutes to be sure the process has stopped
    4. Start the application by sending a remote command

    For Server 3:
    1. If it's 12:20 then go to step 2 else do nothing
    2. Stop the process of the application by sending a remote command
    3. Wait 5 minutes to be sure the process has stopped
    4. Start the application by sending a remote command

    ... etc

    Steps 2,3 and 4 are not difficult to accomplish but it's about the first step. Is this possible within my current Zabbix version?
Working...