Contents
Table of Contents
...
Overview
Related \nDocumentation | \nVersion \nof up.time \naffected | \nAffected \nPlatforms | \n
\n | All | \nAll | \n
...
\n \n
Article \nContents \n
...
...
Overview
...
When a service outage occurs, up.time Uptime Infrastructure Monitor can generate an alert in a number of ways including sending an email, opening a Windows pop-up or initiating a pager message. You can also define your own Script Alert that \nwill will be executed on the monitoring station when an outage occurs. You can use the Script Alert option to create custom alerting methods that fit your exact needs. Some examples of custom alerting implementations include:
...
- \n
- SMS modem-based \nalerting \n
- alerting
- TAPI modem alerting \n
- Internal Problem \nTicket Ticket creation system alerts \n
- On call team \nrotation \n
- rotation
- Customized alert \nemail email body formatting \n \n
...
...
How custom alert scripts work
...
Please review the online documentation available here - Alerts and Actions
Custom alert scripts are defined with the Script Alert option on the Alert Profile page. The script is a path to a script or executable on the monitoring station system that up.time Uptime Infrastructure Monitor will run when a service outage occurs. You control the actions that the script or executable takes, which provides full control over how up.time Uptime Infrastructure Monitor sends out alert notifications during a service outage.
...
Note | ||
---|---|---|
|
...
For |
...
Windows alert scripts, the path used must use UNIX-style / instead of \ and must be quoted if your path contains spaces. For example: |
...
"C:/Program |
...
Files/uptime software/uptime/scripts/my_custom_alerter.bat" |
...
When up.time When Uptime Infrastructure Monitor runs the script or executable, it passes on information about the specific service outage that triggered the alert. This information is passed using the system environment variables that are local to each execution of the recovery script. The script or \nexecutable executable is run once for each up.time Uptime Infrastructure Monitor user that will be notified using this alert.
...
The environment variables passed to the alert script and their meanings are included below : \n \nbut for the latest documentation please refer to Alert Profile and Action Profile Variables:
Variable | Description | Example Contents | |||
Service Message | |||||
Variable | \nDescription | \nExample \nContents | \n|||
Service \nMessage Fields - These will remain constant for each \nexecution execution of your script associated with a single service outage. | \n|||||
UPTIME_ALERTTYPE | \nThis is the \ntype type of alert message | \nOne of: \nProblemProblem, Recovery | \n|||
UPTIME_HOSTNAME | \nThe name of the \nhost host that the service outage is associated with. | \noracle_server | \n|||
UPTIME_HOSTSTATUS | \nThe status of \nthe the host that the service outage is associated with. | \nOne of: OK, \nWARNWARN, CRIT, MAINT, UNKNOWN | \n|||
UPTIME_MESSAGE | \nThe output \nsection section of the alert. | \nType: Problem \nService Service: db_status (CRIT/threshold error) \nHost Host: oracle_db (OK) | \n |||
UPTIME_SUBJECT | \nThe subject \nline line that would normally appear in an emailed alert for this alert. | \nUptime Alert - \nUPTIMEUPTIME-oracle_server -> CRIT | \n|||
UPTIME_SVCNAME | \nThe name of the \nservice service monitor generating this alert. | \nUPTIME-oracle_server | \n|||
UPTIME_SVCOUTPUT | \nThe output of \nthe the service monitor generating this alert. | \nprocessoccurrences: \n0 0 is less than 1 | \n|||
UPTIME_SVCSTATUS | \nThe current \nstatus status of the service monitor generating this alert. | \nOne of: OK, \nWARNWARN, CRIT, MAINT, UNKNOWN. | \n|||
UPTIME_DATETIME | \nThe date and \ntime time of the alert. | \nMon May 15 \n1111:12:22 EDT 2006 | \n|||
User \nrelated User related fields - these will change for each user that is \npassed passed to your script, the script will be executed once for each user \nthat that should be notified. | \n|||||
UPTIME_CONTACTLOGINNAME | \nThe login name \nof of the user who is being notified. | \ntestuser | \n|||
UPTIME_DESKTOPHOST | \nThe windows \ndesktop desktop hostname setting for the user being notified. | \ntestuser-pc | \n|||
UPTIME_DESKTOPWORKGROUP | \nThe windows \nworkgroup workgroup for the desktop host specified above. | \nWORKGROUP | \n|||
UPTIME_EMAIL | \nThe email \naddress address associated with the user who is being notified. | \n[email protected] | \n|||
UPTIME_MOBILE | \nThe pager \nnumber number associated with the user being notified. | \n[email protected] | \n|||
General \nfields | \n|||||
General fields | \n|||||
UPTIME_SCRIPT | \nThe name of the \ncurrent current script being executed. | \nC:/Program \nFilesFiles/uptime software/uptime4/scripts/my_custom_alerter.bat | \n|||
UPTIME_SMTPHELOSTRING | \nThe HELO string \nused used in your SMTP server configuration. | \n\n | |||
UPTIME_SMTPPASSWORD | \nThe password \nused used from authentication in your SMTP server configuration. | \n\n | |||
UPTIME_SMTPPORT | \nThe server port \nused used in your SMTP server configuration. | \n\n | |||
UPTIME_SMTPSENDER | \nThe sender \naddress address string used in your SMTP server configuration. | \n\n | |||
UPTIME_SMTPSERVER | \nThe server \nhostname hostname used in your SMTP server configuration. | \n\n | |||
UPTIME_SMTPUSER | \nThe user name \nused used for authentication in your SMTP server configuration. | \n\n |
...
...
...
Environment Variable Examples
...
How the script or executable uses environment \nvariables variables will vary depending on the language you have used to write your script or executable. The following examples illustrate how environment variables are accessed in several common languages:
...
Language | \nCommon \nmethods methods of accessing environment variables. | \n||
Perl | \n\n | Use of the ENV \narray array to access environment variables with Perl. For example: \n#!/usr/bin/perl | \n |
PHP | \nWhen run from \nthe the command line, use the getenv() \nfunction function to access environment variables within PHP. For example: \n «?php | \n ||
Bash and Ksh | \nBash and Ksh \nenable enable you to access local environment variables just like any other \nlocal local variable. For example: \n #!/bin/bash | \n ||
Batch File | \nAdd the % symbol around \nthe the names of environment variables in Windows batch files. For example: \n echo %UPTIME_EMAIL% | \n ||
VB Script | \nUse the the \n oShell.Environment \nlookup lookup function to access environment variables with \nVB VB Script. For example: \n Dim email, mobile | \n
...