IT Operations Management (ITOM)
cancel
Showing results for 
Search instead for 
Did you mean: 

OMi:  Metric Streaming with Operations Agent 12.01

OMi:  Metric Streaming with Operations Agent 12.01

Ian_Bromehead

This is a guest post written by Neeraja Kothakota, R&D OpsBridge Specialist

OMi has added the Metric Streaming capability, which is supported by the HPE Operations Agent 12.01 running on each monitored node. Agent provides new interfaces to Stream application metrics to a central server (Target) so that performance data of all the nodes is available at one place. Along with default system performance metrics, custom application metrics can also be streamed. The interfaces are REST APIs and it accepts metrics information in JSON format. Application Metrics data can be streamed to a Target Subscriber so that the data can be used for analytics and graphing. HPE Performance Engine version 10.11 released with OMi 10.11 can be configured as Target subscriber.  

The steps involved in Metric Streaming are:

  • Registration of Metrics in JSON defined format
  • Deploy metric streaming configuration policy from OMi
  • Submit Metrics which need to be streamed.

The following REST APIs are available for Registration and Metrics submission from local system:

 Registration: /v4/RTCM/Register

Data Submission: /v4/RTCM/SubmitData

 The URI ‘http://<localhost>:<port>/hpcs/<REST_API> ‘ can be used to POST data to hpsensor using a http client.  Hpsensor is a light weight system performance metrics collection component available with Operations Agent from 12.0 version. User can get hpsensor port using the command ‘ovconfget hpsensor PORT’. Hpsensor will stream metrics information to the target subscriber at an interval of 10seconds. This will make sure target receives the stream of data at synchronous interval from a node.

Registration:

     The REST API   /v4/RTCM/Register is used to post registration information to

hpsensor. The Registration data is in JSON format and must contain the following information.

 

  1. Title
  2. Version
  3. Metric Payload consisting of the MetaData and Data Fields (only for Key metric)

 

      Following JSON data signifies the Registration information for 2 custom metrics which include 1 metric and 1 key metric.

[  {

    "Title": "Real Time Metrics",

    "Version": "v4",
    "Metric Payload": [ {
        "MetaData": {
          "MetricName": "Metric_ACTIVE_TRANS",
          "CategoryType": "COUNTER",
          "DataType": "DOUBLE",
          "Description": "Number of transactions in the current interval",
          "Label": "Active Transaction",
          "Unit": "N/A",

          "Key": -1,
          "ClassName": "TransClass",
          "DataSource": "TransDatasource",
          "CollectorName": "TransCollector",
          "CollectorExec": "$OvDataDir$bin/instrumentation/TransCollector.sh",
          "Interface": "Stream"

        } },
       {

        "MetaData": {
          "MetricName": "Instance_NAME",
          "CategoryType": "Attribute",
          "DataType": "STRING",
          "Description": "Instance identifier",
          "Label": "Instance Name",
          "Unit": "N/A",
          "Key": 0,

          "ClassName": "TransClass ",
          "DataSource": "TransDatasource ",
          "CollectorName": "TransCollector ",
          "CollectorExec": "$OvDataDir$bin/instrumentation/TransCollector.sh",
          "Interface": "Stream"
        },

        "Data": {
          "Instances": [ {
              "value": "inst_1",
              "timestamp": 1459724247
            },
            {
              "value": "inst_2",
              "timestamp": 1459724247
            } ] } } ] }
]

The user can Register any number of metrics.

Also, it allows varying MetaData fields.

Deploy metric streaming configuration policy from OMi

After Registering metrics, deploy the Metric Streaming Configuration policy from OMi so that Metric Streaming will be enabled. Choose the metrics to be streamed in the policy and deploy onto the node. The list of metrics to be streamed can be a subset of metrics list in Registration. Metric Streaming feature also enables to stream only the interested instance of metrics through instance filtering. Consider if there 3 database instances running, if user wants to stream only one database instance out of 3, choose the interested instance in the configuration policy.  Subscriber end point information will be preloaded with Performance Engine Listener URI if Performance Engine integration with OMi is configured. User has to make sure this integration is in place for the metric streaming operation.

Streamup2.jpg

 

 

 

 

 

 

Submit Metrics which need to be streamed

The REST API /v4/RTCM/SubmitData is used to submit custom metrics data to

hpsensor. The submitted data must contain the following objects:

  1. Title
  2. Version
  3. Metric Payload consisting of the MetaData and Data Fields for all metrics.

 

User to provide instances for all metrics while submitting data. 

The following JSON data signifies the Submit Data format for the metrics Registered above.

[  {
    "Title": "Real Time Metrics",
    "Version": "v4",
    "Metric Payload": [ {
        "MetaData": {
          "MetricName": "Metric_ACTIVE_TRANS",
          "CategoryType": "COUNTER",
          "DataType": "DOUBLE",
          "Key": -1,
          "ClassName": "TransClass",
          "DataSource": "TransDatasource"
        },

        "Data": {
          "Instances": [ {
              "value": "0.0",
              "timestamp": 1459725391,
              "dimensions": {
                "Instance_NAME": "inst_1"
            } },
            {
              "value": "0.0",
              "timestamp": 1459725391,
              "dimensions": {
                "Instance_NAME": "inst_2"
            } } ] }
      },
      {

        "MetaData": {
          "MetricName": "Instance_NAME",
          "CategoryType": "Attribute",
          "DataType": "STRING",
          "Key": 0,
          "ClassName": "TransClass ",
          "DataSource": "TransDatasource"
        },
        "Data": {
          "Instances": [ {
              "value": "inst_1",
              "timestamp": 1459725391,
              "dimensions": {
                "Instance_NAME": "inst_1"
            } },
            {
              "value": "inst_2",
              "timestamp": 1459725391,
              "dimensions": {
                "Instance_NAME": "inst_2"
            } } ] } } ] }    ]

          
Submitted data will be streamed to the HPE Performance Engine. This data is available as OpsBridge Data store in Performance Perspective of OMi and can be viewed in Real time or Historical mode.

 Conclusion:

            I hope this blog was helpful in understanding the Metric Streaming functionality of Operations Agent 12.01 and the well-defined JSON data format for submitting data.  The REST API interface is easy to use and supported for only localhost request with the current release. Users can make use of this functionality to submit custom metrics. The metrics information will be stored in the central server (Performance Engine) so that data can be used for Real Time analytics and thresholding across multiple nodes.

Please write back to use if you have any queries. We are happy to help.

Read more:

HPE Operations Bridge
HPE Live Network: Operations Bridge Evolution
HPE Live Network: Operations Manager i
HPE Live Network: OMi Management Pack development kit

Interested to learn more?

Register now for this breakout session at HPE Discover 2016 Las Vegas - BB8450: Optimize IT capacity in your cloud; learn how Exelon gained efficiency with operation agents.

To learn more about these exciting features, you can visit the Operations Agent Booth 432 at Discover

You can also see demonstrations and find out more details of this and other features of our HPE Operations Bridge solution in our sessions and at our booths during HPE Discover Las Vegas.

Click on the image below or here to register. @HPE_ITOps, #HPEDiscover, #itops, itopsmgmt

HPDiscover LV 16.jpg

 

    

  • operations bridge
0 Kudos
About the Author

Ian_Bromehead

//Add this to "OnDomLoad" event