Deploying and Managing Apama Applications > Managing and Monitoring over REST
Managing and Monitoring over REST
Apama provides a REpresentational State Transfer (REST) HTTP API with which you can monitor Apama components. The monitoring capabilities are available to third-party managing and monitoring tools or to any application that supports sending and receiving XML documents over the HTTP protocol.
Apama components expose several URIs which can be used to either monitor or manage different parts of the system. Some are exposed by most Apama components. These are the generic management URIs. Some are exposed only by specific types of components. For example a correlator running on the default port of 15903 will expose a URI at http://localhost:15903/correlator/status. If an HTTP GET is issued against the URI, the correlator will return an XML document with the current status of the correlator.
Most URIs are purely for informational purposes and will only respond to HTTP GET requests and interacting with them will not change the state of the component. However, some URIs allow the state of the correlator to be modified. They will respond to one or more of the other HTTP methods. For example the /logLevel URI will accept an HTTP PUT request containing an XML document describing what the log level of the component should be set to. Note that in this case it will also accept a GET request which will report the current log level of the component, in keeping with REST principles.
All requests and responses over these interfaces have the same, simple elements. Those elements are: prop, map and list. All elements have a name attribute. The prop element simply represents a name-value pair with the name contained in the name attribute and the value being the content of the element. The map element is an unordered list of named elements which might be any of the three sets of elements though it is quite typically simply a map of prop elements. See the /info URI as an example. The list is very similar to the map element except that here the order is typically regarded as significant. All responses from these URIs have a top-level element with the name “apama-response” and similar all requests which are sent to these URIs should have a top-level element with the name “apama-request”. If there is an error then a response called “apama-exception” will be returned.
The /connections URL in the Generic Management section is a good example of all these elements being used together. The top level element is a map which has two children, both lists, called senders and receivers. The lists contain a map for each sender and receiver. Each sender or receiver has a set of prop elements.
Method
URI
Description
GET
/info
Summary information about the component including its name, version, etc.
GET
/ping
Check if the component is running.
GET
/deepPing
Check if the component is running.
GET
/logLevel
Display the current log level of the component.
PUT
/logLevel
Issues a request to change the log level of the component
GET
/connections
Display the connections to the component.
GET
/info/argv
Display the arguments that were specified when the component was started.
GET
/info/envp
Display the names and values of the environment variables in use.
GET
/info/categories
Display the categories available; currently argv and envp.
GET
/correlator/status
Display the runtime operational status of a running correlator.
GET
/correlator/info
Display information about the state of a running event correlator.
GET
/iaf/status
Summary information about the IAF component.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.