1 #ifndef NETDATA_CONFIG_H
2 #define NETDATA_CONFIG_H 1
4 #define CONFIG_FILENAME "netdata.conf"
6 // these are used to limit the configuration names and values lengths
7 // they are not enforced by config.c functions (they will strdup() all strings, no matter of their length)
8 #define CONFIG_MAX_NAME 1024
9 #define CONFIG_MAX_VALUE 2048
11 extern int load_config(char *filename, int overwrite_used);
13 extern char *config_get(const char *section, const char *name, const char *default_value);
14 extern long long config_get_number(const char *section, const char *name, long long value);
15 extern int config_get_boolean(const char *section, const char *name, int value);
17 #define CONFIG_ONDEMAND_NO 0
18 #define CONFIG_ONDEMAND_YES 1
19 #define CONFIG_ONDEMAND_ONDEMAND 2
20 extern int config_get_boolean_ondemand(const char *section, const char *name, int value);
22 extern const char *config_set(const char *section, const char *name, const char *value);
23 extern const char *config_set_default(const char *section, const char *name, const char *value);
24 extern long long config_set_number(const char *section, const char *name, long long value);
25 extern int config_set_boolean(const char *section, const char *name, int value);
27 extern int config_exists(const char *section, const char *name);
28 extern int config_rename(const char *section, const char *old, const char *new);
30 extern void generate_config(BUFFER *wb, int only_changed);
32 #endif /* NETDATA_CONFIG_H */