yanic.conf.tmpl 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. # This is the config file for Yanic written in "Tom's Obvious, Minimal Language."
  2. # syntax: https://github.com/toml-lang/toml
  3. # (if you need somethink multiple times, checkout out the [[table]] section)
  4. # Send respondd request to update information
  5. [respondd]
  6. enable = true
  7. # Delay startup until a multiple of the period since zero time
  8. synchronize = "1m"
  9. # how often request per multicast
  10. collect_interval = "1m"
  11. # interface that has an IP in your mesh network
  12. interfaces = ["{{iface}}"]
  13. # list of sites to save stats for (empty for global only)
  14. sites = []
  15. # define a port to listen
  16. # if not set or set to 0 the kernel will use a random free port at its own
  17. #port = 10001
  18. # A little build-in webserver, which statically serves a directory.
  19. # This is useful for testing purposes or for a little standalone installation.
  20. [webserver]
  21. enable = {{webserver}}
  22. bind = "[{{bind_ip}}]:8080"
  23. webroot = "/srv/yanic/data"
  24. [nodes]
  25. enable = true
  26. # Cache file
  27. # a json file to cache all data collected directly from respondd
  28. state_path = "/srv/yanic/{{site}}.state"
  29. # prune data in RAM, cache-file and output json files (i.e. nodes.json)
  30. # that were inactive for longer than
  31. prune_after = "30d"
  32. # Export nodes and graph periodically
  33. save_interval = "1m"
  34. # Set node to offline if not seen within this period
  35. offline_after = "10m"
  36. ## [[nodes.output.example]]
  37. # Each output format has its own config block and needs to be enabled by adding:
  38. #enable = true
  39. #
  40. # For each output format there can be set different filters
  41. #[nodes.output.example.filter]
  42. #
  43. # Set to false, if you want the json files to contain the owner information
  44. #no_owner = true
  45. #
  46. # List of nodeids of nodes that should be filtered out, so they won't appear in output
  47. #blacklist = ["00112233445566", "1337f0badead"]
  48. #
  49. # set has_location to true if you want to include only nodes that have geo-coordinates set
  50. # (setting this to false has no sensible effect, unless you'd want to hide nodes that have coordinates)
  51. #has_location = true
  52. #[nodes.output.example.filter.in_area]
  53. # nodes outside this area are not shown on the map but are still listed as a node without coordinates
  54. #latitude_min = 34.30
  55. #latitude_max = 71.85
  56. #longitude_min = -24.96
  57. #longitude_max = 39.72
  58. # definition for the new more compressed meshviewer.json
  59. [[nodes.output.meshviewer-ffrgb]]
  60. enable = true
  61. path = "/srv/yanic/data/{{site}}/meshviewer.json"
  62. [nodes.output.meshviewer-ffrgb.filter]
  63. no_owner = true
  64. #blacklist = ["00112233445566", "1337f0badead"]
  65. #has_location = true
  66. #[nodes.output.meshviewer-ffrgb.filter.in_area]
  67. #latitude_min = 34.30
  68. #latitude_max = 71.85
  69. #longitude_min = -24.96
  70. #longitude_max = 39.72
  71. # definition for nodes.json
  72. [[nodes.output.meshviewer]]
  73. enable = true
  74. # The structure version of the output which should be generated (i.e. nodes.json)
  75. # version 1 is accepted by the legacy meshviewer (which is the master branch)
  76. # i.e. https://github.com/ffnord/meshviewer/tree/master
  77. # version 2 is accepted by the new versions of meshviewer (which are in the legacy develop branch or newer)
  78. # i.e. https://github.com/ffnord/meshviewer/tree/dev
  79. # https://github.com/ffrgb/meshviewer/tree/develop
  80. version = 2
  81. # path where to store nodes.json
  82. nodes_path = "/srv/yanic/data/{{site}}/nodes.json"
  83. # path where to store graph.json
  84. graph_path = "/srv/yanic/data/{{site}}/graph.json"
  85. [nodes.output.meshviewer.filter]
  86. no_owner = true
  87. # definition for nodelist.json
  88. [[nodes.output.nodelist]]
  89. enable = true
  90. path = "/srv/yanic/data/{{site}}/nodelist.json"
  91. [nodes.output.nodelist.filter]
  92. no_owner = true
  93. [database]
  94. # this will send delete commands to the database to prune data
  95. # which is older than:
  96. delete_after = "30d"
  97. # how often run the cleaning
  98. delete_interval = "1d"
  99. ## [[database.connection.example]]
  100. # Each database-connection has its own config block and needs to be enabled by adding:
  101. #enable = true
  102. # Save collected data to InfluxDB.
  103. # There are the following measurments:
  104. # node: store node specific data i.e. clients memory, airtime
  105. # global: store global data, i.e. count of clients and nodes
  106. # firmware: store the count of nodes tagged with firmware
  107. # model: store the count of nodes tagged with hardware model
  108. [[database.connection.influxdb]]
  109. enable = true
  110. address = "{{influxdb.address}}"
  111. database = "{{influxdb.database}}"
  112. username = "{{influxdb.username}}"
  113. password = "{{influxdb.password}}"
  114. # Tagging of the data (optional)
  115. [database.connection.influxdb.tags]
  116. # Tags used by Yanic would override the tags from this config
  117. # nodeid, hostname, owner, model and firmware are tags which are already used
  118. #tagname1 = "tagvalue 1"
  119. # some usefull e.g.:
  120. #system = "productive"
  121. #site = "ffhb"
  122. job = "{{site}}"
  123. # Logging
  124. [[database.connection.logging]]
  125. enable = false
  126. path = "/var/log/yanic.log"
  127. # Graphite settings
  128. [[database.connection.graphite]]
  129. enable = false
  130. address = "localhost:2003"
  131. # Graphite is replacing every "." in the metric name with a slash "/" and uses
  132. # that for the file system hierarchy it generates. it is recommended to at least
  133. # move the metrics out of the root namespace (that would be the empty prefix).
  134. # If you only intend to run one community and only freifunk on your graphite node
  135. # then the prefix can be set to anything (including the empty string) since you
  136. # probably wont care much about "polluting" the namespace.
  137. prefix = "freifunk"