Skip to content

Usage

Yanic provides several commands:

  • import
  • query
  • serve

Import

RRD-File

Warning, just tested with olddata.rrd from Freifunk Bremen generated by detailed-rrds branch of ffmap-backend and requires InfluxDB

1
2
3
4
5
6
7
8
9
Usage:
  yanic import <file.rrd> <site> <domain> [flags]

Examples:
yanic import --config /etc/yanic.toml olddata.rrd global global

Flags:
  -c, --config string   Path to configuration file (default "config.toml")
  -h, --help            help for import

Firstseen

To import firstseen values there is a little script in contrib:

/opt/go/src/codeberg.org/FreifunkBremen/yanic/contrib/yanic-import-timestamp -n path/to/nodes_old.json -s state.json /var/lib/yanic/state.json

On a productive system @ once:

systemctl stop yanic; cp /var/lib/yanic/state.json /var/lib/yanic/state.bak; /opt/go/src/codeberg.org/FreifunkBremen/yanic/contrib/yanic-import-timestamp -n path/to/nodes_old.json -s /var/lib/yanic/state.json; systemctl start yanic;

Serve

runs yanic in collector-modus to genereate files (e.g. for meshviewer) and save values in databases

from shell

1
2
3
4
5
6
7
8
9
Usage:
  yanic serve [flags]

Examples:
  yanic serve --config /etc/yanic.toml

Flags:
  -c, --config string   Path to configuration file (default "config.toml")
  -h, --help            help for serve

or run as daemon

Query

Send a single request and show response like gluon-neighbour-info on gluon.

e.g. to check the right interface

Usage:
  yanic query <interfaces> <destination> [flags]

Examples:
yanic query "eth0,wlan0" "fe80::eade:27ff:dead:beef"

Flags:
  -h, --help        help for query
      --ip string   ip address which is used for sending (optional - without definition used the link-local address)
      --port int    define a port to listen (if not set or set to 0 the kernel will use a random free port at its own)
      --wait int    Seconds to wait for a response (default 1)