You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cardano-tracer/README.md
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -13,3 +13,7 @@ For more details please [read its documentation](https://github.com/input-output
13
13
## Developers
14
14
15
15
Benchmarking team is responsible for this service. The primary developer is [@denisshevchenko](https://github.com/denisshevchenko).
16
+
17
+
## Feedback
18
+
19
+
Your bug reports and/or Feature Requests are welcome! Feel free to open a ticket in [this repository](https://github.com/input-output-hk/cardano-node/issues) with labels `RTView` and `tracing`.
Copy file name to clipboardExpand all lines: cardano-tracer/docs/cardano-rtview.md
+13-1Lines changed: 13 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -79,6 +79,8 @@ Now, open your node's configuration file (if you took it from [Hydra](https://hy
79
79
"TraceOptionNodeName": "relay-1"
80
80
```
81
81
82
+
Please make sure you specified the _real name_ of your node in `TraceOptionNodeName` field.
83
+
82
84
Finally, run the node with this configuration file and add tracer's CLI-parameter like this:
83
85
84
86
```
@@ -87,6 +89,16 @@ $ ./cardano-node run --tracer-socket-path-connect /tmp/forwarder.sock
87
89
88
90
That's it. Now you can open [https://127.0.0.1:3300](https://127.0.0.1:3300/) in your browser.
89
91
92
+
### Important
93
+
94
+
Please note that the node has another CLI-parameter for the socket:
95
+
96
+
```
97
+
--socket-path FILEPATH Path to a cardano-node socket
98
+
```
99
+
100
+
But `--socket-path` is **not** for working with `cardano-tracer`. The only CLI-parameters you need to specify the path to the socket for working with `cardano-tracer` are `--tracer-socket-path-connect` (if your node should _initiate_ connection) or `--tracer-socket-path-accept` (if your node should _accept_ connection). They are **not** related to `--socket-path`, so you can use these CLI-parameters independently from each other.
101
+
90
102
# Configuration
91
103
92
104
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.
@@ -108,7 +120,7 @@ hasRTView:
108
120
epPort: 3300
109
121
```
110
122
111
-
Here `epHost` and `epPort` specify the host and the port for RTView web page.
123
+
Here `epHost` and `epPort` specify the host and the port for RTView web page. Also, you can find examples of configuration files in [configuration directory](https://github.com/input-output-hk/cardano-node/tree/master/cardano-tracer/configuration).
112
124
113
125
That's it. Now run `cardano-tracer` and open [127.0.0.1:3300](https://127.0.0.1:3300) in your browser.
Copy file name to clipboardExpand all lines: cardano-tracer/docs/cardano-tracer.md
+61-56Lines changed: 61 additions & 56 deletions
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,7 @@ Distributed scenario is for real-life case: for example, you have `N` nodes work
75
75
76
76
Local scenario is for testing case: for example, you want to try your new infrastructure from scratch, so you run `N` nodes and one `cardano-tracer` process on your machine.
77
77
78
-
**IMPORTANT NOTICE**: Please note that `cardano-tracer`**does not** support connection via IP-address and port, to avoid unauthorized connections. The **only** way to establish connection with the node is a local socket (Unix sockets or Windows named pipes).
78
+
**IMPORTANT NOTICE**: Please note that `cardano-tracer`**does not** support connection via IP-address and port, to avoid unauthorized connections. The **only** way to establish connection with the node is the local socket (Unix sockets or Windows named pipes).
79
79
80
80
## Distributed Scenario
81
81
@@ -103,7 +103,7 @@ The minimalistic configuration file for `cardano-tracer` would be:
103
103
"networkMagic": 764824073,
104
104
"network": {
105
105
"tag": "AcceptAt",
106
-
"contents": "/tmp/cardano-tracer.sock"
106
+
"contents": "/tmp/forwarder.sock"
107
107
},
108
108
"logging": [
109
109
{
@@ -115,80 +115,85 @@ The minimalistic configuration file for `cardano-tracer` would be:
115
115
}
116
116
```
117
117
118
-
The `network` field specifies the way how `cardano-tracer` will be connected to your nodes. Here you see `AcceptAt` tag, which means that `cardano-tracer` works as a server: it _accepts_ network connections by listening the local socket `/tmp/cardano-tracer.sock`. Your nodes work as clients: they _initiate_ network connections using their local sockets. It can be shown like this:
118
+
The `network` field specifies the way how `cardano-tracer` will be connected to your nodes. Here you see `AcceptAt` tag, which means that `cardano-tracer` works as a server: it _accepts_ network connections by listening the local socket `/tmp/forwarder.sock`. Your nodes work as clients: they _initiate_ network connections using their local sockets. It can be shown like this:
The idea of SSH forwarding is simple: we do connect not the processes directly, but their network endpoints instead. You can think of it as a network channel from the local socket on one machine to the local socket on another machine:
So neither your nodes nor `cardano-tracer` know anything about SSH, they only know about their local sockets. But because of SSH forwarding mechanism they work together from different machines. And since you already have your SSH credentials, the connection between your nodes and `cardano-tracer` will be secure.
176
176
177
+
Please note that the path `/tmp/forwarder.sock` is just an example. You can use any other name in any other directory where you have read/write permissions.
178
+
177
179
So, to connect `cardano-node` working on machine `A` with `cardano-tracer` working on machine `D`, run this command on machine `A`:
-`/tmp/cardano-tracer.sock` is a path to the local socket on machine `A`,
186
-
-`/tmp/cardano-node.sock` is a path to the local socket on machine `D`,
187
-
-`john` is a user you use to login on machine `D`,
187
+
-`/tmp/forwarder.sock` is a path to the local socket on machine `A`_and_ a path to the local socket on machine `D`,
188
+
-`john` is a user name you use to login on machine `D`,
188
189
-`109.75.33.121` is an IP-adress of machine `D`.
189
190
190
191
Run the same command on machines `B` and `C` to connect corresponding nodes with the same `cardano-tracer` working on machine `D`.
191
192
193
+
### Important
194
+
195
+
Please make sure you run `ssh`-command **before** you start your node. Since `ssh` creates the channel and `cardano-node` uses that channel, you should _create_ it before _using_ it.
196
+
192
197
## Local Scenario
193
198
194
199
As was mentioned above, local scenario is for testing, when your nodes and `cardano-tracer` are working on the same machine. In this case all these processes can see the same local sockets directly, so we don't need `ssh`. The configuration file for 3 local nodes would look like this:
@@ -198,7 +203,7 @@ As was mentioned above, local scenario is for testing, when your nodes and `card
198
203
"networkMagic": 764824073,
199
204
"network": {
200
205
"tag": "AcceptAt",
201
-
"contents": "/tmp/cardano-tracer.sock"
206
+
"contents": "/tmp/forwarder.sock"
202
207
},
203
208
"logging": [
204
209
{
@@ -210,7 +215,7 @@ As was mentioned above, local scenario is for testing, when your nodes and `card
210
215
}
211
216
```
212
217
213
-
As you see, it is the same configuration file: the `cardano-tracer` works as a server: it _accepts_ network connections by listening the local socket `/tmp/cardano-tracer.sock`. Your local nodes work as clients: they _initiate_ network connections using the _same_ local socket `/tmp/cardano-tracer.sock`.
218
+
As you see, it is the same configuration file: the `cardano-tracer` works as a server: it _accepts_ network connections by listening the local socket `/tmp/forwarder.sock`. Your local nodes work as clients: they _initiate_ network connections using the _same_ local socket `/tmp/forwarder.sock`.
214
219
215
220
There is another way to connect `cardano-tracer` to your nodes: the `cardano-tracer` can work as _initiator_, this is an example of configuration file:
216
221
@@ -223,7 +228,7 @@ There is another way to connect `cardano-tracer` to your nodes: the `cardano-tra
223
228
"/tmp/cardano-node-1.sock"
224
229
"/tmp/cardano-node-2.sock"
225
230
"/tmp/cardano-node-3.sock"
226
-
]
231
+
]
227
232
},
228
233
"logging": [
229
234
{
@@ -237,13 +242,13 @@ There is another way to connect `cardano-tracer` to your nodes: the `cardano-tra
237
242
238
243
As you see, the tag in `network` field is `ConnectTo` now, which means that `cardano-tracer` works as a client: it _establishes_ network connections with your local nodes via the local sockets `/tmp/cardano-node-*.sock`. In this case each socket is used by a particular node.
239
244
240
-
Please use `ConnectTo`-based scenario only if you really need it. Otherwise, it is **highly recommended** to use `AcceptAt`-based scenario.
245
+
Please use `ConnectTo`-based scenario only if you really need it. Otherwise, it is **highly recommended** to use `AcceptAt`-based scenario. The reason is easier maintainance. Suppose you have 3 working nodes, and they are connected to the same `cardano-tracer`. And then you want to connect 4-th node to it. If `cardano-tracer` is configured using `AcceptAt`, you shouldn't change its configuration - you just connect your 4-th node to it. But if `cardano-tracer` is configured using `ConnectTo`, you should add path to 4-th socket in its configuration file and then restart `cardano-tracer` process.
241
246
242
247
## Network Magic
243
248
244
249
The field `networkMagic` specifies the value of network magic. It is an integer constant from the genesis file, the node uses this value for the network handshake with peers. Since `cardano-tracer` should be connected to the node, it needs that network magic.
245
250
246
-
The value from the example above, `764824073`, is taken from the Shelley genesis file for Mainnet. Please take this value from the genesis file your nodes are launched with.
251
+
The value from the example above, `764824073`, is taken from the Shelley genesis file for [Mainnet](https://hydra.iohk.io/job/Cardano/cardano-node/cardano-deployment/latest-finished/download/1/index.html). Please take this value from the genesis file your nodes are launched with.
247
252
248
253
## Requests
249
254
@@ -340,9 +345,9 @@ Here the web page is available at `http://127.0.0.1:3000`. Please note that if y
340
345
After you open `http://127.0.0.1:3000` in your browser, you will see the list of identifiers of connected nodes (or the warning message, if there are no connected nodes yet), for example:
341
346
342
347
```
343
-
* tmp-cardano-tracer.sock@0
344
-
* tmp-cardano-tracer.sock@1
345
-
* tmp-cardano-tracer.sock@2
348
+
* tmp-forwarder.sock@0
349
+
* tmp-forwarder.sock@1
350
+
* tmp-forwarder.sock@2
346
351
```
347
352
348
353
Each identifier is a hyperlink to the page where you will see the **current** list of metrics received from the corresponding node, in such a format:
@@ -368,7 +373,7 @@ The optional field `hasEKG` specifies the hosts and ports of two web pages:
368
373
1. the list of identifiers of connected nodes,
369
374
2. EKG monitoring page.
370
375
371
-
For example:
376
+
For example, if you use JSON configuration file:
372
377
373
378
```
374
379
"hasEKG": [
@@ -386,9 +391,9 @@ For example:
386
391
The page with the list of identifiers of connected nodes will be available at `http://127.0.0.1:3100`, for example:
387
392
388
393
```
389
-
* tmp-cardano-tracer.sock@0
390
-
* tmp-cardano-tracer.sock@1
391
-
* tmp-cardano-tracer.sock@2
394
+
* tmp-forwarder.sock@0
395
+
* tmp-forwarder.sock@1
396
+
* tmp-forwarder.sock@2
392
397
```
393
398
394
399
Each identifier is a hyperlink, after clicking to it you will be redirected to `http://127.0.0.1:3101` where you will see EKG monitoring page for corresponding node.
0 commit comments