yanic.conf.tmpl 5.2 KB

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