Server Monitoring With BixData - Page 3
High Load Notification
This is similar to the process above. We make a new service check this time we want to create of type Remote Agent CPU. We do this by clicking + by the Service Checks. We click on the new service check and set the load threshold to be 70% and add the webserver from the hosts column as the machine to be checked. All the other values are fine left as default.
We can reuse the "Email me" action we created above but we need to make a "Restart apache" action in order to try to handle the situation automatically. Click on + in the Actions box and select the Execute Command Remotely type. Name the action "Restart Apache" Click on the newly created action. This action type executes a command on a machine that is running the BixAgent. Now we set what command to execute. Since the BixAgent isn't running as root we must sudo the apache restart.
sudo apachectl restart
As a security precaution BixAgent will not execute remote commands unless authentication is enabled (SSL is not needed). You can read more about enabling authentication by reading the instructions here: http://www.bixdata.com/security_agent
BixServer can also execute commands locally on the BixServer machine, which obviously does not require authentication
Now we create a new notification called "Apache Notification". This time we want both actions to happen when the state goes from Up to Down. So in the While Down box we change Do nothing to wait 10 minutes then "Email me" and then "Restart apache." The finished state diagram should look like this:
This notification will wait for 10 minutes after CPU usage went beyond 70% and if the CPU usage remains above 70% BixServer will email you and restart Apache.
Kick back and relax
Your notifications are now all setup. You can close the
BixDesktop until you want to make changes again to your setup. You
probably will want to make your BixAgents and BixServers start
automatically on machine boot up.
You will also want to set up security on any machine that is reachable from the public internet: http://www.bixdata.com/security_agent
There are many other things BixData can monitor and do for you (we only briefly looked at 2 of the 9 tabs). So explore and it can make your life as a sysadmin much easier! For more information: www.bixdata.com