Skip to content

Commit

Permalink
feat: Introduce activationThreshold/minMetricValue for MongoDB Scaler
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Turrado <jorge_turrado@hotmail.es>
  • Loading branch information
JorTurFer committed Jul 19, 2022
1 parent 69c5ec2 commit 5a1d833
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions content/docs/2.8/scalers/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ triggers:
query: '{"region":"eu-1","state":"running","plan":"planA"}'
# Required: according to the number of query result, to scale the TargetRef
queryValue: "1"
# Optional: according to the number of query result, the scaler is active
activationQueryValue: "1"
# Optional: The generated metric name would be mongodb-global-metric. Here mongodb- use as a prefix for metric name
metricName: "global-metric"
```
Expand All @@ -51,6 +53,8 @@ triggers:
query: '{"region":"eu-1","state":"running","plan":"planA"}'
# Required: according to the number of query result, to scale the TargetRef
queryValue: "1"
# Optional: according to the number of query result, the scaler is active
activationQueryValue: "1"
# Optional: The generated metric name would be mongodb-global-metric. Here mongodb- use as a prefix for metric name.
metricName: "global-metric"
```
Expand All @@ -65,6 +69,7 @@ The `mongodb` trigger always requires the following information:
- `collection` - Name of the collection.
- `query` - A MongoDB query that should return single numeric value.
- `queryValue` - A threshold that will define when scaling should occur.
- `activationQueryValue` - Target value for activating the scaler. Learn more about activation [here](./../concepts/scaling-deployments.md#activating-and-scaling-thresholds).(Default: `0`, Optional)

To connect to the MongoDB server, you can provide either:

Expand Down

0 comments on commit 5a1d833

Please sign in to comment.