Introduction
The WS MDS Trigger Service collects information about Grid resources and can be configured to execute a program if the collected data meets certain conditions. This document describes the programmatic interfaces to the Trigger Service.
This document describes the programmatic interfaces to the Trigger Service. See also general Globus Toolkit coding guidelines and GT 4.2.1 best practices.
Table of Contents
- Trigger Service How-tos
- 1. Before you Begin
- 2. Usage scenarios
- 3. Trigger Service - Easy HowTo
- 4. Tutorials
- 5. Architecture and design overview
- 6. APIs
- 7. WS and WSDL
- 8. Additional WSDL information for the Trigger Service
- 9. MDS Trigger Commands
- 10. Additional configuration for the Trigger Service
- 11. Graphical User Interface
- 12. Trigger Action Script
- 13. Aggregator sources
- 14. Debugging
- 15. Troubleshooting
- 16. Related Documentation
- Glossary
- Index
C
- configuring
- Trigger Service-specific, Additional configuration for the Trigger Service
D
- debugging, Debugging
S
- scripting the trigger, Trigger Action Script
T
- tutorial
- basic, Trigger Service - Easy HowTo
U
- usage scenarios
- controlling information collected, Controlling information collected by the Trigger Service
- controlling when script/executable is fired, Controlling the Conditions Under Which the Executable is Executed
- programming script/executable, Programming the Executable
Table of Contents
Before you begin:
The Trigger Service has been rewritten and restructured for the most recent 4.2.1 version to allow for a number of improvements including the following new features:
- Individual triggers may be created without restarting the container.
- Once created, triggers can be enabled/activated or disabled/deactivated without restarting the container.
- The parameters which define the trigger can be edited individually, in real-time, without restarting the container.
Other Supported Features
- Uses the Aggregator Framework to monitor XML data for matching trigger conditions
- When a trigger condition matches, fires a customizable action: for example, sends email to an administrator.
- Monitored services are managed through service group-based registration API, allowing use of many of the same clients that can be used in the Index Service.
Deprecated Features
- Not applicable
Tested Platforms for WS MDS Trigger Service
- Linux on i386
Tested containers for WS MDS Trigger Service:
- Java WS Core container
The Trigger Service interfaces and underlying protocols are fully backward compatible with the GT 4.2.0 version.
The Trigger Service interfaces and underlying protocols have changed since the GT 4.0 version. The Trigger Service will not interoperate with GT 4.0 servers or clients; however, trigger action programs written for previous versions of the Trigger Service should continue to work with this one.
The Trigger Service depends on the following GT components:
The Trigger Service depends on the following 3rd party software:
- None
The security considerations for the Aggregator Framework also apply to the Trigger Service:
By default, the aggregator sources do not use authentication credentials -- they retrieve information using anonymous SSL authentication or no authentication at all, and thus retrieve only publicly-available information. If a user or administrator changes that configuration so that a service's aggregator source uses credentials to acquire non-privileged data, then that user or administrator must configure the service's aggregator sink to limit access to authorized users.
Table of Contents
Information is collected by the Trigger Service by way of an aggregator source. The Globus Toolkit distribution includes several standard aggregator sources (see Aggregator Sources Reference for more details). To create your own custom information source, see the Developer's Guide.
This is handled through configuration options (see Additional configuration for the Trigger Service for details).
The executable program triggered by the Trigger Service can be written in any programming or scripting language. The specifications for this program are documented in Chapter 6, Configuring Execution Aggregator Source.
Table of Contents
The purpose of this Easy HowTo is to introduce the GT4/WS MDS component known as the Trigger, as well as to provide an example of setting one up successfully. The current GT 4.2.1 documentation provides a basic reference and will be updated as features are added, but for those of you who would like to get a simple trigger working without going through all of the documentation, this document is for you.
We will be creating a simple trigger from scratch, and setting it up completely. To get the basic idea of how this is done, we will only use elements available in the default GT4 installation to show you how to use triggers.
To get the most out of this tutorial, you will need:
A Globus Toolkit installation
Some basic familiarity with XML Path Language (XPath).
A valid X.509 user certificate
The Trigger Service collects information and then performs actions based on that information. The Trigger Service works like this:
Administrators use a configuration file to specify the names and locations of trigger actions, programs that can be executed by the Trigger Service as a result of trigger conditions being met.
Administrators use a service interface to specify what information will be collected by the Trigger Service. This interface is called the Aggregator Framework and is the same configuration interface used by the Index Service
Users use a service interface to define triggers. A trigger includes (among other things) an XPath query string and the name of one of the trigger actions defined in step 1.
The Trigger Service periodically collects data (based on the configuration specified in step 2) and, for each trigger specified in step 3, evaluates the XPath query associated with the trigger and then executes the trigger's action if the query returns true.
In this example, we will configure the Trigger Service to monitor the Default Index Service running in the same Globus container, and then set up a trigger that will add an entry to a log file any time the number of Index Service is less than 1. This is not necessarily a practical example of how you would use a trigger, but it's simple enough to give you a basic idea of how to set one up. So let's get started!
First things first -- in order to run most Globus commands, you must have your environment set up correctly and have a valid proxy certificate. To set up your environment, first set the GLOBUS_LOCATION environment variable to the directory in which Globus is installed. To finish setting up your environment, run:
. $GLOBUS_LOCATION/etc/globus-user-env.sh
if you're a Bourne shell user, or
source $GLOBUS_LOCATION/etc/globus-user-env.csh
if you're a C shell user. Finally, generate a proxy certificate with:
$GLOBUS_LOCATION/bin/grid-proxy-init -verify -debug
Next, we will specify what commands can be used in Trigger Service triggers. The Trigger Service comes with some simple action scripts in the $GLOBUS_LOCATION/libexec/trigger directory; we will edit the
$GLOBUS_LOCATION/etc/globus_wsrf_mds_trigger/jndi-config.xml file to enable them:
<?xml version="1.0" encoding="UTF-8"?>
<jndiConfig xmlns="http://wsrf.globus.org/jndi/config">
<global>
<resource name="configuration"
type="org.globus.mds.aggregator.impl.AggregatorConfiguration">
...
</resource>
<resource name="triggerConfiguration"
type="org.globus.mds.trigger.impl.TriggerConfiguration">
<resourceParams>
<parameter>
...
</parameter>
<parameter>
<name>executableMappings</name>
<value>trigger-action-default=trigger-action-default.sh, trigger-action-input-default=trigger-action-input-default.sh</value>
</parameter>
</resourceParams>
</resource>
</global>
<service name="TriggerRegistrationService">
...
</service>
...
</jndiConfig>
This jndi-config.xml file defines an executableMappings parameter. The format of the executableMappings parameter is a sequence of name=value strings, separated by commas.
The left hand side of each name/value pair is the name that users will specify in trigger definitions; the right hand side is the path name (relative to the $GLOBUS_LOCATION/libexec/trigger directory) of the program to execute. In this example, we
define two trigger actions: trigger-action-default maps to $GLOBUS_LOCATION/libexec/trigger/trigger-action-default.sh, and trigger-action-input-default maps to $GLOBUS_LOCATION/libexec/trigger-action-input-default.sh. These action scripts are distributed as part of the Globus distribution. The version of $GLOBUS_LOCATION/etc/globus_wsrf_mds_trigger/jndi-config.xml distributed with Globus has these mappings defined in a commented-out section; in order to continue with this example, you must uncomment them.
Before you continue, you'll need to restart your Globus container to make the
changes to
jndi-config.xml take effect. If you normally use /etc/init.d/gt4container, then you can type /etc/init.d/gt4container restart, or you can kill the running Globus container (if there is one) and run $GLOBUS_LOCATION/etc/globus-start-container-detached by hand. If you have a production container running and want to test the trigger service with a different instance on another port, you can run globus-start-container-detached -p NNNN to cause the new container to listen on port NNNN.
The next thing we will do is configure the trigger service to collect some information (we will later configure the trigger service to periodically run a query on that information and, based on the results of the query, take some action). In this example, we will configure the trigger service to collect infoformation by querying the Default Index Service running in the same Globus container for the entire contents of its index.
The Trigger Service uses the Aggregator Framework to configure its sources of information. Aggregator sources are configured through a service interface; we will create a
file specifying configuration parameters and then run the mds-servicegroup-add command to read that configuration file and register the configuration information with the Trigger Service. We will start with the example trigger registration file included with Globus distributions in $GLOBUS_LOCATION/etc/globus_wsrf_mds_trigger/trigger-registration-example.xml
<DefaultServiceGroupEPR>
<wsa:Address>https://localhost:8443/wsrf/services/TriggerRegistrationService</wsa:Address>
</DefaultServiceGroupEPR>
<ServiceGroupRegistrationParameters
xmlns="http://mds.globus.org/servicegroup/client"
xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:agg="http://mds.globus.org/aggregator/types">
<RegistrantEPR
xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>https://localhost:8443/wsrf/services/DefaultIndexService</wsa:Address>
</RegistrantEPR>
<RefreshIntervalSecs>600</RefreshIntervalSecs>
<Content xsi:type="agg:AggregatorContent"
xmlns:agg="http://mds.globus.org/aggregator/types">
<agg:AggregatorConfig xsi:type="agg:AggregatorConfig">
<agg:GetResourcePropertyPollType
xmlns:wssg="http://docs.oasis-open.org/wsrf/sg-2">
<agg:PollIntervalMillis>30000</agg:PollIntervalMillis>
<agg:ResourcePropertyName>wssg:Entry</agg:ResourcePropertyName>
</agg:GetResourcePropertyPollType>
</agg:AggregatorConfig>
<agg:AggregatorData />
</Content>
</ServiceGroupRegistrationParameters>
</ServiceGroupRegistrations>
For this example, the only items in the registration file that you
might need to edit are the DefaultServiceGroupEPR (the
address of your trigger registration service) and the RegistrantEPR (the address of the resource you want to monitor; in this case, your Default Index Service). If these look correct (i.e., the host names and port numbers correspond to
the Globus container you just started),
then you do not need
to edit this file at all.
Finally, run mds-servicegroup-add to register these configuration parameters to the Trigger Service:
mds-servicegroup-add $GLOBUS_LOCATION/etc/globus_wsrf_mds_trigger/trigger-registration-example.xml &
Of course, if you copied the trigger-registration-example.xml file before editing it, you would use the name of the edited file instead. The output from mds-servicegroup-add should look something like this:
Processing configuration file... INFO: Processed 1 registration entries INFO: Successfully registered https://localhost:8443/wsrf/services/DefaultIndexService to servicegroup at https://localhost:8443/wsrf/services/TriggerRegistrationService
![]() | Warning |
|---|---|
In general, it's a bad idea to use loopback addresses like "localhost" or "127.0.0.1" in MDS configuration files (because if you configure a remote host to poll "localhost" for information, the remote host will poll itself, not the host that the mds-servicegroup-add command was run from). We can get away with it here because all the addresses we're using are local, but in real life, it's better to use non-local IP addresses or fully-qualified domain names |
Now, we're going to define a trigger that checks how many Entries are being registered by the Index Service and then takes actions based on the results. But first, let's check how many Entries are being registered by the Index Service. Type the following command in one line (substituting your hostname and port if appropriate):
$GLOBUS_LOCATION/bin/wsrf-query -s https://127.0.0.1:8443/wsrf/services/DefaultIndexService 'count(//*[local-name()="Entry"])'
On our setup we get: 3.
At this point, the Trigger Service is collecting information, but we haven't told it to do anything with that information. We will now follow a few simple steps to set up a trigger.
First, we'll create the trigger:
$GLOBUS_LOCATION/bin/mds-trigger-create -b https://127.0.0.1:8443/wsrf/services https://127.0.0.1:8443/wsrf/services/DefaultIndexService
The first argument (
-b https://127.0.0.1:8443/wsrf/services) specifies the Trigger Service that we want to use. The second argument specifies which monitored resource we would like to act upon. (Note: in this tutorial, we're only monitoring one resource. But we could be monitoring several, by specifying several sets of ServiceGroupRegistrationParameters in the configuration file we used with mds-servicegroup-add, or by running mds-servicegroup-add multiple times with different configuration files).The client should produce output similar to the following:
MDS4 Trigger Creation Client ---------------------------- ** Service URL: https://127.0.0.1:8443/wsrf/services/DefaultIndexService Checking current monitored services (Trigger Registrations)... OK Address: https://128.9.64.191:8443/wsrf/services/TriggerService Reference property[0]: <ns1:TriggerResourceKey xmlns:ns1="http://mds.globus.org/2007/03/TriggerResourceKey">546aae00-418b-11dd-a5ea-ebfac2dfbbee</ns1:TriggerResourceKey> --> Trigger has been created.
The
TriggerResourceKeyis anidentifier created by the Trigger Service to identify this newly-created trigger. It is sometimes also referred to as a Trigger ID.Now we have a trigger, but not a very interesting one. We can see some information about it by typing:
$GLOBUS_LOCATION/bin/mds-trigger-view -b https://127.0.0.1:8443/wsrf/services
As above, the
-b https://127.0.0.1:8443/wsrf/servicesspecifies the Trigger Service to use. If you specify a Trigger ID, thenmds-trigger-viewwill display detailed information about that trigger. In this case, we didn't, somds-trigger-viewwill display summary information about all triggers. The output should look something like the following:MDS4 Trigger View Client ------------------------ Monitored Services (Trigger Registrations) 1) /wsrf/services/DefaultIndexService TriggerID: 546aae00-418b-11dd-a5ea-ebfac2dfbbee TRIGGER NAME: Default Trigger Name MATCHING RULE: count(//*[local-name()='Entry'])<1 ACTION SCRIPT: trigger-action-default TRIGGER STATUS: disabledThis gives us some important information:
a shorthand reference to the service being monitored (the same one we specified in the
mds-trigger-createcommandthe newly-created Trigger ID (which we will use in future requests to the Trigger Service)
the matching rule (an XPath query that returns true if the number of Index Service entries is less than one)
the trigger action (if the condition specified in the matching rule is met, then the trigger will run the command mapped to the name
trigger-action-defaultin the trigger service's jndi-config.xml file). This is a script that will append a line to the file$GLOBUS_LOCATION/trigger_service_base_action_log.Most importantly, the trigger status is
disabled, which means that the matching rule will not be evaluated, nor will the trigger action be run.
The
mds-trigger-editcommand is used to change the trigger's properties (its matching rule, action, enabled/disabled status, etc.). The syntax is:mds-trigger-edit -b baseURL [TriggerID] [Parameter="Value"]
Let's enable this trigger. By enabling/activating the trigger, we turn it "on", meaning that it will take the Matching Rule and evaluate this against incoming aggregator data from our monitored service (the Default Index Service).
mds-trigger-edit -b https://127.0.0.1:8443/wsrf/services \ 546aae00-418b-11dd-a5ea-ebfac2dfbbee TriggerStatus=enabledNow that this trigger is "enabled", we have an active trigger that is evaluating data. You may notice this in the service container logs if it is running in "debug" mode (You can allow "debug" information by uncommenting:
log4j.category.org.globus.mds.trigger=DEBUGin your$GLOBUS_LOCATION/container-log4j.propertiesfile). However, in a default Globus setup, the Matching Rule for this trigger always evaluates to false, so the trigger will not fire. (The action associated with this trigger appends a line to the log file$GLOBUS_LOCATION/trigger_service_base_action_log. You can verify that the trigger is not firing by checking that the file doesn't exist (or that if it does exist, that it hasn't been appended to recently).Let's change our Matching Rule so that the trigger will evaluate to "true" and cause the trigger to fire.
mds-trigger-edit -b https://127.0.0.1:8443/wsrf/services \ 546aae00-418b-11dd-a5ea-ebfac2dfbbee \ MatchingRule="count(//*[local-name()='Entry'])>0"Typing
mds-trigger-view -b https://127.0.0.1:8443/wsrf/serviceswill summarize what we've done:MDS4 Trigger View Client ------------------------ Monitored Services (Trigger Registrations) 1) /wsrf/services/DefaultIndexService TriggerID: 546aae00-418b-11dd-a5ea-ebfac2dfbbee TRIGGER NAME: Default Trigger Name MATCHING RULE: count(//*[local-name()='Entry'])>0 ACTION SCRIPT: trigger-action-default TRIGGER STATUS: enabled
To view more details about this particular trigger, type:
mds-trigger-view -b https://127.0.0.1:8443/wsrf/services \
546aae00-418b-11dd-a5ea-ebfac2dfbbeeMDS4 Trigger View Client ------------------------ ----Detailed Trigger Information---------------------------- MONITORED SERVICE: https://127.0.0.1:8443/wsrf/services/DefaultIndexService TriggerID: 546aae00-418b-11dd-a5ea-ebfac2dfbbee TRIGGER NAME: Default Trigger Name MATCHING RULE: count(//*[local-name()='Entry'])>0 ACTION SCRIPT: trigger-action-default TRIGGER STATUS: enabled ENABLE BOOLEAN: true ACTION SCRIPT INPUT FULL ORIGINAL: true ACTION SCRIPT INPUT XPATH QUERY RESULT: true MINIMUM FIRING INTERVAL: 20 MINIMUM MATCH TIME: 30 START TIME: N/A END TIME: N/A INVALIDITY START TIME: N/A INVALIDITY END TIME: N/A ----Non-editable stats-------------------------------------- RULE LAST CHECKED AT: 2008-06-23 19:09:18 PDT-0700 CONDITION TRUE SINCE: 2008-06-23 19:03:48 PDT-0700 ACTION FIRED AT: 2008-06-23 19:09:18 PDT-0700 ------------------------------------------------------------
Now after a minute or so, you will notice that the trigger has fired successfully. You can verify this by checking the contents of the log file we created in our action script from above:
more $GLOBUS_LOCATION/trigger_service_base_action_log
This should look similar to the following
Trigger Service Entry: Sun Jun 17 14:45:26 CDT 2007
Trigger Service Entry: Sun Jun 17 14:45:56 CDT 2007
Trigger Service Entry: Sun Jun 17 14:46:26 CDT 2007
Trigger Service Entry: Sun Jun 17 14:46:56 CDT 2007
There is a 30 second interval that we specified in our aggregator configuration file above. This should probably be lengthened eventually so that you don't have the triggers going off so often.
You have now successfully setup, configured, registered, created, edited and tested a trigger from scratch!
Next Steps: Check out the documentation and create more triggers to perform actions more relevant to your own objectives. Experiment with the XPath queries to expand the possibilities of what you can use them for. If you have questions, feel free to [fixme contact us]!
For MDS Trigger troubleshooting information, see Troubleshooting MDS Trigger.
The Trigger Service collects information and acts on it, by executing an administrator-supplied executable program when certain conditions (expressed as XPath matches on the collected information) are met. The Trigger Registration Service first "registers" itself with a monitored service. Then individual triggers are created to act on data aggregated from that monitored service.
There are command-line clients designed to allow one to easily create, edit, and view the triggers.
Table of Contents
Information about how to configure existing aggregator sources (such as the aggregator sources distributed with the Globus Toolkit, which include one that polls for resource property information, one that collects resource property information through subscription/notification, and one that collects information by executing an executable program) is found in Aggregator Sources Reference; information about how to create new aggregator sources can be found in Developer's Guide.
The administrator of a Globus installation configures the set of available executable programs that are available to be used as action scripts (for example, an executable program may send mail to an end-user or write a structured log file that will later be read by some other program).
Table of Contents
The Aggregator Framework builds on the WS-ServiceGroup and WS-ResourceLifetime specifications. Those specifications should be consulted for details on the syntax of each operation.
Each Aggregator Framework is represented as a WS-ServiceGroup (specifically, an AggregatorServiceGroup).
Resources may be registered to an AggregatorServiceGroup using the
AggregatorServiceGroup Add operation. Each registration will be represented as a
ServiceGroupEntry resource. Resources may beregistered to an
AggregatorServiceGroup using the service group add operation, which
will cause an entry to be added to the service group.
The entry will include configuration parameters for the aggregator source; when the registration is made, the following will happen:
- The appropriate aggregation source and sinks will be informed,
- the aggregator source will begin collecting data and inserting it into the corresponding service group entry,
- and the aggregator sink will begin processing the information in the service group entries.
The method of collection by source and processing by the sink is dependent on the particular instantiation of the aggregator framework (see per-source documentation for source information and per-service documentation for sink information - for example the Index Service and the Trigger Service.)
-
add:This operation is used to register a specified resource with the Aggregator Framework. In addition to the requirements made by the WS-ServiceGroup specification, the Content element of each registration must be an AggregatorContent type, with the AggregatorConfig element containing configuration information specific to each source and sink (documented in the System Administrator's Guide).
Entry:This resource property publishes details of each registered resource, including both an EPR to the resource, the Aggregator Framework configuration information, and data from the sink.RegistrationCount:This resource property publishes registration load information (the total number of registrations since service startup and decaying averages)
The Aggregator Framework throws standard WS-ServiceGroup, WS-ResourceLifetime, and WS-ResourceProperties faults and does not define any new faults of its own.
Other relevant source files are the:
- WSRF service group schema
- WSRF resource lifetime schema
- MDS Usefulrp schema.
Table of Contents
In addition to the resource properties for the Aggregator Framework, the Trigger Service exposes the following:
TriggerName- This resource property allows one to arbitrarily name the trigger. This is used to assist one in managing many triggers.
TriggerStatus-
This resource property is used to indicate the
current status of the trigger. There are two states allowed:
enabledanddisabled. MemberEPR- This resource property reveals the monitored service that the trigger is associated with
TriggerID- This resource property is a unique ID assigned to the trigger. It is essentially the EPR's Resource Key.
MatchingRule- This resource property is the XPath expression that will be used in evaluating incoming aggregator data. The trigger will fire (if enabled) if the expression is "true" (in a boolean sense). But if "EnableBoolean" is set to "false", then if the MatchingRule returns any data, the trigger will fire. This is consistent with pre-4.2 trigger functionality.
NamespaceMappings- This resource property allows one to use namespaces in the MatchingRule.
ActionScript-
This resource property is the name of the action
script that should be fired when the trigger evaluation is "true". The action script
is located in the
$GLOBUS_LOCATION/libexec/trigger/directory. EnableBoolean-
This resource property is by default
true, meaning that it is set up to evaluate XPath queries as "true" or "false", firing only when "true". If this property is set to "false", then the trigger will fire only if the MatchingRule evaluation returns any data MinimumFiringInterval- The action script will not be executed more than once in this number of seconds. If unspecified, there will be no minimum interval.
MinimumMatchTime- The MatchingRule must be true for this number of seconds before the ActionScript will be executed. If unspecified, there is no minimum time period that the rule must match and the rule will be eligible to fire immediately after the MatchingRule becomes true.
StartTime- The trigger will not fire, nor will the TriggerService perform any evaluations before the StartTime, if indicated. If a start time is not indicated, the TriggerService will begin immediately performing evaluations, if the trigger is active (i.e. TriggerStatus is set to "enabled")
EndTime- The TriggerService will not perform any evaluations after the EndTime, if indicated. If an end time is not indicated, the TriggerService will continue performing evaluations (of "active" triggers) until an EndTime is specified, otherwise until the container is shutdown. After an EndTime has passed, the TriggerService will basically be doing nothing, but you may whenever you wish change the EndTime, and the trigger evaluations will then begin again until the EndTime again is reached.
InvalidityStartTime- The trigger will not fire, nor will the TriggerService perform any evaluations after the InvalidityStartTime, if indicated. If an InvalidityStartTime is indicated, an InvalidityEndTime must also be specified. During this time period, the TriggerService will not perform any evaluations, if the trigger is active (i.e. TriggerStatus is set to "enabled")
InvalidityEndTime- This parameter requires an InvalidityStartTime, and during the time period between the InvalidityStartTime and InvalidityEndTime, the TriggerService will not perform any evaluations. If there is an EndTime specified, then trigger evaluations will begin after the InvalidityEndTime until the EndTime.
ActionScriptInputFullOriginal- This parameter, if set to "true" will pass the original trigger message input (to which the matching rule was applied) to the action script. The default behavior is to always pass the entire input message to the action scripts. For action scripts which do not need to consume the unmodified input, this variable may be set to "false" in order to increase performance. For users familiar with previous versions of the Trigger Service, if you set ActionScriptInputFullOriginal to "true", this is equivalent to setting disableUnmodifiedActionScriptInput to "false", in other words it will pass the original trigger message input (to which the matching rule was applied) to the action script.
ActionScriptInputXPathQueryResult- If this value is present and set to true, the service will pass the filtered output result of the XPath MatchingRule as additional input to the stdin of the action script, in addition to the original input to which the matching rule was applied. The default behavior if unspecified is true, meaning the Xpath query result will be passed as input to the action script. For users familiar with previous versions of the Trigger Service, if you set ActionScriptInputXpathQueryResult to "true", this is equivalent to setting enableFilteredActionScriptInput to "true".
The following resource properties are not editable; they are trigger run-time statistics.
RuleLastCheckedAt- This resource property reveals when the MatchingRule was last checked/evaluated.
ConditionTrueSince-
This resource property reports since when
the MatchingRule evaluated against the incoming aggregator data results in
true ActionFiredAt- This resource property reveals exactly when the trigger was last fired.
Table of Contents
The mds-servicegroup-add(1) command in the Aggregator Framework is used to configure the Trigger Registration Service to collect information from various sources. In addition, the Trigger Service has three command-line clients
Synopsis
mds-trigger-create [options] -b baseURL monitoredURL
Description
This command creates a new trigger.
Table 9.1. mds-trigger-create options
-b baseURL | Specify the trigger service's base URL (everything in the Trigger Service URL up to the service name). This option is used instead of the customary |
monitoredURL | Specify the URL of the service to be monitored; this should be the same as the address of a service registered to the Trigger Registry Service's service group. |
Example
The first command creates a new trigger on the server triggerhost.org to monitor the information in the default Index Server running in the same Globus container. The second command creates a new trigger on the server triggerhost.org to monitor the information in an Index Server running on the server otherhost.org
mds-trigger-create -b https://triggerhost.org:8443/wsrf/services \
https://triggerhost.org:8443/wsrf/services/DefaultIndexService
mds-trigger-create -b https://triggerhost.org:8443/wsrf/services \
https://otherhost.org:8443/wsrf/services/DefaultIndexService
Synopsis
mds-trigger-view [options] -b baseURL [TriggerID]
Description
This displays information about triggers.
Table 9.2. mds-trigger-view options
-b baseURL | Specify the trigger service's base URL (everything in the Trigger Service URL up to the service name). This option is used instead of the customary |
TriggerID | If a Trigger ID is specified, detailed information about the specified trigger will be displayed; if not, summary information about all triggers will be displayed. |
Example
The first command displays summary information about all triggers known to the Trigger Service; the second displays detailed information about one trigger
mds-trigger-view -b https://triggerhost.org:8443/wsrf/services
mds-trigger-view -b https://triggerhost.org:8443/wsrf/services \
546aae00-418b-11dd-a5ea-ebfac2dfbbee
Synopsis
mds-trigger-edit [options] -b baseURL TriggerID Parameter=Value
Description
This command is used to modify trigger parameters, in order to change the trigger conditions, actions, status (enabled or disabled), etc.
Table 9.3. mds-trigger-edit options
-b baseURL | Specify the trigger service's base URL (everything in the Trigger Service URL up to the service name). This option is used instead of the customary |
TriggerID | The identifier of the trigger to be modified |
Param=value | Set the named parameter to the specified value. The parameter can be any writable Trigger Service resource property |
Examples
The first command enables a trigger; the second command disables it.
mds-trigger-edit -b https://triggerhost.org:8443/wsrf/services \
546aae00-418b-11dd-a5ea-ebfac2dfbbee \
TriggerStatus=enabled
mds-trigger-edit -b https://triggerhost.org:8443/wsrf/services \
546aae00-418b-11dd-a5ea-ebfac2dfbbee \
TriggerStatus=disabled
Change the trigger condition (matching rule) so that the trigger fires if there are no Index Service entries.
mds-trigger-edit -b https://triggerhost.org:8443/wsrf/services \
546aae00-418b-11dd-a5ea-ebfac2dfbbee \
MatchingRule="count(//*[local-name()='Entry'])=0"
Change the trigger action.
mds-trigger-edit -b https://triggerhost.org:8443/wsrf/services \
546aae00-418b-11dd-a5ea-ebfac2dfbbee \
ActionScript=trigger-action-input-default
Table of Contents
The set of possible actions (programs) that can be executed by the Trigger Service is specified in the file $GLOBUS_LOCATION/etc/globus_wsrf_mds_trigger/jndi-config.xml. The executableMappings parameter contains a comma-separated list of name=value pairs. The left hand side of each name/value pair is the name assigned to the trigger action; this name can be used in trigger definitions. The right hand side of each name/value pair is the path name (relative to $GLOBUS_LOCATION/libexec/trigger of the file to execute.
The sources of information used by the Trigger Service are configured
using the mds-servicegroup-add command; see the Aggregator Framework documentation or the Trigger Service Easy HOWTO for more details and examples.
Triggers themselves are created using the command line clients.
The release contains WebMDS which can be used to display the status of resources registered to a Trigger Service in a normal web browser.
The public interfaces for creating and configuring aggregator sources -- sources of information used by the trigger service -- can be found inAggregator Sources Reference.
Table of Contents
Log output from WS MDS is a useful tool for debugging issues. Because WS MDS is built on top of Java WS Core, developer debugging is the same as described in Chapter 10, Debugging. For information on sys admin logs, see Chapter 6, Debugging.
The following information applies to Java WS Core and those services built on it.
Logging in the Java WS Core is based on the Jakarta Commons Logging API. Commons Logging provides a consistent interface for instrumenting source code while at the same time allowing the user to plug-in a different logging implementation. Currently we use Log4j as a logging implementation. Log4j uses a separate configuration file to configure itself. Please see Log4j documentation for details on the configuration file format.
Server side logging can be configured in $GLOBUS_LOCATION/container-log4j.properties, when the container is stand alone container. For tomcat level logging, refer to Logging for Tomcat, . The logger log4j.appender.A1 is used for developer logging and by default writes output to the system output. By default it is set for all warnings in the Globus Toolkit package to be displayed.
Additional logging can be enabled for a package by adding a new line to the configuration file. Example:
#for debug level logging from org.globus.package.FooClass log4j.category.org.globus.package.name.FooClass=DEBUG #for warnings from org.some.warn.package log4j.category.org.some.warn.package=WARN
Client side logging can be configured in $GLOBUS_LOCATION/log4j.properties. The logger log4j.appender.A1 is used for developer logging and by default writes output to the system output. By default it is set for all warnings in the Globus Toolkit package to be displayed.
To turn on debug logging for the Trigger Service, add the line:
log4j.category.org.globus.mds.trigger=DEBUG
to the appropriate properties file. Since the Trigger Service is implemented using the Aggregator Framework, you may also want to turn on aggregator debugging by adding this line:
log4j.category.org.globus.mds.aggregator=DEBUG
Table of Contents
For a list of common errors in GT, see Error Codes.
Table 15.1. Java WS Core Errors
| Error Code | Definition | Possible Solutions |
|---|---|---|
Failed to acquire notification consumer home instance from registry | Caused by javax.naming.NameNotFoundException: Name services is not bound in this Context error. | Please see Running client programs from any directory if a client fails with this error. |
The WS-Addressing 'To' request header is missing | This warning is logged by the container if the request did not contain the necessary WS-Addressing headers. The client either did not attempt to send those headers at all or is somehow misconfigured. | If you are using a
Java client and launching it directly using the java executable,
take a look at Appendix B, Running client programs from any directory.
|
java.io.IOException: Token length X > 33554432 | If you see this error in the container log, it usually means you are trying to
connect to HTTPS server using HTTP. For example, the service address specifies
8443 as a port number and
http as the protocol name. | In general, use
8443 port number with the
https protocol, and 8080 port
number with the http protocol. |
java.lang.NoSuchFieldError: DOCUMENT | This error usually indicates a mismatch between the version of Apache Axis that the code was compiled with and the version of Axis that the code is currently running with. | Make sure that the same version of Axis is used at compile time and at runtime. |
org.globus.wsrf. InvalidResourceKeyException: Argument key is null / Resource key
is missing | These errors usually indicate that a resource key was not passed with the request or that an invalid resource key was passed with the request (that is, the element QName of the resource key did not match what the service expected). | Make sure that the EPR used to invoke the service that contains the appropriate resource key. If
you are using some command-line tool make sure
to specify the resource key using the -k option or pass a
complete EPR from a file using the -e option. |
Unable to connect to localhost:xxx | Cannot resolve localhost. The machine's /etc/hosts isn't set up correctly and/or you do not have DNS for these machines. |
There should always be an entry in /etc/hosts (or /etc/hostname/ on Debian)
for localhost in the following format (IP address/fully qualified domain name/short name):
140.221.8.109 cognito.mcs.anl.gov cognito |
org.globus.common.ChainedIOException: Failed to initialize security context | This may indicate that the user's proxy is invalid. | To correct the error, the user must properly initialize the user proxy. See grid-proxy-init for more information on proxy initialization. |
Error: org.xml.sax.SAXException: Unregistered type: class xxx | This may indicate that an Axis generated XML type, defined by the WS RLS XSD, was not properly registered. While all the XML types should get registered upon deployment without intervention by the user, sometimes they do not. | To remedy the situation add a typeMapping to the server-config.wsdd file under globus_wsrf_replicalocation_service.
Use the format shown here. |
No socket factory for 'https' protocol | When a client fails with the following exception: java.io.IOException: No socket factory for 'https' protocol at
org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:179) at
org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:397) at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:135)FIXME - it may have happened because... | Add the following to the client: import org.globus.axis.util.Util; ... static { Util.registerTransport(); }
... |
No client transport named 'https' found | When a client fails with the following exception: No client transport named 'https' found at
org.apache.axis.client.AxisClient.invoke(AxisClient.java:170) at
org.apache.axis.client.Call.invokeEngine(Call.java:2726)
The client is most likely loading an incorrect | Ensure that the GT4 installation
directory is listed as the first entry in the CLASSPATH=/usr/local/globus-4.2.0:/foo/bar/others.jar:... If you are seeing this problem in Tomcat, copy the |
ConcurrentModificationException in Tomcat 5.0.x | If the following exception is visible in the Tomcat logs at
startup, it might cause the java.util.ConcurrentModificationException at
java.util.HashMap$HashIterator.nextEntry(HashMap.java:782) at
java.util.HashMap$EntryIterator.next(HashMap.java:824) at
java.util.HashMap.putAllForCreate(HashMap.java:424) at
java.util.HashMap.clone(HashMap.java:656) at
mx4j.server.DefaultMBeanRepository.clone(DefaultMBeanRepository.java:56)
The java.lang.NullPointerException at
org.apache.coyote.tomcat5.CoyoteRequest.setAttribute(CoyoteRequest.java:1472) at
org.apache.coyote.tomcat5.CoyoteRequestFacade.setAttribute(CoyoteRequestFacade.java:351) at
org.globus.tomcat.coyote.valves.HTTPSValve.expose(HTTPSValve.java:99)
These exceptions will prevent the transport security from working properly in Tomcat. | This is a Tomcat bug. Keep restarting Tomcat until it starts
without the
|
java.net.SocketException: Invalid argument or
cannot assign requested address | FIXME - what causes this? | If you see the $ export GLOBUS_OPTIONS="-Djava.net.preferIPv4Stack=true" |
GAR deploy/undeploy fails with container is running error | A GAR file can only be deployed or undeployed locally while the container is off. However, GAR deployment/undeployment might still sometimes fail with this error even if the container is off. This usually happens if the container has crashed or was stopped improperly, preventing the container from cleaning up its state files. | To resolve
this problem, delete any files under the
|
In general, if you want to investigate a problem on your own please see Chapter 10, Debugging for details on how to turn on debugging.
Most of the command line clients have a
-debugoption that will display more detailed error messages, including the error stack traces.Search the mailing lists such as gt-user@globus.org or jwscore-user@globus.org (before posting a message).
If you think you have found a bug please report it in our Bugzilla system. Please include as much as detail about the problem as possible.
Specifications for resource properties, service groups, and subscription/notification are available athttp://www.globus.org/wsrf/.
A
- Aggregator Framework
A software framework used to build services that collect and aggregate data. WS MDS Services (such as the Index and Trigger services) are built on the Aggregator Framework, and are sometimes called Aggregator Services.
- aggregator source
A Java class that implements an interface (defined as part of the Aggregator Framework) to collect XML-formatted data. WS MDS contains three aggregator sources: the query aggregator source, the subscription aggregator source, and the execution aggregator source.
W
- Web Services Addressing (WSA)
The WS-Addressing specification defines transport-neutral mechanisms to address web services and messages. Specifically, it defines XML elements to identify web service endpoints and to secure end-to-end endpoint identification in messages. See the W3C WS Addressing Working Group for details.
A
- aggregator sources, Aggregator sources
- apis, APIs
- architecture, Architecture and design overview
C
- command line clients
- admin, MDS Trigger Commands
- compatibility, Backward compatibility summary
- configuration interface
- Trigger Service-specific, Additional configuration for the Trigger Service
D
- debugging, Debugging
- dependencies, Technology dependencies
F
- features, Feature summary
G
- GUI
- WebMDS, Graphical User Interface
P
- platforms, Tested platforms
R
- related documents, Related Documentation
- resource properties, Trigger Service Resource Properties
- ActionFiredAt, Trigger Service Resource Properties
- ActionScript, Trigger Service Resource Properties
- ActionScriptInputFullOriginal, Trigger Service Resource Properties
- ActionScriptInputXPathQueryResult, Trigger Service Resource Properties
- ConditionTrueSince, Trigger Service Resource Properties
- EnableBoolean, Trigger Service Resource Properties
- EndTime, Trigger Service Resource Properties
- InvalidityEndTime, Trigger Service Resource Properties
- InvalidityStartTime, Trigger Service Resource Properties
- MatchingRule, Trigger Service Resource Properties
- MemberEPR, Trigger Service Resource Properties
- MinimumFiringInterval, Trigger Service Resource Properties
- MinimumMatchTime, Trigger Service Resource Properties
- NamespaceMappings, Trigger Service Resource Properties
- RuleLastCheckedAt, Trigger Service Resource Properties
- StartTime, Trigger Service Resource Properties
- TriggerID, Trigger Service Resource Properties
- TriggerName, Trigger Service Resource Properties
- TriggerStatus, Trigger Service Resource Properties
T
- trigger action script, Trigger Action Script
- tutorial
- basic, Trigger Service - Easy HowTo
U
- usage scenarios, Usage scenarios
![[Warning]](/docbook-images/warning.gif)