]> arthur.barton.de Git - netdata.git/blob - src/config.h
79c22388e0c787beb9f0ed7df57c2c9e1eecd0ef
[netdata.git] / src / config.h
1 #include "web_buffer.h"
2
3 #ifndef NETDATA_CONFIG_H
4 #define NETDATA_CONFIG_H 1
5
6 #define CONFIG_FILENAME "netdata.conf"
7
8 // these are used to limit the configuration names and values lengths
9 // they are not enforced by config.c functions (they will strdup() all strings, no matter of their length)
10 #define CONFIG_MAX_NAME 1024
11 #define CONFIG_MAX_VALUE 2048
12
13 extern int load_config(char *filename, int overwrite_used);
14
15 extern char *config_get(const char *section, const char *name, const char *default_value);
16 extern long long config_get_number(const char *section, const char *name, long long value);
17 extern int config_get_boolean(const char *section, const char *name, int value);
18
19 extern const char *config_set(const char *section, const char *name, const char *value);
20 extern long long config_set_number(const char *section, const char *name, long long value);
21 extern int config_set_boolean(const char *section, const char *name, int value);
22
23 extern void generate_config(struct web_buffer *wb, int only_changed);
24
25 #endif /* NETDATA_CONFIG_H */