Skip to content

Commit

Permalink
docs: explain Azure Log Analytics workspaceId gotcha (kedacore#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonParton committed Aug 12, 2021
1 parent c1ec31f commit fd264ce
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
7 changes: 7 additions & 0 deletions content/docs/2.0/scalers/azure-log-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ The authentication parameters could be provided using environmental variables, i
- `clientSecretFromEnv` optional: An environmental variable name, that stores password from your Azure AD Application/service principal.
- `workspaceIdFromEnv` optional: An environmental variable name, that stores your Log Analytics workspace id. Follow [this](https://docs.microsoft.com/en-us/cli/azure/monitor/log-analytics/workspace?view=azure-cli-latest#az-monitor-log-analytics-workspace-list) link to get your Log Analytics workspace id.

> 💡 **NOTE:** The workspaceID for Log Analytics is called the `customerId`;
it's not the full `id`! the example `az` command below can be used.

```sh
az monitor log-analytics workspace list --query '[]. {ResourceGroup:resourceGroup,WorkspaceName:name,"workspaceID (customerId)":customerId}' -o table
```

### Query Guidance

It is important to design your query to return 1 table with 1 row. A good practice is to add "| limit 1" at the end of your query.
Expand Down
7 changes: 7 additions & 0 deletions content/docs/2.1/scalers/azure-log-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ The authentication parameters could be provided using environmental variables, i
- `clientSecretFromEnv` optional: An environmental variable name, that stores password from your Azure AD Application/service principal.
- `workspaceIdFromEnv` optional: An environmental variable name, that stores your Log Analytics workspace id. Follow [this](https://docs.microsoft.com/en-us/cli/azure/monitor/log-analytics/workspace?view=azure-cli-latest#az-monitor-log-analytics-workspace-list) link to get your Log Analytics workspace id.

> 💡 **NOTE:** The workspaceID for Log Analytics is called the `customerId`;
it's not the full `id`! the example `az` command below can be used.

```sh
az monitor log-analytics workspace list --query '[]. {ResourceGroup:resourceGroup,WorkspaceName:name,"workspaceID (customerId)":customerId}' -o table
```

### Query Guidance

It is important to design your query to return 1 table with 1 row. A good practice is to add "| limit 1" at the end of your query.
Expand Down
7 changes: 7 additions & 0 deletions content/docs/2.2/scalers/azure-log-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ The authentication parameters could be provided using environmental variables, i
- `clientSecretFromEnv` optional: An environmental variable name, that stores password from your Azure AD Application/service principal.
- `workspaceIdFromEnv` optional: An environmental variable name, that stores your Log Analytics workspace id. Follow [this](https://docs.microsoft.com/en-us/cli/azure/monitor/log-analytics/workspace?view=azure-cli-latest#az-monitor-log-analytics-workspace-list) link to get your Log Analytics workspace id.

> 💡 **NOTE:** The workspaceID for Log Analytics is called the `customerId`;
it's not the full `id`! the example `az` command below can be used.

```sh
az monitor log-analytics workspace list --query '[]. {ResourceGroup:resourceGroup,WorkspaceName:name,"workspaceID (customerId)":customerId}' -o table
```

### Query Guidance

It is important to design your query to return 1 table with 1 row. A good practice is to add "| limit 1" at the end of your query.
Expand Down
7 changes: 7 additions & 0 deletions content/docs/2.3/scalers/azure-log-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ The authentication parameters could be provided using environmental variables, i
- `clientSecretFromEnv` optional: An environmental variable name, that stores password from your Azure AD Application/service principal.
- `workspaceIdFromEnv` optional: An environmental variable name, that stores your Log Analytics workspace id. Follow [this](https://docs.microsoft.com/en-us/cli/azure/monitor/log-analytics/workspace?view=azure-cli-latest#az-monitor-log-analytics-workspace-list) link to get your Log Analytics workspace id.

> 💡 **NOTE:** The workspaceID for Log Analytics is called the `customerId`;
it's not the full `id`! the example `az` command below can be used.

```sh
az monitor log-analytics workspace list --query '[]. {ResourceGroup:resourceGroup,WorkspaceName:name,"workspaceID (customerId)":customerId}' -o table
```

### Query Guidance

It is important to design your query to return 1 table with 1 row. A good practice is to add "| limit 1" at the end of your query.
Expand Down
7 changes: 7 additions & 0 deletions content/docs/2.4/scalers/azure-log-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ The authentication parameters could be provided using environmental variables, i
- `clientSecretFromEnv` optional: An environmental variable name, that stores password from your Azure AD Application/service principal.
- `workspaceIdFromEnv` optional: An environmental variable name, that stores your Log Analytics workspace id. Follow [this](https://docs.microsoft.com/en-us/cli/azure/monitor/log-analytics/workspace?view=azure-cli-latest#az-monitor-log-analytics-workspace-list) link to get your Log Analytics workspace id.

> 💡 **NOTE:** The workspaceID for Log Analytics is called the `customerId`;
it's not the full `id`! the example `az` command below can be used.

```sh
az monitor log-analytics workspace list --query '[]. {ResourceGroup:resourceGroup,WorkspaceName:name,"workspaceID (customerId)":customerId}' -o table
```

### Query Guidance

It is important to design your query to return 1 table with 1 row. A good practice is to add "| limit 1" at the end of your query.
Expand Down
7 changes: 7 additions & 0 deletions content/docs/2.5/scalers/azure-log-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ The authentication parameters could be provided using environmental variables, i
- `clientSecretFromEnv` optional: An environmental variable name, that stores password from your Azure AD Application/service principal.
- `workspaceIdFromEnv` optional: An environmental variable name, that stores your Log Analytics workspace id. Follow [this](https://docs.microsoft.com/en-us/cli/azure/monitor/log-analytics/workspace?view=azure-cli-latest#az-monitor-log-analytics-workspace-list) link to get your Log Analytics workspace id.

> 💡 **NOTE:** The workspaceID for Log Analytics is called the `customerId`;
it's not the full `id`! the example `az` command below can be used.

```sh
az monitor log-analytics workspace list --query '[]. {ResourceGroup:resourceGroup,WorkspaceName:name,"workspaceID (customerId)":customerId}' -o table
```

### Query Guidance

It is important to design your query to return 1 table with 1 row. A good practice is to add "| limit 1" at the end of your query.
Expand Down

0 comments on commit fd264ce

Please sign in to comment.