1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
|
# Onionbalance Status Socket
Basic information about running Onionbalance can be obtained by querying
so called status socket.
Status socket is a Unix socket file created by Onionbalance. It is
automatically closed by Onionbalance after reading it to the end.
Example:
```
socat - unix-connect:/var/run/onionbalance/control | json_pp -json_opt pretty
{
"services" : [
{
"instances" : [
{
"descriptorReceived" : "2020-06-16 19:59:28",
"introPointsNum" : 3,
"introSetModified" : "2020-06-16 19:59:28",
"onionAddress" : "vkmiy6biqcyphtx5exswxl5sjus2vn2b6pzir7lz5akudhwbqk5muead.onion"
}
],
"onionAddress" : "bvy46sg2b5dokczabwv2pabqlrps3lppweyrebhat6gjieo2avojdvad.onion.onion",
"publishAttemptFirstDescriptor" : "2020-06-16 20:00:12",
"publishAttemptSecondDescriptor" : "2020-06-16 20:00:12"
}
]
}
```
The overall format of the status socket output is clear from the above
example. Note that ` \"introPointsNum\" : 3, ` and
`introModified` for an instance is optional,
`uploaded\*` and `publishAttempt\*` for a
service may be `null`.
Meaning of non-self-explanatory fields:
* `introSetModified` is the intro set last modified timestamp.
* `introPointsNum` is the number of introduction points on the descriptor.
* `publishAttemptFirstDescriptor` and `publishAttemptSecondDescriptor` are the
last publish attempt timestamps for first and second descriptors.
* `descriptorReceived` is the received descriptor timestamp.
## Configuration
Status socket filesystem location can be configured either by
`status-socket-location` in the YAML config file or by
`ONIONBALANCE_STATUS_SOCKET_LOCATION` environment variable
(environment takes precedence).
If neither is given, the socket file is not opened.
Example config file:
```
# Onionbalance Config File
status-socket-location: /home/user/test.sock
services:
- instances:
- address: vkmiy6biqcyphtx5exswxl5sjus2vn2b6pzir7lz5akudhwbqk5muead.onion
name: node1
key: bvy46sg2b5dokczabwv2pabqlrps3lppweyrebhat6gjieo2avojdvad.key
```
|