Version 4.1
User's Guide

Defining NotifiersPrevious | Next
Contents

The second type of object in PageSentry is the Notifier. When a Sentry has something to report it hands the task off to one or more Notifiers. To open the Notifier Editor dialog box, choose "New Notifier" from the "Notifiers" pull-down menu, or click the "Create New" button in the Object Manager.

The following section describes the various input fields and configuration options for the different methods that PageSentry uses to alert you to a problem. Figure 23 shows the PageSentry Notifier dialog box.


Figure 23: Configuring a new E-Mail Notifier.

Common Elements

All Notifiers share the following configuration options:

Notification Name
The Notification Name is the name of the Notifier that appears in the Object Manager and Sentry editor lists. You can name a Notifier anything you like, since it has no effect on the notification process, but like a Sentry, each Notifier must have a unique name. Also, you should choose a name that you will be able to easily recognize when viewing the Edit Sentry window or the Object Manager.

Delay After Initial Failure
The Delay After Initial Failure setting allows you to have a Notifier wait a specified period of time after a Sentry encounters an error before actually performing its action. During the specified time, PageSentry will continue to test the server, and if the server returns to service, the Notifier action will be disregarded without taking further action. There are several potential uses for this feature.

One use is to add an additional level of fault tolerance to your Sentries. By setting the Delay After Initial Failure to a period longer than your Sentry's test period, the delay will cause PageSentry to attempt the test multiple times. If a subsequent test of the server succeeds, the Notifier will not send an error report. By performing several tests during the delay, servers on slow or flaky networks may be monitored with greater tolerance.

Another use is to schedule escalating priorities for Notifiers. For example, you may have two Notifiers, one that sends e-mail to the server's primary support person without delay and another Notifier that sends e-mail to you using a 30 minute delay. When the server fails, the primary support person will be contacted immediately, and if the server is not fixed quickly, you will be notified shortly thereafter.

Another case of escalating Notifier priority is to use a PowerKey Pro to restart a Mac-based server by cycling its power. For example, you could have Notifiers send you an e-mail message and a page (using a PageNow! Sentry) immediately on failure, then wait 15 minutes before restarting the server. With this strategy, you will have time to investigate the problem before the power is recycled.

Resend Notices
This option causes the Notifier to perform its action repeatedly, instead of acting only once for each server failure. When set to the deafult, "Never", PageSentry will execute the Notifier once when triggered, but will not repeat the action for as long as the Sentry detects an error. By specifying a time period, from 1 minute to 3 hours, the Resend Notices field tells PageSentry to periodically re-run the Notification action at the specified interval. For example, a PageNow! Notifier could be set up to resend the alert page every 15 minutes until the error is cleared.

Notifier Type
From the pop-up list, select the type of Notifier you would like to create. Each type, and how it is used, is described below.

Schedule Area
The last area on the notification editor window is the Schedule Area, where each grid square represents one hour. This grid allows you to define when the Notifier is active. Click in the boxes to toggle the state for that hour of that day, or click and drag to change multiple cells at once. When a Notifier is executed by a Sentry, the schedule is checked against the current system time and day of the week. If the hour is selected (red), then the Notifier will take its defined action. If the hour is not selected (gray), then no action is taken for that Notifier.

Note that each Sentry can have multiple notifications attached to it, so that other notifications may be sent, even if one Notifier's schedule does not match. You can make a staggering assortment of Notifiers for different people during lunch, weekends, Friday afternoons (whatever), and attach them all to the same Sentry. This Sentry would then send failure notification to different people or applications depending on when the failure occurred.


E-Mail Notifier
To congifure an E-Mail Notifier, select "E-Mail" from the Notifier Type list and fill in the following fields:

User Address
The User Address field contains a valid Internet e-mail address of the person receiving the Notification. This should be of the form "mailboxname@yourcom.com." If you are sending mail to an address that does not contain the "@" character between the user name and the host name, you will need to place the "<" and ">" characters around the address, as in "<bitnet!address!VMS!mainframe-2>."

Mail Server
The Mail Server field contains the domain name or IP address of the SMTP server that should be used to send the Notification e-mail. Most SMTP servers allow any client to send the server any piece of mail. The server will simply forward the mail to another (closer) mail server until it reaches its final destination. You should use a mail server designated by your network administrator or service provider. Your mail server will often reside on the machine with a name of the form "mail.yourcom.com".

You may want to enter the IP address of your e-mail server instead of the domain name, so if your DNS server fails, PageSentry will still be able to send e-mail notifications.

Mail From
The "Mail From" field contains the e-mail address from which the Notification will be sent. This address is important in case the e-mail cannot be delivered to the address entered in the "User Address" field. SMTP servers will try to route the piece of mail back to the specified Mail From address. It is best to set this to an e-mail address on a different e-mail server than the User Address, if possible.

You should always enter a valid Internet mail address in the Mail From field to prevent PageSentry's notification e-mail from becoming lost if it cannot be delivered to the User Address. Some mail servers (including AIMS and EIMS) will not accept messages without a valid "From" address.

Failure/Back Up Message
The e-mail message sent when a failure is detected or when a server returns to service can be customized to suit your needs. The Failure Message will be sent when the Sentry detects an error, and the Back Up Message will be sent when the error is cleared and the server is functioning again.

Clicking on either of the Message buttons brings up the dialog box shown in Figure 24, below. Here, enter any message text you like and use the six available "tokens" to configure the format of the email message you will receive from PageSentry. When the e-mail message is sent, the tokens will be replaced with information about the failed server. Both the Subject and Message Body of the e-mail message can be set.


Figure 24: The E-Mail Message Configuration window.

Available tokens:

Sentry NameThis is the name of the Sentry that triggered the Notifier.
Notifier NameThe name of this Notifier.
Failed URLThe URL or server that has failed.
Error DescA brief description of the error that the Sentry encountered.
DateThe date the Notifier was triggered.
TimeThe time the Notifier was triggered.

Send "Back Up" Notice
In this context, "Back Up" means the server being monitored has returned to service. Checking this option causes the Notifier to send a second e-mail when the Sentry that had the original failure is testing OK again. "Back Up" notifications will only be performed when a failure notification has been previously sent to report a problem (unless "Always Send Back Up Notification" has been checked in the Notifiers Preferences). Use the Back Up Message button to set the format and text of the message sent.

Note that PageSentry connects directly to your Internet mail server and uses SMTP directly to send notifications. PageSentry E-Mail Notifiers will not work with other mail systems, unless PageSentry is set to send mail to an SMTP server, and an e-mail gateway is then used to route the mail to the appropriate mailbox.

Also keep in mind that notifications sent via e-mail will only be as timely as your mail system. For example, if your mail client does not frequently check for incoming mail messages, then notification e-mail messages may be delayed.


AppleEvent Notifier
To have a Notifier send an AppleEvent to an AppleScript or another application, use the AppleEvent notifier. (For information about writing applications to receive and process AppleEvents sent from PageSentry, see the Extending PageSentry Using AppleEvents section in this Guide.)


Figure 25: The Notification section of the AppleEvent Notifier dialog box.

The following are descriptions of the fields in the AppleEvent Notification section:

Application
This field contains the name of the application to which the AppleEvent is sent. It, or an alias, must be in the same folder as PageSentry. The filename should be the same as it appears in the Finder, with file and folder names separated with colons (":").

"Extra" Info
This field leaves room for a text message that is to be sent in the AppleEvent. Different applets will want different values in this field. Check the documentation of the applet or application to which you are sending the event.

Your PageSentry package comes with several sample AppleScript Applet examples, including DisplayDialog. See the Read Me files that accompany each applet for information on using them with PageSentry.

Send "Back Up" Notice
The specified application or script will always receive and AppleEvent when the failure is detected, but can also receive an event when the server returns to service. If you would like to have a "Back Up" message sent, check this box.


PageNow! Notifier
PageSentry can interact directly with PageNow!, sending information directly to the application without having to create additional scripts.


Figure 26: The Notification section of the PageNow! Notifier dialog box.

The following are descriptions of the fields in the PageNow! Notification section:

Subscriber Name
The name of the PageNow! subscriber goes here. This should be the same name that appears for the subscriber in the "Send To:" column of the PageNow! window.

Send "Back Up" Notice
In addition to paging you when the a failure is detected, PageSentry can send you a pager message when the server has returned to service. Enable the "Back Up" message when you would like to receive notice that the server has returned to service after an error has occurred.

Failure/Back Up Message
The messages you recieve by pager are completely customizable. Both the failure message and the return to service ("Back Up") message can be edited as needed. Clicking on the "Message" button displays a dialog box, shown in Figure 27, that allows you to configure how your message will appear. You can make use of the six tokens here just as you would use the e-mail message tokens. For more about the tokens, see E-mail Message Configuration, above.


Figure 27: The PageNow! Message Configuration window.

For more information on PageNow!, visit the MarkSpace Web site at http://www.markspace.com/.


PowerKey Pro
PageSentry can directly control your Mac-based PowerKey Pro devices. This will allow you to configure a Notifier that, when triggered, can shut power down, wait a brief period, and restart power on a device or server connected to the PowerKey Pro. Recycling the power to a server in this way will restart a frozen or crashed server, no matter how badly the computer has crashed (except in the case of some hardware failures).

Figure 28 shows the PowerKey Pro section of the Edit Notifier window. Note that this Notifier type requires that the PowerKey software be installed on the Mac where PageSentry resides. Also, the ADB cable that controls the PowerKey must be plugged into the PageSentry computer. Servers to be restarted by the PowerKey and PageSentry are then plugged into the PowerKey strip.

A PowerKey notifier cannot be used to restart the PageSentry machine itself. If you do, PageSentry will shut power off for the computer, but will be unable to restart it. If you are running PageSentry on the same computer with an Internet server, use the PowerKey software to restart the computer instead. The Server Restart Option software is included with PowerKey Pro 600, and is available separately from Sophisticated Circuits for PowerKey or PowerKey Pro 200.


Figure 28: The Notification section of the PowerKey Pro Notifier dialog box.

The following are descriptions of the fields in the PowerKey Pro Notification section:

Outlet Number
The outlets on a PowerKey Pro device are labeled with a number, 1 or 2 on the PowerKey Pro 200 and 1 through 6 on the PowerKey Pro 600. The device or server to be restarted will be plugged into one of these outlets. In the Outlet Number field, select the outlet to be recycled.

Unit Name
This is an optional field that allows you to input a name for PowerKey Pro unit that is to be recycled. If you have only one PowerKey unit, leave this field blank! If you have multiple units, see the PowerKey Configuration software for information on how to identify and name each of the attached units. Enter the name of the unit that controls the server you want to restart into this field. If the unit name entered in PageSentry does not match a valid unit name as defined in the PowerKey software, the Notifier will not work properly, and no error will be reported by PageSentry.

For more information on PowerKey Pro, visit the Sophisticated Circuits website at http://www.sophisticated.com/.


Telnet
Many network devices and servers provide Telnet interfaces that can be used to manage services. For example, the APC MasterSwitch Intelligent Power Control Unit can be plugged in to your Ethernet LAN and controlled via Telnet. The PageSentry Telnet Notifier allows you to create very simple scripts that communicate with Telnet-enabled devices to automate actions to be taken when a Sentry detects a server failure.


Figure 29: The Notification section of the Telnet Notifier dialog box.

Address/Name
Any device with Telnet enabled will also need configured and routable TCP/IP connectivity to your network. Specify the address or name of the Telnet device PageSentry should connect to in this field.

Port
Specify the port on which PageSentry should attempt to connect to the Telnet device. Port 23 is the Telnet default port.

Pause Duration
PageSentry will issue commands once logged in to the Telnet device. The Pause Duration allows you to control the delay used between commands issued by PageSentry. For fast devices on the same Ethernet LAN as PageSentry, a short duration will allow the script to execute more quickly. For slower devices, or when the network connection between the device and PageSentry is slower, a longer pause will ensure that each command is accepted properly by the Telnet-enabled device.

Run "Back Up" Script
Like many other Notifiers, PageSentry will run a Telnet script one time when the server error has been cleared. To have a script run when the remote server comes "Back Up", check the checkbox and specify the script by clicking the "Back Up Script" button.

Failure/"Back Up" Script
For the Telnet Notifier, you must create a simple script that tells PageSentry what commands should be sent to the Telnet device. The best way to generate this script is to launch a Telnet client application on the PageSentry Macintosh, connect to the device, and complete the required task manually. As you enter commands, make menu selections, etc. in your Telnet application, enter the same commands and keystrokes into the PageSentry Telnet Script window.


Figure 30: The Telnet Script window.

Be careful to enter the same keystrokes into the Telnet Script that you do when performing the operation manually using a standard Telnet client. To help create the script, tokens can be inserted to make common invisible characters recognizable, and to add a pause where needed to allow the Telnet device to keep up with PageSentry as it sends keystrokes.

Available tokens:

ReturnEntering a return in your script is allowed for formatting, but the return character will not be sent to the remote device. This allows your script to remain readable by allowing you to start a new line of the script even when a return should not be sent to the remote device. Instead, press the "Return" token button at any point in the script where a return character is needed.
EscapeLike the return character, Escape (or "Esc") is invisible and can cause a script to be difficult to format and read. When an Escape character needs to be sent to the Telnet device, insert and Escape token instead of actually pressing the Esc key on your keyboard.
TabTabs are also difficult to see in a formatted script, so a Tab token is available as well.
PauseAfter each command, insert a Pause token to tell PageSentry to wait for the remote Telnet device to process the command and respond. The duration of the pause is set on the main Telnet Notifier window.

Don't try to create a Telnet script without downloading NCSA Telnet, BetterTelnet, or a similar Telnet client application. Once you have used a standard client application to perform the task manually, creating the script in PageSentry is simply a matter of reproducing the keystrokes. If you have trouble, open the PageSentry Activity Monitor window, set the message level to "Verbose", and press the "Run It" button in the Telnet Notifier window. The Telnet session will be displayed in real-time in the Activity Monitor window, making it easy to see exactly what the script is doing.


HTTP
Like the Telnet Notifier, the HTTP (Web) Notifier allows you to create a Notifier that will trigger an action on devices that can be controlled remotely. In this case, a Web URL can be loaded to trigger an action on the remote server or device.

For example, a Web server running NetCloak could be configured to take various actions when problems occur. A failure in your FTP software could trigger a global variable to be set so that file downloads use a backup FTP server or HTTP transfers instead. Similarly, a message telling users that a CGI-driven portion of your Web site is temporarily disabled could be displayed when a Sentry detects a failure in a Web server add-on process.

Configuring the HTTP Notifier is much like setting up an HTTP Sentry, and includes the following fields:


Figure 31: The Notification section of the HTTP (Web) Notifier dialog box.

URL
This is the URL that the Notifier will use to access a page on your Web server. The format should be something like this: "http://www.yourcom.com/file.html." You can add a port number after the domain name to monitor servers running on non-standard ports. For example, "http://www.yourcom.com:8000/" would cause PageSentry to test the server on port 8000, instead of the default, port 80. This URL should exactly match the URL displayed in the "Location" field of most browsers.

Username and Password
The Username and Password fields can be used to access Web pages that are protected by basic authentication. For example, if you request the test URL using a standard Web browser and the username/password dialog appears, the page is password protected. In this case, PageSentry will require a valid username and password to correctly verify the page. For pages that are not password protected, these fields may be left blank.

Use Proxy
If the machine that you are using to run PageSentry resides behind a proxy server, you will need to configure the HTTP Sentry for the proxy. The dialog box displayed to configure the proxy is identical to the same dialog activated on the HTTP Sentry window.


Process Restart
With the help of the small "ProcWatch" application, included with PageSentry, the Process Restart Notifier can be used to restart any application running on any Macintosh anywhere on the Internet. This is a graceful restart that simply quits, pauses, and then relaunches only the chosen application on the remote server.

The first step is to load ProcWatch on the remote Macintosh. If the server is already being monitored by a Process Watch Sentry, then ProcWatch is already installed. Otherwise, place a copy of ProcWatch on the Mac server, and launch it. In most cases, you will need to place an alias to ProcWatch in the Startup Items folder (inside the System Folder) so that ProcWatch will be started automatically when the Mac is booted. If ProcWatch is not running on the remote Macintosh, the Process Restart Notifier will not be able to restart the application.

When you first launch ProcWatch, you will be asked to enter a password, which will authenticate every action it performs for PageSentry. Choose a non-obvious, confidential password. ProcWatch enables PageSentry to perform critical tasks on your server which, without proper authentication, could be used in various attacks on your server. The password can be changed later, if you wish, by selecting the "Password..." item from the "File" menu.

With ProcWatch running on the remote Mac, you are ready to configure the Process Restart Notifier. The configuration options are shown in figure 32:


Figure 32: The Notification section of the Process Restart Notifier dialog box.

Machine Name
Enter the domain name or IP address of the Macintosh that is running the application you wish to restart. The IP address is the better choice, as this saves PageSentry from having to use your Domain Name Server to lookup the address, avoiding trouble should your DNS fail for any reason.

Password
Enter the ProcWatch password exactly as entered into the ProcWatch application running on the Macintosh being tested.

Process
Once the name or address of the remote Mac has been entered, click the "Update" button to populate the Process list. Each application running on the Macintosh server will be included in the list, and you can select the one you would like to have restarted.

Signature
The process Signature is displayed in this field, but can't be directly changed. Making a different selection in the Process pop-up menu changes the Signature value to reflect the selected application. The Signature is displayed for informational purposes only, and is important because it is used to uniquely identify each application. If you perform a server upgrade, for example, and the application name changes, this allows your Process Restart Notifier to continue to work without being updated.


Open Anything
Operation of the Open Anything Notifier is very simple: select any file on your the PageSentry Mac, and PageSentry will open it, exactly as you would by manually double-clicking the file in the Finder. You can choose an application and PageSentry will launch it, or choose a file and it will be opened in whatever application created it.


Figure 33: The Notification section of the Open Anything Notifier dialog box.

Open/Launch
Click the "Choose..." button and a Standard File Dialog will open that will prompt you to select a file. Choose any file you wish on the PageSentry Macintosh hard drive, and the file will be opened when the Notifier is triggered.

When Back Up
Again, click the "Choose..." button and select any file, this time to be opened when the Sentry error is cleared after the remote server returns to service. Leave the field blank when no file needs to be opened when the server comes back up.


Audible Alert
Notifiers can also be created that simply use the PageSentry Macintosh's speaker to signal an audible alert (in other words, beep). When using this Notifier type, you may need to set the "Resend Notices Every ..." value fairly low, to perhaps 5 or 10 seconds, so that the sound is played repeatedly when a server has failed. Audible sounds that can be played include the System Alert sound and several others built into PageSentry. Select the desired sound from the "Alert Sound" pop-up menu. Each sound will automatically play once as it is selected.


Copyright © 1995-2002 Maxum Development Corporation
http://www.maxum.com/

Rev. 7/10/02

Previous | Next
Contents