A terminal UI (TUI) for HashiCorp Nomad

Damon - A terminal Dashboard for HashiCorp Nomad

Damon is a terminal user interface (TUI) for Nomad. It provides functionality to observe and interact with Nomad resources such as Jobs, Deployments, or Allocations.

Additional Notes

Damon is in an early stage and is under active development. We are working on improving the performance and adding new features to Damon. Please take a look at the Damon project board to see what features you can expect in near future. If you find a bug or you have great ideas how Damon can be improved feel free to open an issue. To avoid duplicates, please check the project board before submitting one. Thank you!

Screenshot

image

Installation

Brew

--> Comming soon

Building from source and Run Damon

Make sure you have your go environment setup:

  1. Clone the project
  2. Run $ make build to build the binary
  3. Run $ make run to run the binary
  4. You can use $ make install-osx on a Mac to cp the binary to /usr/local/bin/damon

or

$ go install ./cmd/damon

How to use it

Once Damon is installed and avialable in your path, simply run:

$ damon

Environment Variables

Damon reads the following environment variables on startup:

  • NOMAD_TOKEN
  • NOMAD_ADDR
  • NOMAD_REGION
  • NOMAD_NAMESPACE
  • NOMAD_HTTP_AUTH
  • NOMAD_CACERT
  • NOMAD_CAPATH
  • NOMAD_CLIENT_CERT
  • NOMAD_CLIENT_KEY
  • NOMAD_TLS_SERVER_NAME
  • NOMAD_SKIP_VERIFY

You can read about them in detail here.

Navigation

General

On every table or text view, you can use:

  • k or arrow up to navigate up
  • j or arrow down to navigate down

Top Level Commands

  • Show Jobs: ctrl-j
  • Show Deployments: ctrl-d
  • Show Namespaces: ctrl-n
  • Jump to a Jobs Allocations: ctrl-j
  • Switch Namespace: s
  • Quit: ctrl-c

Job View Commands

  • Show Allocations for a Job: <ENTER> (on the selected job)
  • Show TaskGroups for a Job: <t> (on the selected job)
  • Filter Job: </> (on the selected job)

Allocation View Commands

  • Show logs on STDOUT for an allocation: <ENTER>
  • Show logs on STDERR for an allocation: <ctrl-e>

Log View

When Damon displays logs, you can navigate through the logs using j, k, G, and g. To filter logs you can hit / which will open a input field to enter the filter string.

Owner
HashiCorp
Consistent workflows to provision, secure, connect, and run any infrastructure for any application.
HashiCorp
Comments
  • Crash while tailing a pretty active web log

    Crash while tailing a pretty active web log

    panic: runtime error: index out of range [507] with length 0 [recovered]
            panic: runtime error: index out of range [507] with length 0
    
    goroutine 1 [running]:
    github.com/rivo/tview.(*Application).Run.func1(0x1400021c1c0)
            /Users/james/go/pkg/mod/github.com/rivo/[email protected]/application.go:243 +0x7c
    panic(0x104d10c80, 0x1400013c4b0)
            /opt/homebrew/Cellar/go/1.16/libexec/src/runtime/panic.go:965 +0x14c
    github.com/rivo/tview.(*TextView).Draw(0x14000200600, 0x104d50218, 0x14000254240)
            /Users/james/go/pkg/mod/github.com/rivo/[email protected]/textview.go:1017 +0xb18
    github.com/rivo/tview.(*Flex).Draw(0x14000069590, 0x104d50218, 0x14000254240)
            /Users/james/go/pkg/mod/github.com/rivo/[email protected]/flex.go:183 +0x2b8
    github.com/rivo/tview.(*Flex).Draw(0x140000695c0, 0x104d50218, 0x14000254240)
            /Users/james/go/pkg/mod/github.com/rivo/[email protected]/flex.go:183 +0x2b8
    github.com/rivo/tview.(*Pages).Draw(0x14000069680, 0x104d50218, 0x14000254240)
            /Users/james/go/pkg/mod/github.com/rivo/[email protected]/pages.go:277 +0xb0
    github.com/rivo/tview.(*Application).draw(0x1400021c1c0, 0x0)
            /Users/james/go/pkg/mod/github.com/rivo/[email protected]/application.go:597 +0xac
    github.com/rivo/tview.(*Application).Draw.func1()
            /Users/james/go/pkg/mod/github.com/rivo/[email protected]/application.go:550 +0x28
    github.com/rivo/tview.(*Application).Run(0x1400021c1c0, 0x0, 0x0)
            /Users/james/go/pkg/mod/github.com/rivo/[email protected]/application.go:376 +0x850
    main.main()
            /Users/james/Developer/damon/cmd/damon/main.go:104 +0x9d8
    
    
  • HCD: Implement nomad job status display

    HCD: Implement nomad job status display

    What is this about?

    This PR adds the nomad job status view to Damon, which can be displayed when hitting i on a selected job in the jobs view. The status gives the exact same response as the command nomad job status <job-id>

    Preview

    nomad-job-status
  • Seeing Tasks groups of namespace NB in namespace NA

    Seeing Tasks groups of namespace NB in namespace NA

    Hello guys,

    I started to use damon version v0.1.0-dev (8ff5085) with is a great tool for quick debugging. Let's say I deployed an application A in namespace NA and NB. I noticied that when I'm in a namespace NA, I'm able to see taskgroup of namespace NB. Anyone else noticed that? Any fix soon?

  • Feature: highlight string in logs

    Feature: highlight string in logs

    It would be cool to be able to specify a highlight string/regex to quickly see log lines that I'm looking for. This is a great feature of multitail. https://www.vanheusden.com/multitail/

  • Missing dependency tcell

    Missing dependency tcell

    I have e79c4a3e913841c7251c9aaa6b830b5bbaa3098c check out and my repo is clean.

    ❯ make build
    go build -o bin/damon ./cmd/damon
    go: github.com/rivo/[email protected] requires
            github.com/gdamore/tcell/[email protected]: missing go.sum entry; to add it:
            go mod download github.com/gdamore/tcell/v2
    make: *** [build] Error 1
    
  • Unactionable 500 from watcher

    Unactionable 500 from watcher

    Fresh install of damon, nomad is remote with anonymous acl write access.

    If I press a key after more than a short ( < 1s?) time has passed, I get an "Unexpected response code: 500 (Permission Denied)". At this point, the only action is to press enter/escape/ctrl+c, which does nothing, and then any key press, which will then quit. If I press enter before that short time window, then I can trigger the error dialog and then press enter to pop up a level and continue to navigate despite the large error window in the center of the screen. Commenting out line 128 of watcher/watcher.go lets me browse uninterrupted so it doesn't seem all that fatal.

    It would be nice to be able to close the dialog box without quitting the application. Secondarily, the modal behavior seems to race with other ui interactions.

    Running on ubuntu 20.04/tmux/kitty

    Totally understand that this is early stage and I was just tooling around with it and wanted to pass along my experience. It's super cool and look forward to seeing more!

  • Random task is selected for log viewing when selecting an allocation with multiple tasks

    Random task is selected for log viewing when selecting an allocation with multiple tasks

    When selecting an allocation from the list to view logs, if the allocation has more than one task it appears to be selecting the task to show logs for at random.

    $ nomad alloc status 92ffac07 | grep '^Task "' 
    Task "postgres" (prestart sidecar) is "running"
    Task "sonarperl" is "running"
    

    In this case, I've had both the logs for the postgres the sonarperl tasks be shown without any indication as to why it was selected.

    I checked the projects board and didn't see anything that looked like this so I figured I'd open the issue just in case.

    Let me know if I can provide any further info!

  • Rendering magic

    Rendering magic

    How do you draw to a terminal aware of the height of the terminal? I know with ANSI control codes you can move the cursor to print on a preceding line or clear the screen and rewrite, but I've never seen how to implement a more complex full terminal screen rendering application.

    I did a skim of ./layout and ./view and didn't notice anything.

  • As a user, I want to be able to select which task I want to show the logs for!

    As a user, I want to be able to select which task I want to show the logs for!

    Description

    Currently, when viewing logs for an allocation that has multiple tasks, it will pick a task randomly to show the logs.

    Task

    Add a selection to Damon that allows users to select a task from a task list.

    Acceptance

    • Deploy a job with multiple tasks
    • As a user, I can see that I can select the desired task i want to view the logs for.
  • Segfault while viewing allocation logs

    Segfault while viewing allocation logs

    First off, this project is amazing and will be a staple in my day to day for a long time!

    I just built the binary and was testing it out and I left the log viewer open on an allocation for maybe 30-60 seconds while I was reading the projects README when Damon crashed with the error below.

    (Note, the TUI crashing left me unable to copypasta the error and it was a bit mangled format-wise in my terminal so I had to hand type it, apologies if the formatting is a bit different)

    panic: runtime error: invalid memory address or nil pointer dereference
    [signal SIGSEGV: segmentation on violation code=0x1 addr=0x10 pc=0x73a1b8]
      goroutine 242 [running]:
          github.com/hcjulz/damon/watcher.(*Watcher).SubscribeToLogs.func1(0xc0004c20c0, 0xc000254190, 0xc0006285a0, 0xc0004a23c0) /workspaces/damon/watcher/logs.go:35 +0x118
          created by github.com/hcjulz/damon/watcher.(*Watcher).SubscribeToLogs /workspaces/damon/watcher/logs.go:31 +0x385
    

    Environment Information

     ➜  consul-cluster git:(master) ✗ cat /etc/lsb-release 
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=20.04
    DISTRIB_CODENAME=focal
    DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"
    
    $ nomad version
    Nomad v1.1.3 (8c0c8140997329136971e66e4c2337dfcf932692)
    
    $ nomad server members
    Name                        Address      Port  Status  Leader  Protocol  Build  Datacenter  Region
    nomad-0.global             10.0.0.2   4648   alive   true         2          1.1.3  awe-prod-1  global
    nomad-1.global              10.0.0.3   4648   alive   false       2           1.1.3  awe-prod-1  global
    nomad-2.global             10.0.0.4   4648   alive   false       2           1.1.3  awe-prod-1  global
    

    Haven't been able to reproduce the error again since but i'll try to watch more closely when monitoring logs to try and see if I can get some more context.

  • ⚙️ Allow a subscriber to subscribe to multiple topics at a time.

    ⚙️ Allow a subscriber to subscribe to multiple topics at a time.

    Description

    Currently, a subscriber (that can be a particular view like the Job View) can subscribe to only a single topic (Jobs, Allocs, Deployments). However, there is use-cases where a view is interested in multiple topics.

    Task

    Update the watcher such that a subscriber can subscribe to multiple topics and that a view is notified for all subscribed topics.

  • Feature request: optionally merge stdout and stderr

    Feature request: optionally merge stdout and stderr

    Sometimes it's really helpful to have stdout and stderr in the same window. I would love to have them optionally mixed together with color-coding for each.

  • Show healthy / desired allocs in job summary #17

    Show healthy / desired allocs in job summary #17

    What is this about?

    Show healthy and desired allocs count in job summary along with a status indicator. (Follow up on #17)

    Example : 2/3 ( 2 allocs are healthy out of 3 desired.)

    The status indicator represents the below,

    • ⚠️ Deployment cancelled/failed
    • ❌ Unhealthy allocs
    • ✅ Deployment Success and Healthy
    • ⌛ Deployment Running
    • --- Pending

    Preview

    damon-job-summary

  • Show healthy/running/desired allocs in Job summary

    Show healthy/running/desired allocs in Job summary

    What is the problem?

    The current summary data in Jobs view is not very intuitive. Currently it shows, how many groups are running out of total groups in a Job. But people are really interested on whether the desired allocs are running and healthy within a job. Something similar to the below one. This is Job overview from Nomad UI dashboard.

    image

    How to solve?

    We can show below detail in Summary.

    <healthy allocs> / <running allocs> / <desired allocs>

    Example

    image

    The allocs should be the sum of allocs from each group. (Mostly each job will have one group. I still can’t find a good use case, where we run multiple groups in a Job)

    I can give a PR on this change 😎 . Let me know if this improvement make sense.

Podman-tui - A Terminal User Interface to interact with the podman (v3.x)
Podman-tui - A Terminal User Interface to interact with the podman (v3.x)

podman-tui podman-tui is a Terminal User Interface to interact with the podman (

Dec 23, 2022
Simple command line tool helper to integrate with hashicorp vault & github api

Overview CI/CD Toolkit is small command line tool helper to integrate with vault secret kv management & github api We can use simple command to genera

Apr 2, 2022
💼 CLI / TUI for Pocket
💼 CLI / TUI for Pocket

gocket A simple CLI (or TUI) for Pocket. Read your Pocket goodies from your comfy shell. Archive or delete multiple entries easily. Use a TUI or pipe

Aug 9, 2022
TUI process monitor written in Go
TUI process monitor written in Go

pst This is TUI process monitor written in Go. Features Monitor process's list, info, tree, open files, Kill process Support OS Mac Linux Requirements

Nov 25, 2022
A CLI / TUI for Microsoft Teams
A CLI / TUI for Microsoft Teams

teams-cli A Command Line Interface (or TUI) to interact with Microsoft Teams Status The CLI only let you log-in and fetches your user and conversation

Dec 22, 2022
a TUI for signal messenger, written in Go
a TUI for signal messenger, written in Go

siggo A terminal ui for signal-cli, written in Go. Features vim-style ux useful for quick messages or use $EDITOR to compose fancy ones emoji support,

Jan 2, 2023
A powerful little TUI framework 🏗
A powerful little TUI framework 🏗

Bubble Tea The fun, functional and stateful way to build terminal apps. A Go framework based on The Elm Architecture. Bubble Tea is well-suited for si

Dec 27, 2022
Canard. A command line TUI client for the journalist RSS aggregator.
Canard. A command line TUI client for the journalist RSS aggregator.

Canard Canard. A command line TUI client for the Journalist RSS aggregator. Installation Download a binary from the releases page. Or build it yoursel

Jan 6, 2023
🧭 TUI for command navigation
🧭 TUI for command navigation

devgo a command-line launcher Install latest version curl -o- https://raw.githubusercontent.com/TheWinds/devgo/main/install.sh | bash special version

Apr 19, 2022
A TUI multitool for day-to-day operations for software applications.

Bench (WIP) A TUI multitool for day-to-day operations for software applications. Lets you do common operations needed during IT work that are common e

Dec 5, 2021
🦜 Navigate github repos in a tui

goh Navigate github repos in a tui Why I am constantly refering to my github repos and repos from others for code snippets that are relevant to what I

Dec 10, 2021
A tui for playing media from a caddy fileserver

kwatch a little tui interface to play media from a caddy fileserver. options: -a: server address -u: server http username -p: server http password -o:

Aug 9, 2022
TUI Flappy Bird. It‘s a lil bit jank tbh

EBIRD TUI Flappy Bird. It's a lil bit jank tbh. Build and Install Build dependen

Dec 22, 2021
Tabouli: a TUI for interacting with firmware/embedded devices that support a CLI via serial interface/virtual COM Port
Tabouli: a TUI for interacting with firmware/embedded devices that support a CLI via serial interface/virtual COM Port

Tabouli Information Tabouli is a TUI for interacting with firmware/embedded devi

Apr 2, 2022
A TUI implementation of the popular word quiz wordle!

gordle A TUI implementation of the popular word quiz Wordle! Building Build the cli command: $ go build ./cmd/cli <Empty output on build success> Buil

Dec 21, 2022
The Cloud Aviator: TUI client for cloud services (AWS, Vultr, Heroku, Render.com, ...)
The Cloud Aviator: TUI client for cloud services (AWS, Vultr, Heroku, Render.com, ...)

=== T H E C L O U D A V I A T O R === ⠀⠀⠀⠀⠀⠀⠀⠀⢶⣦⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣷⣦⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

Dec 17, 2022
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal.
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal.

Stonks is a terminal based stock visualizer and tracker. Installation Requirements: golang >= 1.13 Manual Clone the repo Run make && make install Pack

Dec 16, 2022
Terminal client for SimpleNote

GoNote - Terminal client for SimpleNote GoNote is a simple utility for managing notes in your SimpleNote account. It allows basic operations like crea

Nov 22, 2022
gomerge is a tool to quickly bulk merge several pull requests from your terminal.
gomerge is a tool to quickly bulk merge several pull requests from your terminal.

Gomerge is a tool to quickly enable you to bulk merge Github pull requests from your terminal. The intention of this tool is to simplfy, and eventually automate the merging of github pull requests. This tool should be able to run on most systems.

Dec 28, 2022