SysOrb Network Monitoring System Administrator's Guide: For version 3.6.0 | ||
---|---|---|
Prev | Chapter 10. SysOrb Server maintenance | Next |
In addition to the built-in ways, that the SysOrb server can alert its users (Email, SMS, paging), you can also have SysOrb execute a script of your choice. This could be used to send SMS through a gateway of your provider, to put events into your help-desk system, to send an instant message, or whatever you can do through any command line utility.
The SysOrb server passes information about the alert to be sent exclusively through environment variables. Before instructing SysOrb to invoke the script, you probably want to debug it by running it on the command line with the environment variables manually set. You will find a list with descriptions of each of the variables at the end of this section.
In order to be able to set up the script to be invoked by SysOrb, you must have a running SysOrb server. Log into the web interface using an administrator account, and click the
button. Then select and click . All you have to supply is a name of your choice for this type of custom alerts, and the command for running the script.After registering the script with SysOrb. You can select any user, click
, and the you should see a new option called . Try creating a path, and testing it by clickng next to the new path on the list.Here is the list of the environment variables passed to the custom alert script.
This variable contains one of the the following values:
warning The script should send a warning |
alert The script should send an alert |
test The script should test the alert path |
scheduled_downtime The script should send a message, stating that the check is entering unexpected downtime. |
The name of the user to receive this alert.
The dot separated name of the domain to which the user belongs.
The alert path destination, as entered in the web interface, when the user created his AlertPath, that is using this script. If your script sends SMS'es through some in-house gateway, then you probably want the destination field to contain the phone number of the phone. Other scripts may require other information in the destinarion field, some may not need it at all.
The full name of the Node in question, as shown on the overview pages.
The text from the dns-name/ip-address field of the node in question.
This variable contains one of the the following values:
checkin This alert is due to late checkin of the Node, and the rest of the SO_CHECK_... variables are not set, as this message concerns no specific check. |
netchecks This alert is due to a NetCheck. |
agentchecks This alert is due to an AgentCheck. |
snmpchecks This alert is due to a snmpCheck. |
Depending on whether this check is an accumulation or not, this variable will contain yes or no
A descriptive name of the check in question.
A dot separated string, which identifies the Check relative to its Node. This is not suitable for inclusion in text presented to the user, use SO_CHECK_LABEL for that. Instead this is mostly useful for conditions in the script, if you for instance want to treat all ICMP checks different than other NetChecks.
A http url linking to the SysOrb web interface page for this check.
An optional http url given by the SysOrb user with additional information about this check.
The last measured value from the check, printed in human readable format, e.g. 2.34 MB.
The unit of the measurement of this check, e.g. B (bytes).
The last measured value from the check, measured in units given by SO_RESULT_UNIT, e.g. 2453666.00
The warn/alert limits, measured in units given by SO_RESULT_UNIT. If any of the limits are disabled, the corresponding variable will be unset.