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

RTView: a link from tracer's README, quick start #4175

Merged
merged 1 commit into from
Jul 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cardano-tracer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

For more details please [read the documentation](https://github.com/input-output-hk/cardano-node/blob/master/cardano-tracer/docs/cardano-tracer.md).

## RTView

RTView is a real-time monitoring tool for Cardano nodes (RTView is an abbreviation for "Real Time View"), it is a part of `cardano-tracer` service. RTView provides an interactive web page where you can see different kinds of information about connected nodes (something like Grafana).

For more details please [read its documentation](https://github.com/input-output-hk/cardano-node/blob/master/cardano-tracer/docs/cardano-rtview.md).

## Developers

Benchmarking team is responsible for this service. The primary developer is [@denisshevchenko](https://github.com/denisshevchenko).
18 changes: 18 additions & 0 deletions cardano-tracer/configuration/minimal-example-rtview.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"networkMagic": 764824073,
"network": {
"tag": "AcceptAt",
"contents": "/tmp/forwarder.sock"
},
"hasRTView": {
"epHost": "127.0.0.1",
"epPort": 3300
},
"logging": [
{
"logRoot": "/tmp/cardano-tracer-logs",
"logMode": "FileMode",
"logFormat": "ForMachine"
}
]
}
12 changes: 12 additions & 0 deletions cardano-tracer/configuration/minimal-example-rtview.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
networkMagic: 764824073
network:
tag: AcceptAt
contents: "/tmp/forwarder.sock"
hasRTView:
epHost: 127.0.0.1
epPort: 3300
logging:
- logRoot: "/tmp/cardano-tracer-logs"
logMode: FileMode
logFormat: ForMachine
74 changes: 65 additions & 9 deletions cardano-tracer/docs/cardano-rtview.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ RTView is a part of `cardano-tracer` [service](https://github.com/input-output-h
# Contents

1. [Introduction](#Introduction)
   1. [Motivation](#Motivation)
   2. [Overview](#Overview)
2. [Configuration](#Configuration)
3. [Notifications](#Notifications)
   1. [SMTP settings](#SMTP-settings)
   2. [Note for Gmail users](#Note-for-Gmail-users)
   3. [Events](#Events)
   4. [Notify period](#Notify-period)
4. [UI](#UI)
1. [Motivation](#Motivation)
2. [Overview](#Overview)
2. [TL;DR: Quick Start](#TL;DR:-Quick-Start)
3. [Configuration](#Configuration)
4. [Notifications](#Notifications)
1. [SMTP settings](#SMTP-settings)
2. [Note for Gmail users](#Note-for-Gmail-users)
3. [Events](#Events)
4. [Notify period](#Notify-period)
5. [UI](#UI)
1. [Security Alert](#Security-Alert)
2. [Missing Metrics](#Missing-Metrics)

# Introduction

Expand All @@ -40,6 +42,51 @@ After your node connects to `cardano-tracer`, you'll see a column with different

Also, there are dynamic charts for different metrics, such as system metrics, blockchain metrics, transaction metrics, etc.

# TL;DR: Quick Start

If you just want to see what is RTView in action - all you need is following simple steps. For simplicity, it is assumed that `cardano-tracer` and your node will run on the same machine with Unix-like OS (for example, Linux).

## Tracer's Side

First of all, take configuration file `minimal-example-rtview.json` from `cardano-tracer/configuration` directory.

Next, run `cardano-tracer` with this configuration file like this:

```
$ ./cardano-tracer -c minimal-example-rtview.json
```

## Node's Side

Now, open your node's configuration file (if you took it from [Hydra](https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/index.html), it's `mainnet-config.json`) and add the following lines in it:

```
"UseTraceDispatcher": true,
"TraceOptions": {
"": {
"severity": "Notice",
"detail": "DNormal",
"backends": [
"Stdout MachineFormat",
"EKGBackend",
"Forwarder"
]
}
},
"TraceOptionPeerFrequency": 2000,
"TraceOptionResourceFrequency": 5000,
"TurnOnLogMetrics": false,
"TraceOptionNodeName": "relay-1"
```

Finally, run the node with this configuration file and add tracer's CLI-parameter like this:

```
$ ./cardano-node run --tracer-socket-path-connect /tmp/forwarder.sock
```

That's it. Now you can open [https://127.0.0.1:3300](https://127.0.0.1:3300/) in your browser.

# Configuration

Since RTView is a part of `cardano-tracer`, the only thing you need to do is to enable RTView (because it's disabled by default). To do it, please add the following lines to `cardano-tracer`'s configuration file.
Expand Down Expand Up @@ -112,3 +159,12 @@ If you selected `Every 12 hours`, the new email with associated event(s) will be
## Security Alert

When you open the web page for the first time, you'll see a warning from your browser, something like "Potential Security Risk Ahead" or "Your connection is not private". This is because `https`-connection between your browser and RTView is using [self-signed certificate](https://en.wikipedia.org/wiki/Self-signed_certificate) generated by [openssl](https://www.openssl.org/) program. So click to `Advanced` button and open the page. Technically, there is no risk at all - your connection **is** private.

## Missing Metrics

When the node connects to `cardano-tracer` and RTView's page displays the first data from it, you may see that some other data is missing: there is `—` instead of particular value. There are following possible reasons for it:

1. The node didn't provide corresponding metrics _yet_, because some information (for example, sync percent) can be displayed only after few minutes after node's start.
2. The node _cannot_ provide corresponding metrics. For example, forging-related metrics make sense only for producer node, not for relay node.
3. The node doesn't provide corresponding metrics because of node's configuration. For example, it can specify severity filter for particular metric, so it just filtered out.
4. The node is incompatible with `cardano-tracer` (they were built from different branches of `cardano-node` repository). For example, particular metric may be renamed in the node, but `cardano-tracer` is still using outdated name.