Exposing an ObjectServer port in a Netcool® Operations Insight on Red Hat® OpenShift® deployment
(Optional) Use this information to learn how to expose an ObjectServer port, and then verify that the port is exposed by sending events to it through a REST API.
Procedure
-
Find the configmap for the primary ObjectServer, as in the following example:
oc get configmap |grep objserv-agg-primary m101-objserv-agg-primary-config 2 5h24m
- Edit the primary ObjectServer's configmap.
oc edit configmap release_name-objserv-agg-primary-config
Where <release_name> is the name of your deployment, as specified by the value used for name (Operator Lifecycle Manager UI Form view), or name in the metadata section of the noi.ibm.com_noihybrids_cr.yaml or noi.ibm.com_nois_cr.yaml files (YAML view)..
Edit the primary ObjectServer's configmap to include the following lines:data: agg-p-props-append: | NRestOS.Enable: TRUE NHttpd.EnableHTTP: TRUE NHttpd.ListeningPort: 8080
- Restart the ncoprimary
pod.
Where <release_name> is the name of your deployment, as specified by the value used for name (Operator Lifecycle Manager UI Form view), or name in the metadata section of the noi.ibm.com_noihybrids_cr.yaml or noi.ibm.com_nois_cr.yaml files (YAML view).oc delete pod release_name-ncoprimary-0
- Expose port 8080.
oc expose po release_name-ncoprimary-0 --port=8080 --type=NodePort --name=objserve-http-client-external-portforward
Where <release_name> is the name of your deployment, as specified by the value used for name (Operator Lifecycle Manager UI Form view), or name in the metadata section of the noi.ibm.com_noihybrids_cr.yaml or noi.ibm.com_nois_cr.yaml files (YAML view). - Check that port 8080 is exposed.
oc get svc | grep objserve-http-client-external-portforward objserve-http-client-external-portforward NodePort 10.0.43.199 <none> 8080:31729/TCP 169m
- Send events to the ObjectServer with CURL.
$ curl -X POST -v -u root:object_server_password -H "Accept: application/json" -H "Content-Type: application/json" -d @server1.json http://objserve-http-client-external-portforward.{master server}:31729/objectserver/restapi/alerts/status;
Where object_server_password is the password for the ObjectServer. - Check that the ObjectServer received the events.
http://objserve-http-client-external-portforward.{cluster_hostname}:31729/objectserver/restapi/alerts/status