Page History
...
- SMS modem-based alerting
- TAPI modem alerting
- Internal Problem Ticket creation system alerts
- On call team rotation
- Customized alert email body formatting
How custom alert scripts work
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 UIM runs when a service outage occurs. You control the actions that the script or executable takes, which provides full control over how Uptime Infrastructure Monitor sends out alert notifications during a service outage.
...
Variable | Description | Example Contents |
---|---|---|
Service Message Fields These fields remain constant for each execution of your script associated with a single service outage. | ||
UPTIME_ALERTTYPE | Type of alert message. | One of: Problem, Recovery |
UPTIME_HOSTNAME | Name of the host associated with the service outage. | oracle_server |
UPTIME_HOSTSTATUS | Status of the host associated with the service outage. | One of: OK, WARN, CRIT, MAINT, UNKNOWN |
UPTIME_MESSAGE | Output selection of the alert. | Type: Problem Service: db_status (CRIT/threshold error) Host: orale_db (OK) |
UPTIME_SUBJECT | Subject line that normally appears in the email message for this alert. | Uptime Alert: UPTIME-oracle_server -> CRIT |
UPTIME_SVCNAME | Name of the service monitor generating this alert. | UPTIME-oracle_server |
UPTIME_SVCOUTPUT | Output of the service monitor generating this alert. | processoccurrences: 0 is less than 1 |
UPTIME_SVCSTATUS | Current status of the service monitor generating this alert. | One of: OK, WARN, CRIT, MAINT, UNKNOWN |
UPTIME_DATETIME | Date and time of the alert. | Mon May 15 11:12:22 CDT 2024 |
User-Related Fields These fields change for each user passed to your script. The script is executed once for each user that you want notified. | ||
UPTIME_CONTACTLOGINNAME | Login name of the notified user account. | testuser |
UPTIME_DESKTOPHOST | Windows desktop homename setting of the notified user account. | testuser-pc |
UPTIME_DESKTOPWORKGROUP | Windows workgroup for the desktop host specified above. | WORKGROUP |
UPTIME_EMAIL | Email address of the notified user account. | testuser@yourcompany.com |
UPTIME_MOBILE | Pager number of the notified user account. | 1234123@sms.mynetwork.com |
General Fields | ||
UPTIME_SCRIPT | Name of the script being executed. | C:/Program Files/uptime software/uptime710/scripts/my_custom_alerter.bat |
UPTIME_SMTPHELOSTRING | HELO string used in your SMTP server configuration. | |
UPTIME_SMTPPASSWORD | Password used from authentication in your SMTP server configuration. | |
UPTIME_SMTPPORT | Server port used in your SMTP server configuration. | |
UPTIME_SMTPSENDER | Sender address string used in your SMTP server configuration. | |
UPTIME_SMTPSERVER | Server hostname used in your SMTP server configuration. | |
UPTIME_SMTPUSER | User name used for authentication in your SMTP server configuration. |
Environment variable examples
How the script or executable uses environment 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 | Common methods of accessing environment variables |
---|---|
Perl | Use of the ENV array to access environment variables with Perl. For example:
|
PHP | When run from the command line, use the getenv() function to access environment variables within PHP. For example:
|
Bash and Ksh | Bash and Ksh enable you to access local environment variables just like any other local variable. For example:
|
Batch File | Add the % symbol around the names of environment variables in Windows batch files. For example:
|
VB Script | Use the the
|