Traffic Monitor API
The Gateway provides a historic record of events associated with traffic passing through itself. These events include
- Transaction summaries.
- Payloads in requests and responses.
- Trace information associated with a set of related transactions
The Gateway exposes a REST API which allows the contents of this datastore to be queried.
This API also allows some runtime configuration of the gateway, including:
- Set Logging Settings Dynamically (no restart or refresh)
- Change Trace Levels Dynamically (DEBUG/ERROR..)
- List the Services which are deployed on the Gateway
- List the authenticated clients
The Traffic Monitor running within the Management Console (see Traffic tab) at http://localhost:8090/ is a client of this API.
Overview
Each inbound transaction to the gateway creates a "Correlation", which is identified by a "Correlation ID". A correlation ID can have multiple "Leg"s, with each leg being a transaction related to that correlation. The original incoming transaction is assigned as Leg 0. Any outbound transactions carried out while processing Leg 0 are assigned the next leg number in sequence.
Each correlation has a sequence of events associated with it, and each event can be associated with a specific leg of that correlation. Events are also tagged with a string - this identifies the type of the data in the event's payload. Tags include
- "sent"
- "received"
- "trace"
- "opevent"
opevent events record the details of a transaction, and are assigned a type. Types include
- "http"
- "dirscan"
- "filetransfer"
The types of opevent s form an inheritance hierarchy. http opevent s are transactions, which in turn are opevent s.
Each opevent consists of a set of named attributes and an associated value. The value may be a string or a number. The fields present in an opevent are determined by the opevent's type.
Sample Scripts
Some jython scripts that employ the Traffic Monitor API are shipped with the product. They reside in $VINSTDIR/samples/scripts/monitor.
Script | Description |
---|---|
filterStatus.py | Prints the status of filters that got executed for the message associated with the supplied CorrelationID. If the message passed, all successful filters are printed, otherwise all failed filters are printed. |
getMessagePath.py | Prints the circuit path (i.e. message path) that was executed as part of message processing for the supplied CorrelationID. |
Traffic Monitor Datastore Resources
Resource | Description |
---|---|
GET /ops/data/{correlationID}/{legID}/ | Retrieve a summary of the message associated with the specified correlationID and legID |
GET /ops/getdistinctvalues | Retrieves data from the Traffic Monitor transactions database and filters based on the supplied field |
GET /ops/search | List messages based on a range of specified criteria |
GET /ops/showtype/{protocol} | Retrieves the meta-data thats stored in the Transaction Database for the specified protocol |
GET /ops/stream/{correlationID}/{legID}/{tag} | Streams data directly from the Transaction Data file associated with the specified correlationID and legID |
GET /ops/trace/{correlationID} | Retrieves the trace for the message associated with the specified correlationID. |
GET /ops/{protocol}/{correlationID}/{legID}/getinfo | Retrieves information about the reqeust associated with the specified correlationID and legID |
GET /ops/performance | Retrieves performance data by category |
Service Configuration Resources.
Resource | Description |
---|---|
GET /ops/getserviceconfig | Retrieves the configuration settings currently deployed in the API Server |
GET /ops/setserviceconfig | Allows a range of API Server configuration settings to be updated dynamically, without requiring a re-deployment. |