-static int port = 5672;
-static char *host = NULL;
-static char *vhost = NULL;
-static char *user = NULL;
-static char *password = NULL;
-static char *exchange = NULL;
-static char *routingkey = NULL;
-static uint8_t delivery_mode = AMQP_DM_VOLATILE;
-static _Bool store_rates = 0;
+static const char *def_host = "localhost";
+static const char *def_vhost = "/";
+static const char *def_user = "guest";
+static const char *def_password = "guest";
+static const char *def_exchange = "amq.fanout";
+static const char *def_routingkey = "collectd";
+
+static char *conf_host = NULL;
+static char *conf_vhost = NULL;
+static char *conf_user = NULL;
+static char *conf_password = NULL;
+static char *conf_exchange = NULL;
+static char *conf_routingkey = NULL;
+static int conf_port = 5672;
+static uint8_t conf_delivery_mode = AMQP_DM_VOLATILE;
+static _Bool conf_store_rates = 0;
+
+#define CONF(f) ((conf_##f != NULL) ? conf_##f : def_##f)