Skip to content

Commit

Permalink
Update metricName saples (kedacore#576)
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Turrado <jorge.turrado@docplanner.com>
  • Loading branch information
Jorge Turrado Ferrero authored Nov 10, 2021
1 parent 6e92e87 commit 32f0f35
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions content/docs/2.5/operate/metrics-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This will return a json with the list of metrics exposed by KEDA:
"groupVersion": "external.metrics.k8s.io/v1beta1",
"resources": [
{
"name": "s0-rabbitmq--mymetric",
"name": "s0-rabbitmq-queueName",
"singularName": "",
"namespaced": true,
"kind": "ExternalMetricValueList",
Expand All @@ -28,7 +28,7 @@ This will return a json with the list of metrics exposed by KEDA:
]
},
{
"name": "s1-rabbitmq--mymetric2",
"name": "s1-rabbitmq-queueName2",
....
}
]
Expand All @@ -42,9 +42,9 @@ kubectl get --raw "/apis/external.metrics.k8s.io/v1beta1/namespaces/YOUR_NAMESPA

At this point, you should take in consideration that KEDA metrics are namespaced, this means that you have to specify the namespace where the `ScaledObject` is placed inside.

For example, if you want to get the value of the metric named `s1-rabbitmq--mymetric2` in namespace `sample-ns`, the query will be like this:
For example, if you want to get the value of the metric named `s1-rabbitmq-queueName2` in namespace `sample-ns`, the query will be like this:
```bash
kubectl get --raw "/apis/external.metrics.k8s.io/v1beta1/namespaces/sample-ns/s1-rabbitmq--mymetric2"
kubectl get --raw "/apis/external.metrics.k8s.io/v1beta1/namespaces/sample-ns/s1-rabbitmq-queueName2"
```

And it will show a json like this:
Expand All @@ -56,7 +56,7 @@ And it will show a json like this:
"metadata": {},
"items": [
{
"metricName": "s1-rabbitmq--mymetric2",
"metricName": "s1-rabbitmq-queueName2",
"metricLabels": null,
"timestamp": "2021-10-20T10:48:17Z",
"value": "0"
Expand Down
2 changes: 1 addition & 1 deletion content/docs/2.5/scalers/azure-storage-blob.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ triggers:

When `cloud` is set to `Private`, the `endpointSuffix` parameter is required. Otherwise, it is automatically generated based on the cloud environment. `endpointSuffix` represents the storage blob endpoint suffix of the cloud environment that the blob belongs to, e.g. `blob.core.cloudapi.de` for `AzureGermanCloud`.

You can also optionally assign a name to the metric using the `metricName` value. If not specified, the `metricName` will be generated automatically based on the trigger index, `blobContainerName`, `blobPrefix` and `blobDelimiter`. For example: **s0-azure-blob-functions-blob-myprefix-example**. The value will be prefixed with `s{triggerIndex}-azure-blob-`.
You can also optionally assign a name to the metric using the `metricName` value. If not specified, the `metricName` will be generated automatically based on the trigger index and `blobContainerName`. For example: **s0-azure-blob-blobContainerName**. The value will be prefixed with `s{triggerIndex}-azure-blob-`.

### Authentication Parameters

Expand Down
4 changes: 2 additions & 2 deletions content/docs/2.5/scalers/influxdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ triggers:
|> filter(fn: (r) => r._measurement == "stat")
authToken: some-auth-token
authTokenFromEnv: INFLUXDB_AUTH_TOKEN # Optional: You can use this instead of `authToken` parameter. See details in "Parameter List" section
metricName: influx-metric # Optional: This value will default to a masked version of the url and organization name if not set by the user (metrics name value would be then `influxdb-https---xxx-influx_org`)
metricName: influx-metric # Optional: This value will default to organization name if not set by the user (metrics name value would be then `influxdb-influx_org`)
```
**Parameter list:**
Expand All @@ -37,7 +37,7 @@ triggers:
- `serverURL` - Holds the url value of the InfluxDB server.
- `thresholdValue` - Provided by the user. This value can vary from use case to use case depending on the data of interest, and is needed to trigger the scaling in/out depending on what value comes back from the query.
- `query` - Flux query that will yield the value for the scaler to compare the `thresholdValue` against.
- `metricName` - Name to assign to the metric. If not set KEDA will generate a name based on masked version of the server url and organization name. If using more than one trigger it is required that all `metricName`(s) be unique. (Optional)
- `metricName` - Name to assign to the metric. If not set KEDA will generate a name based organization name. If using more than one trigger it is required that all `metricName`(s) be unique. (Optional)
- `unsafeSsl` - Skip certificate validation when connecting over HTTPS. (Values: `true`, `false`, Default: `false`, Optional)

### Authentication Parameters
Expand Down
4 changes: 2 additions & 2 deletions content/docs/2.5/scalers/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ triggers:
metricName: "global-metric"
```
>**NOTE:** If **metricName** is not set, then one is generated based on trigger index and the values in trigger spec, for example: **s0-mongodb-mongodb---test_user-test_password@xxx-27017-test-test_collection**
>**NOTE:** If **metricName** is not set, then one is generated based on trigger index and the `collection`, for example: **s0-mongodb-test_collection**

**Parameter list:**

Expand Down Expand Up @@ -83,7 +83,7 @@ When configuring with a connection string, you can use this URL format:
mongodb://<username>:<password>@mongodb-svc.<namespace>.svc.cluster.local:27017/<database_name>
```

You can also optionally assign a name to the metric using the `metricName` value. If not specified, the `metricName` will be generated automatically based on trigger index and masked version of the server hostname and collection name. For example: **s1-mongodb-mongodb---test_user-test_password@xxx-27017-test-test_collection**. The value will be prefixed with `s{triggerIndex}-mongodb-` .
You can also optionally assign a name to the metric using the `metricName` value. If not specified, the `metricName` will be generated automatically based on trigger index and collection name. For example: **s1-mongodb-test_collection**. The value will be prefixed with `s{triggerIndex}-mongodb-` .

### Authentication Parameters

Expand Down

0 comments on commit 32f0f35

Please sign in to comment.