-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 95befa3
Showing
7 changed files
with
753 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
issues: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- run: git fetch --force --tags | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: stable | ||
- uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 Furkan Pehlivan | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# AMTUI - Alertmanager Terminal User Interface | ||
|
||
``` | ||
█████╗ ███╗ ███╗████████╗██╗ ██╗██╗ | ||
██╔══██╗████╗ ████║╚══██╔══╝██║ ██║██║ | ||
███████║██╔████╔██║ ██║ ██║ ██║██║ | ||
██╔══██║██║╚██╔╝██║ ██║ ██║ ██║██║ | ||
██║ ██║██║ ╚═╝ ██║ ██║ ╚██████╔╝██║ | ||
╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ | ||
``` | ||
|
||
AMTUI is a terminal-based user interface (TUI) application that allows you to interact with Prometheus Alertmanager using your terminal. It provides a convenient way to monitor alerts, view silences, and check the status of Alertmanager instances right from your command line. | ||
|
||
## Features | ||
|
||
- View active alerts with details such as severity, alert name, and description. | ||
- Browse and review existing silences in Alertmanager. | ||
- Check the general status of your Alertmanager instance. | ||
|
||
## Installation | ||
|
||
To use AMTUI, you'll need to have Go installed on your system. Then, you can install AMTUI using the following steps: | ||
|
||
1. Clone the repository: | ||
|
||
```bash | ||
git clone https://github.com/pehlicd/amtui.git | ||
``` | ||
|
||
2. Navigate to the project directory: | ||
|
||
```bash | ||
cd amtui | ||
``` | ||
|
||
3. Build the application: | ||
|
||
```bash | ||
go build | ||
``` | ||
|
||
4. Run the application: | ||
|
||
```bash | ||
./amtui | ||
``` | ||
|
||
## Usage | ||
|
||
Once you've launched AMTUI, you can navigate through different sections using the following keyboard shortcuts: | ||
|
||
- Press `1` to view and interact with active alerts. | ||
- Press `2` to see existing silences. | ||
- Press `3` to check the general status of your Alertmanager instance. | ||
|
||
### Keyboard Shortcuts | ||
|
||
- `q`: Quit the application. | ||
- `l`: Focus on the preview list. | ||
- `h`: Focus on the sidebar list. | ||
- `j`: Move focus to the preview. | ||
- `k`: Move focus to the preview list. | ||
- `ESC`: Return focus to the sidebar list. | ||
|
||
## Configuration | ||
|
||
AMTUI uses a configuration file to connect to your Alertmanager instance. By default, the application will look for a configuration file at `~/.amtui.yaml`. If the configuration file doesn't exist, AMTUI will guide you through creating it with the necessary connection details. | ||
|
||
You can also specify connection details using command-line flags: | ||
|
||
```bash | ||
./amtui -host your-alertmanager-host -port your-alertmanager-port -scheme http | ||
``` | ||
|
||
## Dependencies | ||
|
||
AMTUI uses the following dependencies: | ||
|
||
- `github.com/gdamore/tcell/v2`: Terminal handling and screen painting. | ||
- `github.com/prometheus/alertmanager/api/v2/client`: Alertmanager API client. | ||
- `github.com/rivo/tview`: Terminal-based interactive viewer. | ||
- `gopkg.in/yaml.v3`: YAML support for the configuration file. | ||
|
||
## Contributing | ||
|
||
If you'd like to contribute to AMTUI, feel free to submit pull requests or open issues on the [GitHub repository](https://github.com/pehlicd/amtui). Your feedback and contributions are highly appreciated! | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. | ||
|
||
--- | ||
|
||
Developed by [Furkan Pehlivan](https://github.com/pehlicd) - [Project Repository](https://github.com/pehlicd/amtui) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
module github.com/pehlicd/amtui | ||
|
||
go 1.20 | ||
|
||
require ( | ||
github.com/gdamore/tcell/v2 v2.6.0 | ||
github.com/go-openapi/swag v0.22.3 | ||
github.com/prometheus/alertmanager v0.25.0 | ||
github.com/rivo/tview v0.0.0-20230814110005-ccc2c8119703 | ||
gopkg.in/yaml.v3 v3.0.1 | ||
) | ||
|
||
require ( | ||
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect | ||
github.com/gdamore/encoding v1.0.0 // indirect | ||
github.com/go-logr/logr v1.2.3 // indirect | ||
github.com/go-logr/stdr v1.2.2 // indirect | ||
github.com/go-openapi/analysis v0.21.4 // indirect | ||
github.com/go-openapi/errors v0.20.3 // indirect | ||
github.com/go-openapi/jsonpointer v0.19.5 // indirect | ||
github.com/go-openapi/jsonreference v0.20.0 // indirect | ||
github.com/go-openapi/loads v0.21.2 // indirect | ||
github.com/go-openapi/runtime v0.25.0 // indirect | ||
github.com/go-openapi/spec v0.20.7 // indirect | ||
github.com/go-openapi/strfmt v0.21.3 // indirect | ||
github.com/go-openapi/validate v0.22.0 // indirect | ||
github.com/josharian/intern v1.0.0 // indirect | ||
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect | ||
github.com/mailru/easyjson v0.7.7 // indirect | ||
github.com/mattn/go-runewidth v0.0.14 // indirect | ||
github.com/mitchellh/mapstructure v1.5.0 // indirect | ||
github.com/oklog/ulid v1.3.1 // indirect | ||
github.com/opentracing/opentracing-go v1.2.0 // indirect | ||
github.com/rivo/uniseg v0.4.3 // indirect | ||
go.mongodb.org/mongo-driver v1.11.0 // indirect | ||
go.opentelemetry.io/otel v1.11.1 // indirect | ||
go.opentelemetry.io/otel/trace v1.11.1 // indirect | ||
golang.org/x/sys v0.6.0 // indirect | ||
golang.org/x/term v0.6.0 // indirect | ||
golang.org/x/text v0.7.0 // indirect | ||
gopkg.in/yaml.v2 v2.4.0 // indirect | ||
) |
Oops, something went wrong.