diff --git a/host_vars/grafana.regensburg.freifunk.net b/host_vars/grafana.regensburg.freifunk.net new file mode 100644 index 0000000..534a1e4 --- /dev/null +++ b/host_vars/grafana.regensburg.freifunk.net @@ -0,0 +1,25 @@ +--- + +# yanic needs this +site_code: ffrgb_cty + +yanic_repondd_enable: false + +yanic_respondd_interface: ens18 +yanic_respondd_ip: true + +yanic_nodes_prune_after: 60d +yanic_nodes_offline_after: 5m + +yanic_meshviewer_enable: false + +yanic_nodelist_enable: true + +yanic_database_delete_after: 720d + +yanic_influxdb: +- enable: true + host: http://127.0.0.1:8086 + database: ffrgb + username: "" + password: "" diff --git a/roles/yanic/defaults/main.yml b/roles/yanic/defaults/main.yml index 76f71e8..95a823c 100644 --- a/roles/yanic/defaults/main.yml +++ b/roles/yanic/defaults/main.yml @@ -3,10 +3,13 @@ yanic_source: github.com/ffrgb/yanic yanic_publisher: false -yanic_respondd: true + +yanic_respondd_enable: true yanic_respondd_collect_interval: 1m yanic_respondd_synchronize_interval: 1m + yanic_respondd_interface: br-{{ site_code }} +yanic_respondd_ip: false yanic_webserver: false yanic_webserver_bind: "127.0.0.1:8080" @@ -14,9 +17,9 @@ yanic_webserver_webroot: "/var/www/html/meshviewer" yanic_nodes: true yanic_nodes_state_path: "/var/lib/yanic/yanic.json" +yanic_nodes_prune_after: 7d yanic_nodes_save_interval: 5s yanic_nodes_offline_after: 10m -yanic_nodes_prune_after: 7d yanic_meshviewer_ffrgb_enable: true yanic_meshviewer_ffrgb_path: "/var/www/html/meshviewer/data/meshviewer.json" @@ -27,19 +30,22 @@ yanic_meshviewer_path: "/var/www/html/meshviewer/data" yanic_meshviewer_nodes: "{{ yanic_meshviewer_path }}/nodes.json" yanic_meshviewer_graph: "{{ yanic_meshviewer_path }}/graph.json" +yanic_nodelist_enable: false + yanic_database_delete_after: 7d yanic_database_delete_interval: 1h -yanic_repondd_enable: true -yanic_repondd_remotehost: "[2a01:4f8:140:515d::2]:10001" - yanic_influxdb: - enable: false - host: http://88.99.2.28:8086 + host: http://127.0.0.1:8086 database: ffrgb username: "" password: "" + yanic_graphite: - enable: false address: "localhost:2003" prefix: "freifunk" + +yanic_dbc_repondd_enable: true +yanic_dbc_repondd_remotehost: "grafana.regensburg.freifunk.net:10001" diff --git a/roles/yanic/templates/config.toml.j2 b/roles/yanic/templates/config.toml.j2 index 65127cd..a0f1f6d 100644 --- a/roles/yanic/templates/config.toml.j2 +++ b/roles/yanic/templates/config.toml.j2 @@ -1,6 +1,6 @@ # {{ ansible_managed }} [respondd] -enable = {{ yanic_respondd | ternary('true','false') }} +enable = {{ yanic_respondd_enable | ternary('true','false') }} collect_interval = "{{ yanic_respondd_collect_interval }}" synchronize = "{{ yanic_respondd_synchronize_interval }}" @@ -9,6 +9,11 @@ domains = ["{{ site_code }}"] [[respondd.interfaces]] ifname = "{{ yanic_respondd_interface }}" +{% if yanic_respondd_ip == true %} +ip_address = "{{ ansible_default_ipv6.address }}" +send_no_request = true +port = 10001 +{% endif %} [webserver] enable = {{ yanic_webserver | ternary('true','false') }} @@ -47,7 +52,7 @@ graph_path = "{{ yanic_meshviewer_graph }}" no_owner = true [[nodes.output.nodelist]] -enable = false +enable = {{ yanic_nodelist_enable | ternary('true','false') }} path = "/var/www/html/meshviewer/data/nodelist.json" [nodes.output.nodelist.filter] @@ -76,9 +81,9 @@ prefix = "{{ db.prefix }}" {% endfor %} [[database.connection.respondd]] -enable = {{ yanic_repondd_enable | ternary('true','false') }} +enable = {{ yanic_dbc_repondd_enable | ternary('true','false') }} type = "udp6" -address = "{{ yanic_repondd_remotehost }}" +address = "{{ yanic_dbc_repondd_remotehost }}" [[database.connection.logging]] enable = false diff --git a/site.yml b/site.yml index 90a149f..0ebae1c 100644 --- a/site.yml +++ b/site.yml @@ -36,6 +36,7 @@ roles: - influxdb - grafana + - yanic - name: Setup name servers hosts: ns1.regensburg.freifunk.net