Module: kamailio
Branch: master
Commit: 6e6b4f06546a0d9ad942847ee745b17a5aeb7f6a
URL:
https://github.com/kamailio/kamailio/commit/6e6b4f06546a0d9ad942847ee745b17…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-04-22T21:54:26+02:00
xhttp_prom: use %lu for printing pkg fields
---
Modified: src/modules/xhttp_prom/prom.c
---
Diff:
https://github.com/kamailio/kamailio/commit/6e6b4f06546a0d9ad942847ee745b17…
Patch:
https://github.com/kamailio/kamailio/commit/6e6b4f06546a0d9ad942847ee745b17…
---
diff --git a/src/modules/xhttp_prom/prom.c b/src/modules/xhttp_prom/prom.c
index efe111b752a..71accf21845 100644
--- a/src/modules/xhttp_prom/prom.c
+++ b/src/modules/xhttp_prom/prom.c
@@ -253,7 +253,7 @@ static int prom_metric_pkgmem_print(prom_ctx_t *ctx)
for(; i < pkg_proc_stats_no; i++) {
if(prom_body_printf(ctx,
"%.*spkgmem_used{pid=\"%u\", rank=\"%d\",
desc=\"%s\"} "
- "%d %" PRIu64 "\n",
+ "%lu %" PRIu64 "\n",
xhttp_prom_beginning.len, xhttp_prom_beginning.s,
pkg_proc_stats[i].pid, pkg_proc_stats[i].rank, pt[i].desc,
pkg_proc_stats[i].used, ts)
@@ -263,7 +263,7 @@ static int prom_metric_pkgmem_print(prom_ctx_t *ctx)
}
if(prom_body_printf(ctx,
"%.*spkgmem_available{pid=\"%u\", rank=\"%d\", "
- "desc=\"%s\"} %d %" PRIu64 "\n",
+ "desc=\"%s\"} %lu %" PRIu64 "\n",
xhttp_prom_beginning.len, xhttp_prom_beginning.s,
pkg_proc_stats[i].pid, pkg_proc_stats[i].rank, pt[i].desc,
pkg_proc_stats[i].available, ts)
@@ -273,7 +273,7 @@ static int prom_metric_pkgmem_print(prom_ctx_t *ctx)
}
if(prom_body_printf(ctx,
"%.*spkgmem_real_used{pid=\"%u\", rank=\"%d\", "
- "desc=\"%s\"} %d %" PRIu64 "\n",
+ "desc=\"%s\"} %lu %" PRIu64 "\n",
xhttp_prom_beginning.len, xhttp_prom_beginning.s,
pkg_proc_stats[i].pid, pkg_proc_stats[i].rank, pt[i].desc,
pkg_proc_stats[i].real_used, ts)
@@ -283,7 +283,7 @@ static int prom_metric_pkgmem_print(prom_ctx_t *ctx)
}
if(prom_body_printf(ctx,
"%.*spkgmem_total_frags{pid=\"%u\", rank=\"%d\", "
- "desc=\"%s\"} %d %" PRIu64 "\n",
+ "desc=\"%s\"} %lu %" PRIu64 "\n",
xhttp_prom_beginning.len, xhttp_prom_beginning.s,
pkg_proc_stats[i].pid, pkg_proc_stats[i].rank, pt[i].desc,
pkg_proc_stats[i].total_frags, ts)
@@ -293,7 +293,7 @@ static int prom_metric_pkgmem_print(prom_ctx_t *ctx)
}
if(prom_body_printf(ctx,
"%.*spkgmem_total_size{pid=\"%u\", rank=\"%d\" "
- "desc=\"%s\"} %d %" PRIu64 "\n",
+ "desc=\"%s\"} %lu %" PRIu64 "\n",
xhttp_prom_beginning.len, xhttp_prom_beginning.s,
pkg_proc_stats[i].pid, pkg_proc_stats[i].rank, pt[i].desc,
pkg_proc_stats[i].total_size, ts)