#include "common.h"
#include "plugin.h"
#include "configfile.h"
+#include "utils_threshold.h"
#define ESCAPE_NULL(str) ((str) == NULL ? "(null)" : (str))
static cf_global_option_t cf_global_options[] =
{
- {"BaseDir", NULL, PKGLOCALSTATEDIR},
- {"PIDFile", NULL, PIDFILE},
- {"Hostname", NULL, NULL},
- {"Interval", NULL, "10"},
+ {"BaseDir", NULL, PKGLOCALSTATEDIR},
+ {"PIDFile", NULL, PIDFILE},
+ {"Hostname", NULL, NULL},
+ {"FQDNLookup", NULL, "false"},
+ {"Interval", NULL, "10"},
{"ReadThreads", NULL, "5"},
- {"TypesDB", NULL, PLUGINDIR"/types.db"} /* FIXME: Configure path */
+ {"TypesDB", NULL, PLUGINDIR"/types.db"} /* FIXME: Configure path */
};
static int cf_global_options_num = STATIC_ARRAY_LEN (cf_global_options);
tmp[127] = '\0';
return (global_option_set (ci->key, tmp));
}
+ else if (ci->values[0].type == OCONFIG_TYPE_BOOLEAN)
+ {
+ if (ci->values[0].value.boolean)
+ return (global_option_set (ci->key, "true"));
+ else
+ return (global_option_set (ci->key, "false"));
+ }
return (-1);
} /* int dispatch_global_option */
{
if (strcasecmp (ci->key, "Plugin") == 0)
return (dispatch_block_plugin (ci));
+ else if (strcasecmp (ci->key, "Threshold") == 0)
+ return (ut_config (ci));
return (0);
}