-
Notifications
You must be signed in to change notification settings - Fork 446
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
Documentation for custom KEDA scaler for Splunk Observability Cloud #1477
Open
sschimper-splunk
wants to merge
2
commits into
kedacore:main
Choose a base branch
from
sschimper-splunk:feature/splunk-observability-docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
+++ | ||
title = "Splunk Observability" | ||
availability = "v2.15+" | ||
maintainer = "Community" | ||
category = "Data & Storage" | ||
description = "Scale applications based on Splunk Observability Cloud metrics." | ||
go_file = "splunk_observability_scaler" | ||
+++ | ||
|
||
### Trigger Specification | ||
|
||
This specification describes the `splunk-observability` trigger that scales based on the result of a metric series queried from the Splunk Observability Cloud platform with a [SignalFlow query](https://dev.splunk.com/observability/docs/signalflow/). | ||
|
||
The trigger always requires the following information: | ||
|
||
```yaml | ||
triggers: | ||
- type: splunk-observability | ||
metricType: Value | ||
metadata: | ||
query: "data('demo.trans.latency').max().publish()" | ||
duration: "10" | ||
targetValue: "400.1" | ||
activationTargetValue: "1.1" | ||
queryAggregator: "avg" | ||
``` | ||
|
||
**Parameter list:** | ||
|
||
- `query` - SignalFlow query for querying the desired metrics. | ||
- `duration` - Duration of the stream being created to query a Metric Time Series (MTS) from Splunk Observability Cloud. The specified duration is in seconds. | ||
- `targetValue` - Threshold to reach to start scaling. | ||
- `activationTargetValue` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds). | ||
- `queryAggregator` - When querying metrics from Splunk Observability Cloud, initially a Metric Time Series (MTS) is returned, a list consiting of several datapoints. The 'queryAggregator' speicifies how this series of metrics should be "rolled up". Valid values for this field are "avg", which returnes the average, "min", which returns the minimun of the metrics in the series, and "max", which returns the maximun value. | ||
|
||
### Authentication Parameters | ||
|
||
You can authenticate by using an access token and a realm for Splunk Observability Cloud. You will need to use `TriggerAuthentication` CRD to configure the authentication. | ||
|
||
> **Note:** | ||
> | ||
> `TriggerAuthentication` is required to use this scaler due to the hard requirement of providing a `accessToken` and a `realm` for Splunk Observability Cloud. | ||
|
||
**Parameter list:** | ||
|
||
- `accessToken` - Splunk Observability Cloud Access Token. | ||
- `realm` - Splunk Observability Cloud Realm. | ||
|
||
### Example | ||
|
||
The following example shows how to scale a simple NGINX employment with the help of KEDA and the Splunk Observability Cloud scaler: | ||
|
||
#### Simple NGINX employment | ||
|
||
```yaml | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx:1.14.2 | ||
ports: | ||
- containerPort: 80 | ||
``` | ||
|
||
#### Authentication | ||
|
||
```yaml | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: splunk-secrets | ||
data: | ||
accessToken: dGVzdF9hY2Nlc3NfdG9rZW4= # base64-encrypted example access token | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. base64 |
||
realm: dGVzdF9yZWFsbQ== # base64-encrypted example realm | ||
--- | ||
apiVersion: keda.sh/v1alpha1 | ||
kind: TriggerAuthentication | ||
metadata: | ||
name: keda-trigger-auth-splunk-secret | ||
spec: | ||
secretTargetRef: | ||
- parameter: accessToken | ||
name: splunk-secrets | ||
key: accessToken | ||
- parameter: realm | ||
name: splunk-secrets | ||
key: realm | ||
``` | ||
|
||
#### Keda Scaler | ||
```yaml | ||
--- | ||
apiVersion: keda.sh/v1alpha1 | ||
kind: ScaledObject | ||
metadata: | ||
name: keda | ||
spec: | ||
scaleTargetRef: | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
name: nginx | ||
pollingInterval: 30 | ||
cooldownPeriod: 30 | ||
minReplicaCount: 1 | ||
maxReplicaCount: 10 | ||
triggers: | ||
- type: splunk-observability | ||
metricType: Value | ||
metadata: | ||
query: "data('demo.trans.count', filter=filter('demo_host', 'server6'), rollup='rate').sum(by=['demo_host']).publish()" | ||
duration: "10" | ||
queryValue: "400.1" | ||
activationQueryValue: "1.1" | ||
queryAggregator: "max" # 'min', 'max', or 'avg' | ||
authenticationRef: | ||
name: keda-trigger-auth-splunk-secret | ||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be 2.16+ assuming the new scaler is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sschimper-splunk looks like you put 2.6 instead of 2.16 by mistake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the version isn't available yet, the build will fail. So you need to explicitly ignore the URL like this: https://github.com/kedacore/keda-docs/pull/1413/files#diff-9ad64044531d7d8c033064f11141586478b535147312374c24f8d2d997722889R7