You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| CORTEX_ADDRESS |`address`| Address of the API of the desired Cortex cluster. |
42
-
| CORTEX_API_USER |`user`| In cases where the Cortex API is set behind a basic auth gateway, a user can be set as a basic auth user. If empty and CORTEX_API_KEY is set, CORTEX_TENANT_ID will be used instead. |
43
-
| CORTEX_API_KEY |`key`| In cases where the Cortex API is set behind a basic auth gateway, a key can be set as a basic auth password. |
44
-
| CORTEX_TENANT_ID |`id`| The tenant ID of the Cortex instance to interact with. |
| CORTEX_ADDRESS |`address`| Address of the API of the desired Cortex cluster. |
42
+
| CORTEX_API_USER |`user`| In cases where the Cortex API is set behind a basic auth gateway, a user can be set as a basic auth user. If empty and CORTEX_API_KEY is set, CORTEX_TENANT_ID will be used instead. |
43
+
| CORTEX_API_KEY |`key`| In cases where the Cortex API is set behind a basic auth gateway, a key can be set as a basic auth password. |
44
+
| CORTEX_AUTH_TOKEN |`authToken`| In cases where the Cortex API is set behind gateway authenticating by bearer token, a token can be set as a bearer token header. |
45
+
| CORTEX_TENANT_ID |`id`| The tenant ID of the Cortex instance to interact with. |
Copy file name to clipboardExpand all lines: pkg/commands/alerts.go
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,7 @@ func (a *AlertmanagerCommand) Register(app *kingpin.Application) {
65
65
alertCmd:=app.Command("alertmanager", "View & edit alertmanager configs stored in cortex.").PreAction(a.setup)
66
66
alertCmd.Flag("address", "Address of the cortex cluster, alternatively set CORTEX_ADDRESS.").Envar("CORTEX_ADDRESS").Required().StringVar(&a.ClientConfig.Address)
67
67
alertCmd.Flag("id", "Cortex tenant id, alternatively set CORTEX_TENANT_ID.").Envar("CORTEX_TENANT_ID").Required().StringVar(&a.ClientConfig.ID)
68
+
alertCmd.Flag("authToken", "Authentication token for bearer token or JWT auth, alternatively set CORTEX_AUTH_TOKEN.").Default("").Envar("CORTEX_AUTH_TOKEN").StringVar(&a.ClientConfig.AuthToken)
68
69
alertCmd.Flag("user", "API user to use when contacting cortex, alternatively set CORTEX_API_USER. If empty, CORTEX_TENANT_ID will be used instead.").Default("").Envar("CORTEX_API_USER").StringVar(&a.ClientConfig.User)
69
70
alertCmd.Flag("key", "API key to use when contacting cortex, alternatively set CORTEX_API_KEY.").Default("").Envar("CORTEX_API_KEY").StringVar(&a.ClientConfig.Key)
70
71
alertCmd.Flag("tls-ca-path", "TLS CA certificate to verify cortex API as part of mTLS, alternatively set CORTEX_TLS_CA_PATH.").Default("").Envar("CORTEX_TLS_CA_PATH").StringVar(&a.ClientConfig.TLS.CAPath)
@@ -143,6 +144,7 @@ func (a *AlertCommand) Register(app *kingpin.Application) {
143
144
alertCmd:=app.Command("alerts", "View active alerts in alertmanager.").PreAction(a.setup)
144
145
alertCmd.Flag("address", "Address of the cortex cluster, alternatively set CORTEX_ADDRESS.").Envar("CORTEX_ADDRESS").Required().StringVar(&a.ClientConfig.Address)
145
146
alertCmd.Flag("id", "Cortex tenant id, alternatively set CORTEX_TENANT_ID.").Envar("CORTEX_TENANT_ID").Required().StringVar(&a.ClientConfig.ID)
147
+
alertCmd.Flag("authToken", "Authentication token for bearer token or JWT auth, alternatively set CORTEX_AUTH_TOKEN.").Default("").Envar("CORTEX_AUTH_TOKEN").StringVar(&a.ClientConfig.AuthToken)
146
148
alertCmd.Flag("user", "API user to use when contacting cortex, alternatively set CORTEX_API_USER. If empty, CORTEX_TENANT_ID will be used instead.").Default("").Envar("CORTEX_API_USER").StringVar(&a.ClientConfig.User)
147
149
alertCmd.Flag("key", "API key to use when contacting cortex, alternatively set CORTEX_API_KEY.").Default("").Envar("CORTEX_API_KEY").StringVar(&a.ClientConfig.Key)
0 commit comments