Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Timeslice metric indicator for elasticstack_kibana_slo (supporting percentile aggregations) #814

Open
irregulator opened this issue Oct 1, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@irregulator
Copy link
Contributor

Hi! Thanks for developing this Terraform provider!

Describe the resource you would like to have implemented.

We would like to manage elasticstack_kibana_slo objects with Terraform and employ Timeslice metric indicator. We are particularly interested in Percentile aggregation. This feature is already present in Kibana as described in:

Describe the solution you'd like

A new indicator could look like this:

timeslice_custom_indicator {
  index           = "heartbeat-*"
  filter          = "monitor.name: \"loadbalancer\""
  timestamp_field = "@timestamp"
  metrics = [
    {
      name = "p95"
      field = "http.rtt.total.us"
      aggregation = "percentile"
      percentile = 95
    } 
  ]  
  equation = "p95"
  comparator = "LT"
  threshold = 2000000
}

Describe alternatives you've considered

None

Additional context

Here's the equivalent API request when creating an example latency SLO with Timeslice metrics and Percentile aggregation through Kibana UI:

{
  "name": "Latency SLO",
  "description": "Latency SLO",
  "indicator": {
    "type": "sli.metric.timeslice",
    "params": {
      "index": "heartbeat-*",
      "filter": "monitor.name: \"loadbalancer\"",
      "metric": {
        "metrics": [
          {
            "name": "A",
            "aggregation": "percentile",
            "field": "http.rtt.total.us",
            "filter": "",
            "percentile": 95
          }
        ],
        "equation": "A",
        "comparator": "LT",
        "threshold": 2000000
      },
      "timestampField": "@timestamp"
    }
  },
  "budgetingMethod": "timeslices",
  "timeWindow": {
    "duration": "30d",
    "type": "rolling"
  },
  "objective": {
    "target": 0.99,
    "timesliceTarget": 0.95,
    "timesliceWindow": "1m"
  },
  "tags": [],
  "groupBy": "url.domain"
}
@irregulator irregulator added the enhancement New feature or request label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant