1 Reply Latest reply: Jan 12, 2018 9:40 PM by Koundinya Srinivasarao RSS

How i can get the applications service SLA list using (AppInternals metrics API)?

Tarek Ghazali

How can i get the applications service SLA list using (AppInternals metrics API) ?

How can i call an external web service in another system & pass the metrics data?

 

I am using the below version:

SteelCentral AppInternals10.10.2 (Build 26)  

  • Re: How i can get the applications service SLA list using (AppInternals metrics API)?
    Koundinya Srinivasarao

    An application’s Service Level is a derived metric and cannot be queried for using the API. However, one could query for the app’s percent violations and easily compute the service level using this formula:

     

    Service Level = (1 – percent_violations) * 100 %

     

    Here is an example:

     

    Sample Request

    POST /scai.metrics/1.0/metrics HTTP/1.1

    Host: xxxxxxx

    Content-Type: application/json

    Cache-Control: no-cache

     

    {

          "start_time_secs" : 1515536700,

          "duration_secs" : 1200,

          "bucket_width_secs" : 60,

          "include_timeseries" : false,

          "object_filters" : [

            {

              "object_category_name" : "APPLICATION_ID",

              "instance_name" : "2"

            }

            ],

          "metric_statistic_pairs" : [

            {

              "metric_name" : "percent_violations",

              "statistic_name" :"avg"

            }

            ]

      }

     

    Sample Response

    {

      "id": 0,

      "metrics_values": [

        {

          "key": {

            "metric_name": "percent_violations",

            "statistic_name": "avg"

          },

          "summary_value": 0.34846624732017517,

          "timeseries_values": []

        }

      ],

      "timeseries_bucket_width_secs": 60

    }

     

    Service Level using formula: (1 - 0.34846624732017517) * 100% = ~65.15%

     

    Service Level reported in the UI: 65.15%