Amazon Web Services
CurlPerl- Scope-based event grouping
For details see: https://www.ibm.com/support/knowledgecenter/en/SSSHTQ_8.1.0/omnibus/wip/install/task/omn_con_ext_installingscopebasedegrp.html
- aws_NHttp_MsgBusProbe.pl
- aws_create_MsgBusTools.sql
- aws_remove_MsgBusTools.sql
- awsWebhookTransport.properties
- message_bus_aws.props
- message_bus_aws.rules
- message_bus_aws.json
chmod +x <filename>.- Update the following property in the
awsWebhookTransport.propertiesfile:webhookURI=/probe/awsNote: The value set for webhookURI must be consistent with the message endpoint configured on AWS. - Set the following properties in the message_bus_aws.props
file:
. . . Server : '<YOUR_OBJECT_SERVER>' JsonParserName : 'AWS' TransformerFile : '${OMNIHOME}/probes/<platform>/message_bus_aws.json' RulesFile : '$OMNIHOME/probes/<platform>/message_bus_aws.rules' Host : '<probe_server_IP>' Port : <probe_server_port> TransportFile : '${OMNIHOME}/java/conf/awsWebhookTransport.properties' TransportType : 'Webhook' EnableSSL : 'true' KeyStore : '<PATH_TO_YOUR_KEYSTORE_FILE>.jks' KeyStorePassword : '<YOUR_KEYSTORE_PASSWORD>' NHttpd.EnableHTTP : TRUE NHttpd.ExpireTimeout : 30 NHttpd.ListeningPort : 8899 # <this is an example; other available ports can be used> . . . - Create
MessageBusprobe tools for AWS:$OMNIHOME/bin/nco_sql -user user -password password < aws_create_MsgBusTools.sqlThe command performs the following steps:- Adds two columns to the
alerts.statustable: AWSTargetConfirmation, AWSAutoConfirm. - Creates a trigger group
aws_triggersholding aws_target_confirmation and aws_process_target_status.
- Adds two columns to the
- The forwarding of AWS notifications requires confirmation of
SubscribeURL. Before running the probe, decide the option for the AWS target confirmation: auto or manual.- Edit message_bus_aws.rules under the section:
if (match( $(json.Type), "SubscriptionConfirmation" )) - Amend the
@AWSAutoConfirmassignment with1for auto,0for manual.
The act of confirmation is achieved by sending an HTTP command to the AWS’s
SubscribeURLor opening theSubscribeURLusing a web browser.Auto confirmation method:
This involves message_bus_aws.rules and the two triggers:
aws_target_confirmationandaws_process_target_status.Right after where the
SubscriptionConfirmationmessage is inserted at the ObjectServer, the trigger will invoke the aws_NHttp_MsgBusProbe.pl script to send a GET command to theSubscribeURL, and feedback the HTTP response to the probe rules file for status update.Manual confirmation method:
Copy the
SubscribeURLfrom the ExtendedAttr field to a web browser, and open the page. - Edit message_bus_aws.rules under the section:
- Go to the AWS system and configure the notification destination (subscribe the probe’s webhook).
During this time the probe must be alive so that the
SubscriptionConfirmationmessage can reach the ObjectServer through the probe.To run the PA daemon, use the following command:
$OMNIHOME/bin/nco_pad -name NCO_PA -configfile $OMNIHOME/etc/nco_pa.conf -admingroup rootTo check the PA status, use the following command:
$OMNIHOME/bin/nco_pa_status -server NCO_PA -user <unix_root> -password <unix_root_password> - In the Event List, the
SubscriptionConfirmationmessage appears as an event with theSummarystartingAWS Subscription…followed by a brief description of the confirmation state. TheSubscribeURLstring is stored in theExtendedAttrfield.Note:SubscribeURLcan comprise a few hundred characters, hence the use of ExtendedAttr (length: 4096) as its storage. - If the
SubscriptionConfirmationmessageSummaryindicates that the URL has not yet been successfully confirmed (regardless of the message being fresh or auto-confirmation attempt having failed), use the manual method. - After
SubscribeURLconfirmation, verify that the probe can receive AWS notifications. - You can choose to keep or to delete the
SubscriptionConfirmationmessage in the ObjectServer after the integration with AWS is established. - To stop AWS sending notifications to the probe, unsubscribe the probe’s webhook in AWS.
The probe will receive an
UnsubscribeConfirmationmessage.