https://github.com/blinklabs-io/nview
A TUI for monitoring Cardano nodes
https://github.com/blinklabs-io/nview
blockchain cardano cardano-node go golang terminal-app tui
Last synced: 18 days ago
JSON representation
A TUI for monitoring Cardano nodes
- Host: GitHub
- URL: https://github.com/blinklabs-io/nview
- Owner: blinklabs-io
- License: apache-2.0
- Created: 2023-04-04T21:09:47.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-27T13:48:26.000Z (21 days ago)
- Last Synced: 2025-04-27T14:33:51.096Z (21 days ago)
- Topics: blockchain, cardano, cardano-node, go, golang, terminal-app, tui
- Language: Go
- Homepage:
- Size: 237 MB
- Stars: 32
- Watchers: 1
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# nview
nview is a local monitoring tool for a Cardano Node (cardano-node) meant to
complement remote monitoring tools by providing a local view of a running
node from the command line. It's a TUI (terminal user interface) designed to
fit most screens.
![]()
## Design and functionality
The goal with nview is to provide an alternative to the Guild LiveView
(gLiveView.sh) shell scripts which is shipped as a single binary with all of
the functionality included natively. This allows the tool to be more portable
to non-Linux systems by using Go standard library functionality.The design is more in line with a 12-factor application, with no config
files or other on-disk requirements. Functionality is controlled via
environment variables within the application's context. This prevents the
application from being a drop-in replacement for gLiveView for Cardano Node
administrators, but unlocks the ability to add functionality beyond that
easily attainable with a shell script.## Usage
Running nview against a running Cardano Node will work out of the box with a
default Cardano Node configuration, which exposes metrics in Prometheus data
format on a specific port.```bash
./nview
```Or, from source:
```bash
go run .
```### Configuration
Configuration can be controlled by either a configuration file or environment
variables. In cases where both are present, the environment variable takes
precedence.#### Configuration (env)
The following environment variables control the behavior of the application.
- `NODE_NAME` - Changes the name displayed by nview, default is "Cardano
Node", maximum 19 characters
- `NETWORK` - Short-cut environment variable to use a default configuration
for the given known named network. Overrides `CARDANO_NETWORK`, default ""
- `CARDANO_NETWORK` - Named network configured on the Cardano Node, default
is "mainnet"
- `PROM_HOST` - Sets the host address used to fetch Prometheus metrics from a
Cardano Node, default is "127.0.0.1"
- `PROM_PORT` - Sets the host port used to fetch Prometheus metrics from a
Cardano Node, default is 12798
- `PROM_TIMEOUT` - Sets the maximum number of seconds to wait for response
when polling a Cardano Node for Prometheus metrics, default is 3#### Configuration (YAML)
To use a configuration file, run `nview` with a command line flag to set the
file to load as a configuration.```bash
./nview -config /path/to/config.yml
```config.yaml:
```
app:
nodeName: Cardano Node
network:
node:
network: mainnet
port: 3001
prometheus:
host: 127.0.0.1
port: 12798
timeout: 3
```An example configuration is provided at `config.yaml.example`.
## GeoLocation
We embed free GeoLite2 city data created by MaxMind, available
from https://www.maxmind.com and licensed under CC BY-SA 4.0