1
0
Fork 0
mirror of https://github.com/pavel-odintsov/fastnetmon synced 2024-06-08 16:46:06 +02:00

Added conf option to control how often we export traffic to Graphite

This commit is contained in:
Pavel Odintsov 2022-04-02 01:39:06 +01:00
parent 419f23200b
commit 79ed5e3548
2 changed files with 7 additions and 0 deletions

View File

@ -261,6 +261,9 @@ graphite_port = 2003
# Default namespace for Graphite data
graphite_prefix = fastnetmon
# How often we export metrics to Graphite
graphite_push_period = 1
# Before using InfluxDB you need to create database using influx tool:
# create database fastnetmon

View File

@ -843,6 +843,10 @@ bool load_configuration_file() {
graphite_port = convert_string_to_integer(configuration_map["graphite_port"]);
}
if (configuration_map.count("graphite_push_period") != 0) {
graphite_push_period = convert_string_to_integer(configuration_map["graphite_push_period"]);
}
// InfluxDB
if (configuration_map.count("influxdb") != 0) {
influxdb_enabled = configuration_map["influxdb"] == "on" ? true : false;