Configuring the Probe for Message Bus to integrate with Juniper Contrail Alerts
The Message Bus Probe can be used to integrate with Juniper Contrail Alerts using the EventSource transport and the HTTPS REST transport. In the EventSource transport, there is an additional multi channel HTTPS REST transport component that can be enabled for Juniper Contrail. The probe supports HTTP REST and HTTPS REST for integrating with Juniper Contrail to stream live alarms with or without using an access token.
- message_bus_contrail.props
- message_bus_contrail.rules
- message_bus_contrail.lookup
- message_bus_contrail_parser.json
- contrailMulitChannelHttpTransport.json
- contrail-param-token-request.json
- eventSourceTransport.properties
To integrate with Juniper Contrail Alerts, use the following steps:
- Edit the following line in the message_bus_contrail.rules file to include
the correct path to the message_bus_contrail.lookup
file.
include "/opt/IBM/tivoli/netcool/omnibus/probes/linux2x86/message_bus_contrail.lookup"
- Configure message_bus_juniper_contrail.props for Juniper Contrail
Alerts.The Probe integration for Juniper Contrail Alerts uses the Probe for Message Bus configured by the message_bus_juniper_contrail.props file supplied with the probe. The following default probe properties are provided for the integration with Juniper Contrail Alerts. The
EventSource
transport is selected as the main transport type for this integration.#====================================================================== # SETTING PROBE LOGS, PROPS, RULES #====================================================================== Server : 'NCOMS' Manager : 'JunpierContrailSSE' MessageLog : '$OMNIHOME/log/message_bus_juniper_contrail_sse.log' PropsFile : '$OMNIHOME/probes/message_bus_contrail.props' RulesFile : '$OMNIHOME/probes/message_bus_contrail.rules' #====================================================================== # SETTING TRANSPORT TYPE #====================================================================== TransportType : 'EventSource' TransportFile : '$OMNIHOME/java/conf/eventsourceTransport.properties' #====================================================================== # SETTING PARSER CONFIGURATIONS. (SUPPORTS JSON OR XML) #====================================================================== # FOR PARSING JSON DATA TransformerFile : '$OMNIHOME/probes/contrailMultiChannelHttpTransport.json' MessagePayload : 'JSON' #====================================================================== # SETTING CREDENTIALS FOR AQUIRING ACCESS TOKEN #====================================================================== Username : 'contrail_username' Password : 'contrail_password' #====================================================================== # SETTING SSL & KEYSTORE #====================================================================== EnableSSL : 'true' KeyStore : '/keystore.jks' KeyStorePassword : 'keystore_password' #====================================================================== # SETTING FOR CONNECTION RETRY #====================================================================== RetryCount: 5 RetryInterval : 30
- Configure eventSourceTransport.properties for the Juniper Contrail Alerts integration:
httpConnectionPropertiesFile=$OMNIHOME/java/conf/contrailMultiChannelHttpTransport.json
Note: If httpConnectionPropertiesFile is set to an empty string, it will not enable the support for HTTP REST communication which is required in the Juniper Contrail Alerts integration. You must ensure that this property is properly configured. - Configure contrailMultiChannelHttpTransport.json for settings on REST
requests. Default settings have been provided.
Alarm streaming with access token:
- Access token request takes place in the operation set for GET_ACCESS_TOKEN.
- The HTTP REST body for access token request should be specified in either
content
orcontent_file
. - The field
content
has precedence overcontent_file
: A configured “content” will be used in the HTTP REST body.
- A configured
content_file
must point to a valid file whose content will be flattened to a single line as the body in HTTP REST.
{ "GLOBAL": { "httpVersion":"1.1", "httpHeaders":"", "responseTimeout":"10", "securityProtocol":"TLSv1.2", "keepTokens":"X-Subject-Token", "tokenEndpointURI":"", "autoReconnect":"OFF", "gatherSubsTopicInfo":"false" }, "LOGIN": { "GET_ACCESS_TOKEN": { "uri":"http://<HOST>:<PORT>/v3/auth/tokens", "method":"POST", "headers":"Accept=application/json,Content-Type=application/json,User-Agent=IBM Netcool/OMNIBus Message Bus Probe", "content":"", "contentFile" : "<PATH>/param-token-request.json", "interval":"0", "attempts":"0", "requireSSL":"false", "asEventStream" : "false" } }, "SUBSCRIBE": { "GET_SUBSCRIPTION": { "uri":"http://<HOST>:<PORT>/analytics/uve-stream?tablefilt=control-node", "method":"GET", "headers":"Connection=Keep-Alive,X-Auth-Token=++X-Subject-Token++,Accept=text/event-stream,Use-Cookie=true,User-Agent=IBM Netcool/OMNIBus Message Bus Probe", "content":"", "contentFile" : "", "interval":"0", "attempts":"0", "requireSSL":"false", "asEventStream" : "true" } }, "RESYNC": { }, "LOGOUT": { } }
REST body for access token:
The probe will replace
++Username++
and++Password++
tokens in the json messages with the configured value of probe properties: Username and Password.{ "auth": { "identity": { "methods": [ "password" ], "password": { "user": { "name": "++Username++", "password": "++Password++", "domain": { "id": "default", "name": "Default" } } } }, "scope": { "project": { "name": "admin", "domain": { "id": "default", "name": "Default" } } } } }
Alarm streaming without access token:
Note:
LOGIN
is empty as there is no access token request required.{ "GLOBAL": { "httpVersion":"1.1", "httpHeaders":"", "responseTimeout":"10", "securityProtocol":"TLSv1.2", "keepTokens":"X-Subject-Token", "tokenEndpointURI":"", "autoReconnect":"OFF", "gatherSubsTopicInfo":"false" }, "LOGIN": { }, "SUBSCRIBE": { "GET_SUBSCRIPTION": { "uri":"<HOST>:<PORT>/analytics/uve-stream?tablefilt=control-node", "method":"GET", "headers":"Connection=Keep-Alive,X-Auth-Token=++X-Subject-Token++,Accept=text/event-stream,Use-Cookie=true,User-Agent=IBM Netcool/OMNIBus Message Bus Probe", "content":"", "contentFile" : "", "interval":"0", "attempts":"0", "requireSSL":"false", "asEventStream" : "true" } }, "RESYNC": { }, "LOGOUT": { } }