-2

I am new to prometheus, while trying to install alert manager export tool in prometheus, I got the following error after checking with systemctl status alertmanager

alertmanager.service - AlertManager Service
 Loaded: loaded (/etc/systemd/system/alertmanager.service; enabled; vendor preset: enabled)
 Active: failed (Result: exit-code) since Sat 2021-05-01 11:23:07 UTC; 21s ago
Process: 51547 ExecStart=/usr/local/bin/alertmanager --config.file /etc/alertmanager/alertmanager.yml -web.external-url=http://0.0.0.0:9093 (code=exited, status=1/>
 Main PID: 51547 (code=exited, status=1/FAILURE)

May 01 11:23:07 STEP-Test systemd[1]: Started AlertManager Service. May 01 11:23:07 STEP-Test alertmanager[51547]: alertmanager: error: unknown short flag '-w', try --help May 01 11:23:07 STEP-Test systemd[1]: alertmanager.service: Main process exited, code=exited, status=1/FAILURE May 01 11:23:07 STEP-Test systemd[1]: alertmanager.service: Failed with result 'exit-code'.

I have tried removing and reinstalling but it was same. I checked my configuration to see, but I can't figure out the problem. Configuration file is

Thank you all for your prompt response.

DareLekan
  • 39
  • 2
  • 6

1 Answers1

1

You've an error in your flags for alertmanager.

It appears, you should use --web.external-url rather than -web.external-url

DazWilkin
  • 32,823
  • 5
  • 47
  • 88
  • Thank you Dazwilkin. I have changed the flag but still get the same error. – DareLekan May 03 '21 at 09:32
  • Hmmm. Is there anything more in the logs? `journalctl --unit=alertmanager.service`. You can configure debug logging using the flag `--log.level=debug`. I suspect (!?) that you've an incorrect (or missing) config (`/etc/alertmanager/alertmanager.yml`) and that's causing the failure. – DazWilkin May 03 '21 at 16:57
  • I have etc config in the setup but still giving same error – DareLekan Jun 10 '21 at 16:00