amtool silence
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x14e0282]
goroutine 1 [running]:
github.com/prometheus/alertmanager/cli/format.labelsMatcher(...)
/Users/angelinel/go/pkg/mod/github.com/prometheus/alertmanager@v0.22.2/cli/format/format.go:56
github.com/prometheus/alertmanager/cli/format.simpleFormatMatcher(0x0, 0xc0003905fa, 0xc00011e500, 0xc00011e510, 0xc00009c120, 0x28)
/Users/angelinel/go/pkg/mod/github.com/prometheus/alertmanager@v0.22.2/cli/format/format_simple.go:98 +0x102
github.com/prometheus/alertmanager/cli/format.simpleFormatMatchers(0xc000386280, 0x7, 0x9, 0x1, 0x1)
/Users/angelinel/go/pkg/mod/github.com/prometheus/alertmanager@v0.22.2/cli/format/format_simple.go:92 +0x98
github.com/prometheus/alertmanager/cli/format.(*SimpleFormatter).FormatSilences(0xc000339220, 0xc0003a21e0, 0x2, 0x2, 0xc000336648, 0x1f62b01)
/Users/angelinel/go/pkg/mod/github.com/prometheus/alertmanager@v0.22.2/cli/format/format_simple.go:48 +0x1de
github.com/prometheus/alertmanager/cli.(*silenceQueryCmd).query(0xc0003cda40, 0x1ac1448, 0xc000400d20, 0xc0000c6120, 0xc000400d20, 0xc00039ec90)
/Users/angelinel/go/pkg/mod/github.com/prometheus/alertmanager@v0.22.2/cli/silence_query.go:143 +0x7fa
github.com/prometheus/alertmanager/cli.execWithTimeout.func1(0xc0000c6120, 0x0, 0x0)
/Users/angelinel/go/pkg/mod/github.com/prometheus/alertmanager@v0.22.2/cli/utils.go:154 +0xa4
gopkg.in/alecthomas/kingpin%2ev2.(*actionMixin).applyActions(0xc0007aa558, 0xc0000c6120, 0x0, 0x0)
/Users/angelinel/go/pkg/mod/gopkg.in/alecthomas/kingpin.v2@v2.2.6/actions.go:28 +0x6d
gopkg.in/alecthomas/kingpin%2ev2.(*Application).applyActions(0xc0000da690, 0xc0000c6120, 0x0, 0x0)
/Users/angelinel/go/pkg/mod/gopkg.in/alecthomas/kingpin.v2@v2.2.6/app.go:557 +0xdf
gopkg.in/alecthomas/kingpin%2ev2.(*Application).execute(0xc0000da690, 0xc0000c6120, 0xc000428780, 0x2, 0x2, 0x0, 0x0, 0x0, 0x0)
/Users/angelinel/go/pkg/mod/gopkg.in/alecthomas/kingpin.v2@v2.2.6/app.go:390 +0x95
gopkg.in/alecthomas/kingpin%2ev2.(*Application).Parse(0xc0000da690, 0xc000032050, 0x1, 0x1, 0x1, 0x0, 0x0, 0x10)
/Users/angelinel/go/pkg/mod/gopkg.in/alecthomas/kingpin.v2@v2.2.6/app.go:222 +0x228
github.com/prometheus/alertmanager/cli.Execute()
/Users/angelinel/go/pkg/mod/github.com/prometheus/alertmanager@v0.22.2/cli/root.go:122 +0x925
main.main()
/Users/angelinel/go/pkg/mod/github.com/prometheus/alertmanager@v0.22.2/cmd/amtool/main.go:19 +0x25
amtool --version
amtool, version 0.22.2 (branch: HEAD, revision: 44f8adc06af5101ad64bd8b9c8b18273f2922051)
build user: root@31a26a5369f4
build date: 20210602-07:47:01
go version: go1.16.4
platform: darwin/amd64
What did you do?
I ran
amtool silence(default -o simple) on the command line.What did you expect to see?
A list of the silences. It works when tagged
-qor-o jsonWhat did you see instead? Under which circumstances?
Environment
macOS Catalina
System information:
Darwin 19.6.0 x86_64
Alertmanager version: