Agent Configuration

PureAgent Logo
PureAgent 4.0
August 2009
http://www.minq.se
support@minq.se

Documentation Index

General

Configuration of PureAgent is done by editing files in the <install_home> directory, where <install_home> is the directory where you have installed PureAgent.

There are two files defining general properties for the agent:

<install_home>/config/pureagent.properties
Basic configuration parameters for PureAgent engine as well as the web user interface.
<install_home>/lws/config/server.properties
Configuration of the bundled web server (Light Web Server). Normally there is no need o change anything here, except for the web server port (see below),

Web Server Port

By default the web server uses the port 6411. To change this edit <install_home>/lws/config/server.properties.

Enabling guest account

By default PureAgent is set up with a single account. The user name for the default account is admin. The default account password is pureagent.

It is possible to start PureAgent with a the guest capability enabled. This will enable PureAgent to accept the guest user name. A guest have limited capabilities and cannot alter any settings in the current agent as well as stopping it. Default password for the guest user name is guest.

Enabling a guest account is done by editing <install_home>/config/pureagent.properties:

    enable.guest=true

Enabling encryption of scenario files

When activities are created in PureAgent either when uploading scenario files or when creating Single URL activities the scenario files are stored in the <install_home>/storage directory. Default PureAgent stores these files in clear text and thus revealing any included passwords or other sensitive data.

By changing a property in the $INSTALL_HOME/config/pureagent.properties file PureAgent is setup to store the scenario files encrypted.

Enable scenario file encryption by by editing <install_home>/config/pureagent.properties:

    activityfile.encryption=true

License file

When you purchase PureAgent you will receive a license that reflects your specific license options. The license is a text-file that must be installed in the <install_home>/config directory. The name of the file must be pureagent.license.

Modules

To enhance PureAgent a concept of plugin modules are used. Available modules distributed with PureAgent are:

Mail alarm module
Alarm module which sends an e-mail in alarm situations. E.g. activity failure or timeout.
Scenario alarm module
Alarm module which invokes a configured scenario in alarm situations. E.g. activity failure or timeout.
Scenario result module
Result module which invokes a configured scenario after each Activity execution.

Mail alarm module

The mail alarm module provides functionality for recipients to obtain email when an Activity fails or when the execution time. The mail alarm module must be cofigured for this to work.

There are some properties that are mandatory and some that are optional. The address of the mail server defaults to a dummy value and must be changed to point to a real mail server. The subject field of a alarm mail message can be modified if the default value is not suitable. Please see the mail-module.properties file for more information.

The properties are changed by manually editing the <install_home>/config/mail-module.properties file. Please see the comments in the file for details.

PureAgent must be restarted in order for the changed properties to take effect.

Scenario Alarm Module

The scenario alarm module provides functionality for calling a specific scenario at failures.

In order to make PureAgent invoke a scenario at alarm situations you will need to:

  1. enable PureAgent to use scenario alarms by editing the file <install_home>/config/pureagent.properties.
    Edit the property alarmModules.
  2. create the scenario to be used by PureAgent at alarm situations
  3. store this scenario as <install_home>/storage/alarm.plc
  4. set up a recipient for this type of alarm

Creating the Scenario

The scenario that the Scenario alarm module will execute is designed using the PureTest application. A large set of variables are defined and can be use in the scenario.

Example Scenario including variables can be found in <install_home>/html/doc/examples.

The variables that can be used are:

alarm.type
Type of alarm. Contains a string representing the type of alarm. Possible values are:
alarm.msg
Alarm message.
agent.name
Name of the agent issuing the alarm message.
activity.name
Name of the activity.
activity.id
Unique id of the activity
activity.alarm.maxtime
Alarm maximum time setting.
activity.schedule.interval
Activity schedule interval.
error.msg
Error message of a failure. Valid during failures.
error.stack
Stack trace at a failure. Valid during failures.
error.task.data
Current task data if available. Valid during failures.
error.task.name
Name of the Task that failed within the activity. Valid during failures.
execution.time
Activity execution time.
execution.start
Activity start time.
execution.stop
Activity stop time.
recipient.phone
Phone field of the defined recipient.
recipient.name
Name of the recipient.
recipient.email
Email address of the recipient.
result.task.count
Number of executed tasks.
scenario.name
Name of the scenario as defined in the scenario plc file.

Scenario variable inheritance

The executing Activity may define variables during execution. These variables are automatically inherited by the Alarm Scenario.

Debugging the Module

The level of logging of the Scenario Alarm Module can be changed by creating a scenario-alarm-module.properties file in the config directory of PureAgent. The file should contain the following line:

loglevel=<level>

Where <level> can be one of ALL, DEBUG, INFO, ERROR or OFF.

Scenario Result Module

The scenario result module provides functionality for calling a specific scenario after each execution of a scenario.

In order to make PureAgent invoke a scenario after each Activity execution you will need to:

  1. enable PureAgent to use scenario results by editing the file <install_home>/config/pureagent.properties.
    Edit the property resultModules.
  2. create the scenario to be invoked by PureAgent after Activity execution
  3. store this scenario as <install_home>/storage/scenario_result.plc

Creating the Scenario

See the description above for Scenario Alarm Module.

Debugging the Module

The level of logging of the Scenario Alarm Module can be changed by creating a scenario-result-module.properties file in the config directory of PureAgent. The file should contain the following line:

loglevel=<level>

Where <level> can be one of ALL, DEBUG, INFO, ERROR or OFF.

PureAgent as a Service

During installation you can choose to install PureAgent as a service (the default). When runing as a servive, PureAgent will log it's output (normally written to standard output) to <install_home>/log/pureagent_service.log.

Windows

PureAgent is installed as a standard windows service executable. To administer the service use the normal Windows tools for this.

Mac OS X

PureAgent will be added as a start-up item. I.e you will see a directory installed as /Library/StartupItems/pureagent_service. This allows Mac OS X to automatically start the agent when the
system is booted.

To manually start or stop the service, execute the <install_home>/bin/pureagent_service binary:

 <install_home>/bin//pureagent_service {start|stop|status}

If you want to remove PureAgent as a startup item, simply remove the /Library/StartupItems/pureagent_service directory.

UNIX

On UNIX a start/stop script is generated, but no installation is done to start the agent automatically on system boot.

To manually start or stop the service, execute the <install_home>/bin/pureagent_service binary:

<install_home>/bin/pureagent_service {start|stop|status}



Copyright © 2009 Minq Software AB. All rights reserved.