Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic when using amtool #2936

Closed
roidelapluie opened this issue May 30, 2022 · 0 comments · Fixed by #2968
Closed

Panic when using amtool #2936

roidelapluie opened this issue May 30, 2022 · 0 comments · Fixed by #2968

Comments

@roidelapluie
Copy link
Member

$ ./amtool --alertmanager.url=http://127.0.0.1:9093 alert add foo=
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/prometheus/alertmanager/pkg/labels.ParseMatcher({0x7fffcacb016f, 0x4})
        /home/roidelapluie/dev/alertmanager/pkg/labels/parse.go:130 +0x67f
github.com/prometheus/alertmanager/cli.parseLabels({0xc000569c38, 0x1, 0xc00007c570?})
        /home/roidelapluie/dev/alertmanager/cli/utils.go:110 +0x7b
github.com/prometheus/alertmanager/cli.(*alertAddCmd).addAlert(0xc00005d080, {0x103c0b0?, 0xc00080c0c0}, 0x6fc23ac00?)
        /home/roidelapluie/dev/alertmanager/cli/alert_add.go:76 +0x97
github.com/prometheus/alertmanager/cli.execWithTimeout.func1(0x40b4d4?)
        /home/roidelapluie/dev/alertmanager/cli/utils.go:154 +0x70
gopkg.in/alecthomas/kingpin%2ev2.(*actionMixin).applyActions(0xc000286150?, 0xcfd2c0?)
        /home/roidelapluie/go/pkg/mod/gopkg.in/alecthomas/kingpin.v2@v2.2.6/actions.go:28 +0x5c
gopkg.in/alecthomas/kingpin%2ev2.(*Application).applyActions(0xc0000de870?, 0xc0002ce090)
        /home/roidelapluie/go/pkg/mod/gopkg.in/alecthomas/kingpin.v2@v2.2.6/app.go:557 +0xed
gopkg.in/alecthomas/kingpin%2ev2.(*Application).execute(0xc0000de870, 0xc0002ce090?, {0xc000598040, 0x2, 0x2})
        /home/roidelapluie/go/pkg/mod/gopkg.in/alecthomas/kingpin.v2@v2.2.6/app.go:390 +0x66
gopkg.in/alecthomas/kingpin%2ev2.(*Application).Parse(0xc0000de870, {0xc0000300b0?, 0xc0000300b0?, 0x4?})
        /home/roidelapluie/go/pkg/mod/gopkg.in/alecthomas/kingpin.v2@v2.2.6/app.go:222 +0x14f
github.com/prometheus/alertmanager/cli.Execute()
        /home/roidelapluie/dev/alertmanager/cli/root.go:162 +0xd45
main.main()
        /home/roidelapluie/dev/alertmanager/cmd/amtool/main.go:19 +0x17

When building main

gotjosh added a commit that referenced this issue Jun 28, 2022
Fixes #2936

Signed-off-by: gotjosh <josue.abreu@gmail.com>
gotjosh added a commit that referenced this issue Sep 30, 2022
Fixes #2936

Signed-off-by: gotjosh <josue.abreu@gmail.com>
gotjosh added a commit that referenced this issue Sep 30, 2022
Fixes #2936

Signed-off-by: gotjosh <josue.abreu@gmail.com>
joeblubaugh added a commit to grafana/grafana that referenced this issue Oct 4, 2022
Version 0.24.0 has a few bugs that cause panics. We update here to the
latest commit on github.com/prometheus/alertmanager's main branch.

Panic Bugs:
prometheus/alertmanager#2936
prometheus/alertmanager#3064
joeblubaugh added a commit to grafana/grafana that referenced this issue Oct 4, 2022
Version 0.24.0 has a few bugs that cause panics. We update here to the
latest commit on github.com/prometheus/alertmanager's main branch.

Panic Bugs:
prometheus/alertmanager#2936
prometheus/alertmanager#3064
joeblubaugh added a commit to grafana/grafana that referenced this issue Oct 6, 2022
Version 0.24.0 has a few bugs that cause panics. We update here to the
latest commit on github.com/prometheus/alertmanager's main branch.

Panic Bugs:
prometheus/alertmanager#2936
prometheus/alertmanager#3064

(cherry picked from commit ce89624)
joeblubaugh added a commit to grafana/grafana that referenced this issue Oct 6, 2022
Version 0.24.0 has a few bugs that cause panics. We update here to the
latest commit on github.com/prometheus/alertmanager's main branch.

Panic Bugs:
prometheus/alertmanager#2936
prometheus/alertmanager#3064

(cherry picked from commit ce89624)
joeblubaugh added a commit to grafana/grafana that referenced this issue Oct 7, 2022
…56228) (#56430)

Version 0.24.0 has a few bugs that cause panics. We update here to the
latest commit on github.com/prometheus/alertmanager's main branch.

Panic Bugs:
prometheus/alertmanager#2936
prometheus/alertmanager#3064

(cherry picked from commit ce89624)
joeblubaugh added a commit to grafana/grafana that referenced this issue Oct 7, 2022
…56228) (#56429)

* Alerting: Update imported prometheus alertmanager version. (#56228)

Version 0.24.0 has a few bugs that cause panics. We update here to the
latest commit on github.com/prometheus/alertmanager's main branch.

Panic Bugs:
prometheus/alertmanager#2936
prometheus/alertmanager#3064

(cherry picked from commit ce89624)
qinxx108 pushed a commit to qinxx108/alertmanager that referenced this issue Dec 13, 2022
Fixes prometheus#2936

Signed-off-by: gotjosh <josue.abreu@gmail.com>
Signed-off-by: Yijie Qin <qinyijie@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant