Skip to content

Commit e2f8332

Browse files
nokute78edsiper
authored andcommitted
http_server: add function to ingest health metrics
Signed-off-by: Takahiro Yamashita <[email protected]>
1 parent 46ea2bd commit e2f8332

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

include/fluent-bit/http_server/flb_hs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ struct flb_hs {
5555

5656
struct flb_hs *flb_hs_create(const char *listen, const char *tcp_port,
5757
struct flb_config *config);
58+
int flb_hs_push_health_metrics(struct flb_hs *hs, void *data, size_t size);
5859
int flb_hs_push_pipeline_metrics(struct flb_hs *hs, void *data, size_t size);
5960
int flb_hs_push_storage_metrics(struct flb_hs *hs, void *data, size_t size);
6061

src/http_server/flb_hs.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,15 @@ static void cb_root(mk_request_t *request, void *data)
3737
mk_http_done(request);
3838
}
3939

40+
/* Ingest health metrics into the web service context */
41+
int flb_hs_push_health_metrics(struct flb_hs *hs, void *data, size_t size)
42+
{
43+
return mk_mq_send(hs->ctx, hs->qid_health, data, size);
44+
}
45+
4046
/* Ingest pipeline metrics into the web service context */
4147
int flb_hs_push_pipeline_metrics(struct flb_hs *hs, void *data, size_t size)
4248
{
43-
mk_mq_send(hs->ctx, hs->qid_health, data, size);
4449
return mk_mq_send(hs->ctx, hs->qid_metrics, data, size);
4550
}
4651

0 commit comments

Comments
 (0)