General Administration > PRECISION Monitor Component > Configuring the Monitor Component
  
Configuring the Monitor Component
Use the monitor.properties file to configure settings for the Monitor Component tests. This file is in the PRECISION Web UI root folder, which by default is C:\PRECISION\WebUI. The file path is supplied to the program in a JVM parameter. The Monitor Component loads this file at startup and at the start of a cycle if the file has been modified since the previous cycle.
The precision.properties file consists of global parameters, as in Global Parameters in the precision.properties File, and parameters related to specific test descriptions, as in Heartbeat Test Parameters in the precision.properties File, File Changed Test Parameters in the precision.properties File, and File Exists Test Parameters in the precision.properties File. A test description is a list of test parameters. The parameters can occur in any order. A test parameter has the syntax precision.monitor.testX.parameter=value, where X is the unique ID of the test.

Global Parameters in the precision.properties File
 
Property
Required
Description
interval
Yes
The number of seconds to wait between the completion of one run of the Monitor Component and the start of the next run.
startupDelay
Yes
The number of seconds to wait before running tests after the Monitor Component starts.

Heartbeat Test Parameters in the precision.properties File
 
Property
Required
Description
Default
type
Yes
Identifies the type of test.
Value: FileChanged.
 
url
Yes
The URL to test.
Example: http://localhost:8080/highway/http/SubmitMessage?HighwayEndpointId=SPSBB&HighwayMessage=HEARTBEAT_TEST&Synchronous=Yes
 
expected
Yes
The test string that is expected in the HTTP response. If this string does not exist, then the test fails.
 
method
No
Specify if a HTTP POST or GET is performed.
GET
timeout
No
The time (in seconds) that the test will wait for a response. If you do not specify a time, then the test waits until a response is returned.
0
description
No
A sentence suggesting what to do when the test fails. This description is included in the XML result when the test fails.
 
weekdayIgnore
No
The period during which the test does not run on weekdays.
Format: hh:mm-hh:mm, in 24 hour time.
Example: 10:00-14:00
 
weekendIgnore
No
The period during which the test does not run during weekends.
Format: hh:mm-hh:mm, in 24 hour time.
Example: 09:00-23:00
 

File Changed Test Parameters in the precision.properties File
 
Property
Required
Description
type
Yes
Identifies the type of test.
Value: FileChanged.
file
Yes
The file to monitor.
Example: C:/PRECISION/WebUI/jboss/server/default/log/server.log
changeFrequency
Yes
The maximum amount of time, in seconds, that the file should be unchanged before the test is considered to have failed.
description
No
A sentence suggesting what to do when the test fails. This description is included in the XML results when the test fails.
weekdayIgnore
No
The period during which the test does not run on weekdays.
Format: hh:mm-hh:mm, in 24 hour time.
Example: 10:00-14:00
weekendIgnore
No
The period during which the test does not run during weekends.
Format: hh:mm-hh:mm, in 24 hour time.
Example: 09:00-23:00

File Exists Test Parameters in the precision.properties File
 
Property
Required
Description
type
Yes
Identifies the type of test.
Value: FileChanged.
directory
Yes
The directory to search. For example:
C:/PRECISION/WebUI/service
expected
Yes
Do files in the directory match the matches condition or no.
Possible values:
no - a match should result in a test failure.
yes - a match is not expected.
matches
Yes
The match condition.
Example: *.hprof
description
No
A sentence suggesting what to do when the test fails. This description is included in the XML results when the test fails.
weekdayIgnore
No
The period during which the test does not run on weekdays.
Format: hh:mm-hh:mm, in 24 hour time.
Example: 10:00-14:00
weekendIgnore
No
The period during which the test does not run during weekends.
Format: hh:mm-hh:mm, in 24 hour time.
Example: 09:00-23:00
Sample monitor.properties File
# All time units are in seconds.
# Use forward slashes for file paths.
 
precision.monitor.interval=10
precision.monitor.startupDelay=30
 
precision.monitor.test1.type=HTTPHeartbeat
precision.monitor.test1.url=http://localhost:8080/highway/http/SubmitMessage?HighwayEndpointId=SPSBB&HighwayMessage=HEARTBEAT_TEST&Synchronous=Yes
precision.monitor.test1.method=GET
precision.monitor.test1.expected=pics.precisionsoftware.com
precision.monitor.test1.description=This is an example description suggesting what to do if the test fails.
precision.monitor.test2.type=HTTPHeartbeat
precision.monitor.test2.url=http://localhost:8080/highway/http/SubmitMessage?HighwayEndpointId=COMPLYBB_SYNCH&HighwayMessage=HEARTBEAT_TEST&Synchronous=Yes
precision.monitor.test2.method=POST
precision.monitor.test2.expected=<ShortComplianceResult>
precision.monitor.test2.timeout=60
precision.monitor.test2.weekdayIgnore=10:00-14:00
 
precision.monitor.test3.type=FileExists
precision.monitor.test3.directory=C:/PRECISION/WebUI/service
precision.monitor.test3.matches=*.hprof
precision.monitor.test3.expected=no
precision.monitor.test3.weekendIgnore=09:00-23:00
 
precision.monitor.test4.type=FileChanged
precision.monitor.test4.file=C:/PRECISION/WebUI/jboss/server/default/log/server.log
precision.monitor.test4.changeFrequency=240