engine: start HTTP server if available and enabled
#include <fluent-bit/flb_scheduler.h>
#include <fluent-bit/flb_parser.h>
#include <fluent-bit/flb_sosreport.h>
+#include <fluent-bit/http_server/flb_hs.h>
#ifdef FLB_HAVE_METRICS
#include <fluent-bit/flb_metrics_exporter.h>
@@ -474,6 +475,14 @@ int flb_engine_start(struct flb_config *config)
config->metrics = flb_me_create(config);
#endif
+ /* Initialize HTTP Server */
+#ifdef FLB_HAVE_HTTP_SERVER
+ if (config->http_server == FLB_TRUE) {
+ config->http_ctx = flb_hs_create(config->http_port);
+ flb_hs_start(config->http_ctx);
+ }
+#endif
+
/* Signal that we have started */
flb_engine_started(config);
