Question & Answer
Question
How can you test the Message bus probe for webhook on Linux without a certificate authority?
Cause
The Message bus probe requires CA signed certificate or self-signed certificate to work. This SSL certificate needs to reference the host that the webhook is addressed with.
Answer
The attached file provided includes a directory with a number of scripts that can run in Lunix.
The README file explains how to use the commands.
To create the probes JKS file for a host named myprobesrver.company.com perform these tasks:
cd CERTS
../createWebhookSSL_cmdline.sh myprobesrver.company.com $NCHOME/platform/linux2x86/jre64_1.8.0/jre
cd CERTS
../createWebhookSSL_cmdline.sh myprobesrver.company.com $NCHOME/platform/linux2x86/jre64_1.8.0/jre
The main files required to run the message probe and access it are KeyStore.jks and caroot.cert.
Place the KeyStore.jks file in a suitable location for testing.
For example:
For example:
/tmp/KeyStore.jks
Create a set of message bus probe files for testing the probes behavior.
File: message_bus_testing_ssl.props
# Best practice - Object Server
NetworkTimeout : 15
PollServer : 60
Buffering : 1
BufferSize : 200
FlushBufferInterval : 11
# Transport - Webhook
TransportType : 'Webhook'
TransportFile : '${OMNIHOME}/probes/linux2x86/WebhookTransportSSL.properties'
Host : 'myprobesrver.company.com'
Port : 8080
# Turn off heartbeating
HeartbeatInterval : 0
# SSL settings
EnableSSL : 'true'
KeyStore : '/tmp/KeyStore.jks'
KeyStorePassword : 'netcool'
# EOF
NetworkTimeout : 15
PollServer : 60
Buffering : 1
BufferSize : 200
FlushBufferInterval : 11
# Transport - Webhook
TransportType : 'Webhook'
TransportFile : '${OMNIHOME}/probes/linux2x86/WebhookTransportSSL.properties'
Host : 'myprobesrver.company.com'
Port : 8080
# Turn off heartbeating
HeartbeatInterval : 0
# SSL settings
EnableSSL : 'true'
KeyStore : '/tmp/KeyStore.jks'
KeyStorePassword : 'netcool'
# EOF
File: ${OMNIHOME}/probes/linux2x86/WebhookTransportSSL.properties
# Enable TLSv1.2
securityProtocol=TLSv1.2
# Webhook https://Host:Port/probe/webhook
webhookURI=/probe/webhook
# Allow any URI
validateRequestURI=OFF
idleTimeout=180
# EOF
securityProtocol=TLSv1.2
# Webhook https://Host:Port/probe/webhook
webhookURI=/probe/webhook
# Allow any URI
validateRequestURI=OFF
idleTimeout=180
# EOF
Run the message bus probe from the command line to log out the messages to standard output:
$NCHOME/omnibus/probes/nco_p_message_bus ./message_bus_testing_ssl.props -messagelog stdout -messagelevel debug
To test the connectivity from a Linux host using curl use the script provided:
./check_ssl_json_port.sh myprobesrver.company.com 8080
...
< HTTP/1.1 200 OK
...
< HTTP/1.1 200 OK
The probe will log the message :
test: Message text
test: Message text
[{"Type":"MASTER","Line of Business":{"code":"LOB45","label":"Automation"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSSHTQ","label":"Tivoli Netcool\/OMNIbus"},"ARM Category":[{"code":"a8m500000008a8TAAQ","label":"Probes->1 Individual Probes->Message Bus JSON XML nco_p_message_bus"}],"ARM Case Number":"","Platform":[{"code":"PF016","label":"Linux"}],"Version":"All Versions"}]
Was this topic helpful?
Document Information
Modified date:
23 June 2021
UID
ibm16466309