4 - Initiators

AXT Logo

4. Initiators

The client initiator uses standard tcp sockets for sending the messages to the AXT server.
A socket-to-jms bridge accepts the messages and injects them into AXT.
The socket bridge maintains the connection to the client during the life of the message.

Initiators are available in C, Perl and Java.

The initiator sends the message into a local daemon (axt-daemon) which maintains the message persistency and manages stale staged files.

When the message acknowledgement (ACK) is received, the responsibility for the file transfer is assigned to the AXT server and persistency files are purged.

The client can maintain a connection after the ACK to receive information from AXT on the actions taken.

The initiators and their functions are:

axt-daemon - Initiator controller for the remote node

axt-exec - Perform a command on a destination system or group
axt-control - Perform an AXT control action (eg: GetLog, Ping, etc.)
axt-message - Perform messaging to a destination system (eg: HP OpenView opcmsg command) for alerting
axt-transfer - Perform a file transfer to a destination or group

 

Remote Initiator Controller (axt-daemon)

The axt-daemon tool is used to manage the relay of messages from the client initiators to the AXT server.

The axt-daemon tool also manages the staging stoage space and the persistency of messages.

Syntax:

axt-daemon [-hv] [-c configuration file]

Flags:

-c Define a configuration file different from the default for axt-daemon options
-h Print the command help text
-v Perform control verbosely (Multiple to increase verbosity)

 

Message Relaying:

axt-daemon will accept messages from the client initiator and establish the connection to the AXT server for sending the messages.

All responses will be written to the client.

 

Persistency Management:

When the AXT Daemon receives an actoin, it will persist the action and send a LCL (Local) message to the client.

If an ACK message is received from the AXT server, the persisted message is removed.

If no acknowledgement is received from the AXT server, the message will remain persisted and will retry at the interval defined in the configuration file.

The retry of the action will continue until an ACK is received from the AXT server.

 

Staging Management:

The axt-daemon will monitor the staging area for staging messages that have been left behind due to transfers that exit before removal of the staging file (eg: transfers with a LCL response threshold).

Staged files are removed if they remain in the staging area past the age defined in the configuration file.

 

Configuration:

The AXT Daemon reads the axt_client.cfg file for operating defaults.

axt_client.cfg file values are:

DAEMONHOST AXT Daemon listening interface
DAEMONPORT AXT Daemon listening port number
AXTHOST AXT server ip address or hostname
AXTPORT AXT server port number
ERR_OUT_DEST Destination for error messages (using AXT message)
STAGE_DIR Location of staging files
STAGE_AGE Age of stale staging files before removal (in seconds)
PERSIST_DIR Location for persistency files
PERSIST_AGE Time between retry of the sending of persistent messages (in seconds)

 

By default, ACK, WRN and DIE messages are printed. Use the -v (verbose) flag to obtain more information.

 

 

Command Initiator (axt-exec)

The axt-exec tool is used to initiate a command on an AXT node.

Syntax:

axt-exec [-hv] [-R response level] -D Destination_Node Execute_Command

Flags:

-D Destination_Node

Destination to perform command on.

Destination group names must be preceeded by an asterisk(*).

-h Print the command help text
-R Response_Level
Perform transfer until the response defined is received (See response levels in section 1.3)
-v Perform control verbosely (Multiple to increase verbosity)

 

By default, ACK, LOG, WRN and DIE are returned.For more messages, use the -v (verbose) flag.

axt-exec does not exit until an error (DIE) or completion (END) message is received from the AXT server by default.
This can be overridden by the -R flag.
e.g.: axt-exec -R LCL -D *Prod hostname

 

The client sends messages to the axt-daemon which manages the persistence of the action.

 

NOTE: For testing commands from a new client installation, run "axt-control -D <AXT Host> hostname" (Where <AXT Host> is the AXT Server).

 

 

Control Initiator (axt-control)

The axt-control tool is used to initiate a control action on the AXT server.

Syntax:

axt-control [-hv] [-R response level] -A Control_Name [Control_Value]

Flags:

-A Control_Name Control Name
-h Print the command help text
-R Response_Level
Perform transfer until the response defined is received (See response levels in section 1.3)
-v Perform control verbosely (Multiple to increase verbosity)

 

By default, ACK, LOG, WRN and DIE are returned.For more messages, use the -v (verbose) flag.

 

axt-control does not exit until an error (DIE) or completion (END) message is received from the AXT server by default.
This can be overridden by the -R flag.
e.g.: axt-control -a Purge 7 -R ACK

 

Control values can be provided when the control accepts arguments.

Running the control name ListControls will return all the controls available on the AXT server.

 

Default Controls are:

 

  • AddNode
  • AddNodeConnector
  • AddNodeValue
  • AddTransformationTag
  • GetLog
  • KillThread
  • ListActions
  • ListControls
  • ListNodes
  • ListNodeConnectors
  • ListNodeValues
  • ListThreads
  • ListTransformationTags
  • Ping
  • Purge
  • RemoveNodeConnector
  • RemoveNodeValue
  • RemoveTransformationTag
  • Requeue
  • SetNodeConnectorPriority
  • SetNodeInactive
  • SetNodeActive

 

The standard client communicates to the AXT server through sockets (through the socket-to-jms bridge - see section 2.2). The java client communicates to the AXT server through Java JMS Messages.

 

NOTE: For testing communication from a new client installation, running "axt-control -A Ping" helps.

 

 

Message Initiator (axt-message)

The axt-message tool is used to initiate a message to an AXT node.

Usage: axt-message \nExample: \n";

Syntax:

axt-message [-hv] [-R response level] [-D Destination_Node] [severity=normal|warning|minor|major|critical] [msg_grp=<message group>] [node=<node>] [service_id=<svcid>] application=<application> object=<object> msg_text=<text>

Flags:

-D Destination_Node

Destination to perform command on.

Destination group names must be preceeded by an asterisk(*).

-h Print the command help text
-R Response_Level
Perform transfer until the response defined is received (See response levels in section 1.3)
-v Perform control verbosely (Multiple to increase verbosity)
severity=normal|warning|minor|major|critical Set the severity of the message
msg_grp=<message group> Define the message group
node=<node> Define the message node name
service_id=<service id> Define the message service id
application=<application> Define the messaging application
object=<object> Define the messaging object
msg_text=<text> Define the message text

 

By default, ACK, LOG, WRN and DIE are returned.For more messages, use the -v (verbose) flag.

axt-message does not exit until an error (DIE) or completion (END) message is received from the AXT server by default.
This can be overridden by the -R flag.
e.g.: axt-message -R LCL severity=major application=TEST object=TEST msg_txt="Hello World"

 

The client sends messages to the axt-daemon which manages the persistence of the action.

 

NOTE: For testing messages from a new client installation, run "axt-message -D <AXT Host> application=TEST object=TEST msg_text="Test Message" " (Where <AXT Host> is the AXT Server).

 

 

Transfer Initiator (axt-transfer)

The axt-transfer tool is used to initiate a transfer request on the AXT server.

Syntax:

axt-transfer [-hsv] [-d #] <[-S source -D [*]destination]||[-T transformation]> [-R response level]

Flags:

-d Debug output level
-D File_URL

Destination File URL

(eg: user1:userpass@sysb:/tmp/testfile)

-h Print the command help text
-R Response_Level
Perform transfer until the response defined is received (See response levels in section 1.3)
-s Stage the data file before initiating the transfer
-S File_URL

Source File URL

(eg: /tmp/testfile)

-T Transformation_Name Perform the action as defined in the transformation name provided

 

 

Staging of the source data file is managed by axt-transfer if the "-s" flag is supplied.
If the "-s" flag is provided, the source file location is rewritten to match the new staging file name and location.
The staging location, prefix and unmanaged lifetime is defined in the client configuration file (see section 3.2).

 

Source files are validated with an MD5 checksum, provided by axt-transfer, that is confirmed on the AXT server after it have been pulled from the source.

 

By default, only WRN, ERR and DIE are returned. The LOG, ACK and END messages are printed to STDOUT if the -v (verbose) flag is provided. For other message display, use the -d flag.

 

axt-transfer does not exit until an error (DIE) or completion (END) message is received from the AXT server by default.
This can be overridden by the -R flag.
e.g.: axt-transfer -S /tmp/testfile -D sysb:/tmp/testfile -R ACK

 

The standard client communicates to the AXT server through sockets (through the socket-to-jms bridge - see section 2.2). The java client communicates to the AXT server through Java JMS Messages.

 

Transformation functionality has been integrated into the axt-transfer initiator. For performing transformed file transfers, call the initiator with the "-T" flag and the transformer name:
e.g.: axt-transfer -T SETTLEMENT