SiteScope User's Guide


File Monitor

The SiteScope File Monitor reads a specified file. In addition to checking the size and age of a file, the File Monitor can help you verify that the contents of files, either by matching the contents for a piece of text, or by checking to see if the contents of the file ever changes

Each time the File Monitor runs, it returns a reading and a status and writes them in the monitoring log file. It also writes the file size and age into the log file.

Usage Guidelines

The File Monitor is useful for watching files that can grow too large and eat up disk space, such as log files. You can set up your File Monitors to watch for file size, setting a threshold at which you should be notified. You can even write scripts for SiteScope to execute that will automatically roll log files when they reach a certain size.

What to monitor

You can create File Monitors for any files that you want to monitor for size, age, or content. As mentioned before, you can set thresholds in SiteScope, telling it when to notify you of a problem. Log files are very good candidates for monitoring because they're prone to suddenly growing in size and crashing machines. Other files that you may want to watch are Web pages that have important content that does not change often. SiteScope can alert you to unauthorized content changes so that you can correct them immediately.

About scheduling this monitor

The frequency with which you run File Monitors is strictly up to you. We suggest that you run them as often as every 10 minutes, but you can run them more often if you prefer.

Reading and Status

The reading is the current value of the monitor. Possible values are:

  • OK
  • content match error
  • file not found
  • contents changed

An error status is returned if the current value of the monitor is anything other than OK.

Completing the File Monitor Form

To display the File Monitor Form, either click the Edit link for an existing File Monitor in a monitor table, or click the Add a new Monitor to this Group link on a group's detail page and click the Add File Monitor link.

Complete the items on the File Monitor form as follows. When the required items are complete, click the Add Monitor button.

File Name
Enter the name of the file to be monitored. For example, /pub/docs/mydoc.txt.

You can also monitor files on a remote Windows NT/2000 server through NetBIOS by including the UNC path to the remote file. For example,
\\remoteserver\sharedfolder\filename.ext
This requires that the user account under which SiteScope is running has permission to access the remote file using the UNC path. If a direct connection via the operating system is unsuccessful, SiteScope will try to match the \\remoteserver with servers currently defined remote NT connection profiles (displayed in the Remote NT Servers table). If an exact match is found \\remoteserver in the remote NT connection profiles, SiteScope will try to use this connection profile to access the file. If no matching server name is found, the monitor reports that the file can not be found.

Update every
Select how often the monitor should check this file. The default interval is to run or update the monitor once every 10 minutes. Use the drop-down list to the right of the text box to specify another update interval in increments of seconds, minutes, hours, or days. The update interval must be 15 seconds or longer.

Title
Enter a title text for this monitor. This text is displayed in the group detail page, in report titles, and other places in the SiteScope interface. If you do not enter a title text, SiteScope will create a title based on the host, server, or URL being monitored.

Advanced Options

The Advanced Options section presents a number of ways to customize monitor behavior and display. Use this section to customize error and warning thresholds, disable the monitor, set monitor-to-monitor dependencies, customize display options, and enter other monitor specific settings required for special infrastructure environments. The options for this monitor type are described below. Complete the entries as needed and click the Add or Update button to save the settings.

Disable
Check this box to temporarily disable this monitor and any associated alerts. To enable the monitor again, clear the box.

Match Content
Enter a string of text to check for in the returned page. If the text is not contained in the page, the monitor will display "no match on content". The search is case sensitive. Remember that HTML tags are part of a text document, so include the HTML tags if they are part of the text you are searching for (for example, "<B> Hello</B> World"). This works for XML pages as well. You may also perform a Perl regular expression match by enclosing the string in forward slashes, with an "i" after the trailing slash indicating case-insensitive matching. (for example, /href=Doc\d+\.html/ or /href=doc\d+\.html/i). If you want a particular piece of text to be saved and displayed as part of the status, use parentheses in a Perl regular expression. For example /Temperature: (\d+). This would return the temperature as it appears on the page and this could be used when setting an Error if or Warning if threshold.

Check for Content Changes
Unless this is set to "no content checking" (the default) SiteScope will record a checksum of the document the first time the monitor runs and then does a checksum comparison each subsequent time it runs. If the checksum changes, the monitor will have a status of "content changed error" and go into error. If you want to check for content changes, you will usually want to use "compare to saved contents".

The options for this setting are:
  • no content checking - (default) SiteScope does not check for content changes
  • compare to last contents - The new checksum will be recorded as the default after the initial error "content changed error" occurs, so the monitor will return to OK until the checksum changes again
  • compare to saved contents - The checksum is a snapshot of a given page (retrieved either during the initial or a specific run of the monitor). If the contents change, the monitor will get a "content changed error" and will stay in error until the contents return to the original contents, or the snapshot is update by resetting the saved contents
  • reset saved contents - Takes a new snapshot of the page and saves the resulting checksum on the first monitor run after this option is chosen. After taking the snapshot, the monitor will revert to "compare to saved contents" mode.

No Error on File Not Found
Check this box if you want this monitor to remain in GOOD status, if the file is not found.
NOTE: you MUST also set the 'Good if' Condition to 'status == 404'

Verify Error
Check this box if you want SiteScope to automatically run this monitor again if it detects an error. When an error is detected, the monitor will immediately be scheduled to run again once.

Note: In order to change the run frequency of this monitor when an error is detected, use the Update every (on errors) option below.

Note: The status returned by the Verify Error run of the monitor will replace the status of the originally scheduled run that detected an error. This may cause the loss of important performance data if the data from the verify run is different than the initial error status.

Warning: Use of this option across many monitor instances may result in significant monitoring delays in the case that multiple monitors are rescheduled to verify errors at the same time.

Update Every (on error)
You use this option to set a new monitoring interval for monitors that have registered an error condition. For example, you may want SiteScope to monitor this item every 10 minutes normally, but as often as every 2 minutes if an error has been detected. Note that this increased scheduling will also affect the number of alerts generated by this monitor.

Schedule
By default, SiteScope monitors are enabled every day of the week. You may, however, schedule your monitors to run only on certain days or on a fixed schedule. Click the Edit schedule link to create or edit a monitor schedule. For more information about working with monitor schedules, see the section on Schedule Preferences for Monitoring.

Monitor Description
Enter additional information about this monitor that will make it easy to identify. The Monitor Description can include HTML tags such as the <BR> <HR>, and <B> tags to control display format and style. The description will appear on the Monitor Detail page.

Report Description
Enter an optional description for this monitor that will make it easier to understand what the monitor does. For example, network traffic or main server response time. This description will be displayed on with each bar chart and graph in Management Reports and appended to the tool-tip displayed when you pass the mouse cursor over the status icon for this monitor on the monitor detail page.

Depends On
To make the running of this monitor dependent on the status of another monitor or monitor group, use the drop-down list to select the monitor on which this monitor is dependent. Select None to remove any dependency.

Depends Condition
If you choose to make the running of this monitor dependent on the status of another monitor, select the status condition that the other monitor or monitor group should have in order for the current monitor to run normally. The current monitor will be run normally as long as the monitor on which it depends reports the condition selected in this option.

List Order
By default, new monitors are listed last on the Monitor Detail page. You may use this drop-down list to choose a different placement for this monitor.

Error if
By default, SiteScope generates an error if the returned status indicates anything other than a successful retrieval of the file. You may choose to have SiteScope generate an error based on the size or age of the file. Use the comparison value list to specify an error threshold.

The possible comparison values are:

  • status - status values: OK (200), file not found (404), Content Changed Error (-995), Content Match Error (-999)
  • file age - the age of the file in minutes.
  • size - the size of the file in bytes.
  • content match - When saving a match value, you can use this option to compare against the value saved in the regular expression. Make sure to put string values in single quotes.

Warning if
By default, SiteScope does not generate warnings for File monitors. You may choose to generate a warning based on the size or age. Complete this section just as you would the Error if section, described above.

Good if
By default this monitor returns a good reading if the status returned by the monitor is 200. You can change this default to be based upon file age or size. Choose one of these choices from the drop-down list and then set the thresholds. The symbols in the comparison value list are the same as those for Error if.