Sumo Logic

Scale applications based on Sumo Logic logs or metrics query results.

Availability: v2.18+ Maintainer: Community

Suggest a change

Warning

You are currently viewing v"2.18" of the documentation and it is not the latest. For the most recent documentation, kindly click here.

Sumo Logic Scaler

The Sumo Logic scaler allows you to automatically scale applications based on Sumo Logic logs searches, and metrics queries. You can use this scaler to trigger scaling actions based on custom logs or metrics collected in your Sumo Logic account.

You must configure a TriggerAuthentication resource to authenticate with Sumo Logic.

Prerequisites

  • A Sumo Logic Access ID and Access Key

Authentication Parameters

Authentication is handled through a Kubernetes Secret combined with a TriggerAuthentication.

apiVersion: v1
kind: Secret
metadata:
  name: sumologic-auth-secret
data:
  accessID: <base64-encoded-accessID>
  accessKey: <base64-encoded-accessKey>

---

apiVersion: keda.sh/v1alpha1
kind: TriggerAuthentication
metadata:
  name: keda-trigger-auth-sumologic
spec:
  secretTargetRef:
    - parameter: accessID
      name: sumologic-auth-secret
      key: accessID
    - parameter: accessKey
      name: sumologic-auth-secret
      key: accessKey

Trigger Specifications

Logs Query Trigger

Scale based on a Sumo Logic logs query result.

triggers:
- type: sumologic
  metadata:
    host: "https://api.sumologic.com"   # Sumo Logic API endpoint
    queryType: "logs"                   # Type must be "logs"
    query: "_view=my_view | count"      # Your Sumo Logic logs query
    resultField: "_count"               # Field to extract value from
    timerange: "15m"                    # Lookback window
    timezone: "Asia/Kolkata"            # Timezone (e.g., Asia/Kolkata)
    queryAggregator: "Max"              # Aggregation method: Latest, Avg, Sum, Count, Min, Max
    threshold: "1000"                   # Threshold for scaling
  authenticationRef:
    name: keda-trigger-auth-sumologic

Parameter List:

NameDescriptionRequiredExample
hostSumo Logic API endpoint URL (Based on your Geo).Yeshttps://api.sumologic.com
queryTypeType of query.Yeslogs
querySumo Logic query.Yes_view=my_view | count
resultFieldField from query results to extract the scaling metric.Yes (logs only)_count
timerangeTime range to evaluate the query.Yes15m
timezoneTimezone for query execution.Optional (UTC default)Asia/Kolkata
queryAggregatorAggregation method (Latest, Avg, Sum, Count, Min, Max).Optional (Avg default)Max
thresholdTarget value for scaling.Yes1000

Metrics Query Trigger

Scale based on a Sumo Logic metrics query result.

triggers:
- type: sumologic
  metadata:
    host: "https://api.sumologic.com"
    queryType: "metrics"
    query: "metric=cpu.usage | avg"
    quantization: "15s"
    rollup: "Max"
    timerange: "15m"
    timezone: "Asia/Kolkata"
    queryAggregator: "Max"
    threshold: "50"
  authenticationRef:
    name: keda-trigger-auth-sumologic

Additional Fields for Metrics Queries:

(In addition to all common fields from logs queries.)

NameDescriptionRequiredExample
quantizationGranularity of data points.Yes (metrics only)15s
rollupMetrics rollup type (Avg, Sum, Min, Max, Count).Optional (metrics only, Avg default)Max

Multi-Metrics Query Trigger

Scale based on multiple Sumo Logic metrics queries combined together.

triggers:
- type: sumologic
  metadata:
    host: "https://api.sumologic.com"
    queryType: "metrics"
    query.A: "metric=requests_total | rate"
    query.B: "metric=request_capacity"
    query.C: "(#A / #B) * 100 along service"
    resultQueryRowID: "C"          # Which query result to extract
    quantization: "15s"
    rollup: "Max"
    timerange: "15m"
    timezone: "Asia/Kolkata"
    queryAggregator: "Max"
    threshold: "75"
  authenticationRef:
    name: keda-trigger-auth-sumologic

Additional Fields for Multi-Metrics Queries:

NameDescriptionRequiredExample
query.A, query.B, query.C etcMulti-stage queries, where later queries can refer to earlier ones.Yes (for multi-metrics queries)-
resultQueryRowIDWhich final query (A, B, C, etc.) to use for scaling.Yes (for multi-metrics queries)C

Notes

  • pollingInterval controls how often KEDA polls Sumo Logic.
  • cooldownPeriod controls how long KEDA waits before scaling down.
  • MetricType: The scaler supports both AverageValue and Value metric types.
  • Ensure that the Sumo Logic user has appropriate access to the queries being executed.