One of the most complicated aspects of automation is to automate tasks that happen because something else triggers them. It鈥檚 relatively easy to manually execute a task 鈥 unless it is on a lot of servers, then it鈥檚 not so easy 鈥 and, you can leverage tools to schedule tasks (again reasonably easy on a limited number of servers), but as soon as you think about going to the next level of automation and doing that off of different events, that gets really hard.
The main reason this gets hard is that you need to send a 鈥渢rigger鈥 when that event happens and usually this isn鈥檛 on the same server. It is cross-infrastructure communication. Then, you need to have something that 鈥渞eceives鈥 the trigger. That listener needs to understand what it is receiving and then figure out what to go do because of that event. Most organizations are not going to build these capabilities themselves 鈥 it鈥檚 just too time consuming. So, what ends up happening is that you either make this a manual process or you鈥檒l script it as a scheduled task with delays in between (if this is even possible 鈥 some tasks just can鈥檛 be done that way). Or, what happens in most cases is that you just don鈥檛 try to connect the two tasks together. Sometimes distributed job scheduling solutions will try to trigger based on events, sometimes they don鈥檛. It depends on the solution and often how you implement your workflows.
At 探花大神, we have spent a significant amount of time developing the functionality to trigger server tasks and workflows off of events. These could be events internal to the server, they could be from other servers in your infrastructure or even third party applications. 探花大神鈥檚 server management tools can ingest basically a Webhook from anywhere and that can kick off an action. Those actions could include server tasks, data processing tasks, user management tasks, security tasks, load balancing, monitoring, and many, many more.
Structurally, here鈥檚 how it works:
- Set up a command in 探花大神 by going to the commands tab (make sure that you select whether this is a Linux or Windows task at the top, the user with which to run the command, and the servers it should run on). Note that your command can be quite complicated. Remember that 探花大神 has the ability to 鈥渃hain鈥 tasks together as well as the ability to 鈥渟plit鈥 tasks (i.e. instruct multiple servers to execute the command.
- After inputting the task that you would like to automate, simply set the command鈥檚 launch event, to 鈥淩un on Trigger (webhook)鈥, name the trigger.
- Save your task.
That鈥檚 it 鈥 you鈥檙e ready to go. When your event happens, it will automatically trigger the command you want. Simple. That鈥檚 the beauty of what we鈥檝e built at 探花大神 鈥 we are taking really complex system administration tasks and making them simple with the platform we鈥榲e built.
Using Event Based Triggers to Automate Tasks Across Servers
Now that we have told you how to do this, let鈥檚 talk about some simple uses of this capability.
- Autoscale / descale your servers based on load 鈥 set thresholds in your monitoring solution to let you know when you are running out of capacity or you have far too much capacity. As an action on the threshold, have it send a webhook to 探花大神. Inside of 探花大神, setup your scenarios for scaling and descaling with the commands to spin up or shut down servers.
- Register your servers with your load balancers and monitoring solutions 鈥 set up an event notification with your cloud provider鈥檚 console to send a webhook to 探花大神 as soon as a new server is provisioned. Once it is provisioned, your 探花大神 鈥渁ction鈥 can register that server with your load balancer and monitoring solution.
- Create AWS RDS users automatically 鈥 a slightly different implementation with this use case, because 探花大神 considers user management as a first class citizen within the service but the result is the same. When adding a new user account to a server, you can create a command that launches on a 鈥淯ser Add鈥 event, and so you can also have that same user created within your third party services such as AWS RDS. With 探花大神, creating access to all of the right servers is simple 鈥 you only have to enter the user once and 探花大神 takes care of the rest.
Modern networks are event driven and automated to create a closed control loop that can keep your systems from going off the rails. Creating an automated, event-driven network is easy with 探花大神. 鈥 you鈥檒l be happy to be saving all of that time 鈥 and, getting more performance out of your infrastructure.