- Creating profiles
- Editing profiles
- Custom monitors
- Shell scripts
- Modifying scripts
- Silent servers
- Using clusters
- Viewing logs
Creating custom (bespoke) monitors
In addition to the integrated hardware monitors and built-in list of service monitors, Pulse also allows you to define your own custom monitors that you can configure to report on the status of anything important to you.
For example, you might have a custom application on your server that you need to ensure is running. Obviously, it isn't going to be included in the predefined list of services, so you'll need a custom monitor for it.
To add a custom monitor, click the link in the server's header mast, then provide a name for the monitor, and supply the notification channel & route.
When adding a new monitor, you will need to download a revised copy of the shell script and replace the existing version on your actual server.
Next, it's time to set the data type for the monitor. Since Pulse has to use a calculation to determine whether the incoming data violates the threshold you specify, you are limited to using primitive data types. You can review the table below for details.
|type||example threshold values|
|Boolean||0 (false) or 1 (true)|
|Integer||5, 17, 530276|
|Decimal||0, 23.5456, 18593|
After selecting the data type, you'll need to set the threshold Pulse should use as its benchmark. This value can be up to 50 characters long.
Finally, you'll need to supply the command that Pulse should insert into your server's shell script. In the case of the above example, it might look something like this:
ps -e | grep -v grep | grep -q app && echo '1' || echo '0'
You might notice that the commands for service monitors (which also have Boolean thresholds) are configured to return 'true' or 'false', instead of '1' or '0'. However, this convention SHOULD NOT be used for custom Boolean monitors. Instead, use '0' or '1'.
It is important to understand that Pulse will wrap the command within a set of backticks - ``. This results in the output of the executed command being stored within a variable, which is then merged into a JSON string and sent to Pulse.
As a result, if you need to chain operations in order to retrieve the monitor's value, you will have to append them using and symbols e.g.
(code) && (code) && (code) && echo ...
TIP: If your command is particularly complex, consider extracting it to a separate shell script and simply have the monitor's command execute it and log the result.
Since you yourself are coding this part of the server's shell script, you are strongly encouraged to test its functionality prior to including it.
Please note that, since you're the one writing the code, we DO NOT provide ANY support for custom monitors. By all means use them, but understand that you're on your own.