cortex-tools icon indicating copy to clipboard operation
cortex-tools copied to clipboard

Cortextool alertmanager load gives "cortextool: error: requested resource not found, try --help" error

Open geekyspartan opened this issue 3 years ago • 2 comments

I have cortex running locally with the 'fake' tenant/object id. For testing out the alertmanager, I am using the below dummy config (alertmanager.yml):

global:
  smtp_smarthost: 'localhost:25'
  smtp_from: '[email protected]'

route:
  receiver: example-email

receivers:
 - name: example-email
   email_configs:
    - to: '[email protected]'

I have enabled the alertmanager in the cortex config:

alertmanager:
  enable_api: true

alertmanager_storage:
  backend: azure
  azure:
    account_name: ******
    account_key: ******
    container_name: ******
    endpoint_suffix: ******

when I try to run the cortextool to get the current AlertManager, I get the following output

cortextool alertmanager get --address=http://localhost:9009 --id=fake
INFO[0000] no alertmanager config currently exist for this user 

This is fine, as currently I don't have any AlertManager setup, so the output is correct.

Now, if I try to load a AlertManager via this command: cortextool alertmanager load alertmanager.yml --address=http://localhost:9009 --id=fake

I get the following error: cortextool: error: requested resource not found, try --help

I am not sure if I have to enable anything else in the cortex or if alertmanager.yml content is wrong. My assumption is, if I am able to load a dummy alertmanager.yml, then I will be able to atleast open this url: http://localhost:9009/alertmanager

geekyspartan avatar Jul 20 '21 07:07 geekyspartan

I am also facing this issue. @geekyspartan Were you able to resolve this issue? If so, could you please share how you resolved it?

vinitmasaun avatar Jan 03 '22 23:01 vinitmasaun

I am also facing this issue. @geekyspartan Were you able to resolve this issue? If so, could you please share how you resolved it?

Actually, we changed our approach, so didn't work on this issue.

geekyspartan avatar Feb 26 '22 04:02 geekyspartan