1
0
mirror of https://github.com/coturn/coturn.git synced 2025-10-23 20:11:17 +02:00

tidy after PR #517

This commit is contained in:
Mészáros Mihály 2020-07-07 20:29:49 +02:00
parent 063def2c0a
commit 2acb952670
7 changed files with 19 additions and 10 deletions

View File

@ -1,7 +1,8 @@
24/06/2020 Oleg Moskalenko <mom040267@gmail.com> Mihály Mészáros <misi@majd.eu> 24/06/2020 Oleg Moskalenko <mom040267@gmail.com> Mihály Mészáros <misi@majd.eu>
Version 4.5.2 'dan Eider': Version 4.5.2 'dan Eider':
- Fix null pointer dereference in case of out of memory. (thanks to Thomas Moeller for the report) - fix null pointer dereference in case of out of memory. (thanks to Thomas Moeller for the report)
- merge PR #517 (by wolmi)
* add prometheus metrics
24/06/2020 Oleg Moskalenko <mom040267@gmail.com> Mihály Mészáros <misi@majd.eu> 24/06/2020 Oleg Moskalenko <mom040267@gmail.com> Mihály Mészáros <misi@majd.eu>
Version 4.5.1.3 'dan Eider': Version 4.5.1.3 'dan Eider':
- merge PR #575: (by osterik) - merge PR #575: (by osterik)

View File

@ -267,7 +267,7 @@ Flags:
initially used by the session). initially used by the session).
--no-prometheus Disable prometheus metrics. By default it is --no-prometheus Disable prometheus metrics. By default it is
enabled and listening on port 9121 unther the path /metrics enabled and listening on port 9121 unther the path /metrics
also the path / on this port can be used as a health check also the path / on this port can be used as a health check
-h Help. -h Help.

4
configure vendored
View File

@ -1078,7 +1078,7 @@ if [ -z "${TURN_NO_PROMETHEUS}" ] ; then
else else
${ECHO_CMD} "ERROR: Libpromhttp development libraries are not installed properly in required location." ${ECHO_CMD} "ERROR: Libpromhttp development libraries are not installed properly in required location."
${ECHO_CMD} "Prometheus support will be disabled." ${ECHO_CMD} "Prometheus support will be disabled."
${ECHO_CMD} "See the INSTALL file." ${ECHO_CMD} "See the INSTALL file."
OSCFLAGS="${OSCFLAGS} -DTURN_NO_PROMETHEUS" OSCFLAGS="${OSCFLAGS} -DTURN_NO_PROMETHEUS"
fi fi
else else
@ -1087,7 +1087,7 @@ if [ -z "${TURN_NO_PROMETHEUS}" ] ; then
${ECHO_CMD} "See the INSTALL file." ${ECHO_CMD} "See the INSTALL file."
OSCFLAGS="${OSCFLAGS} -DTURN_NO_PROMETHEUS" OSCFLAGS="${OSCFLAGS} -DTURN_NO_PROMETHEUS"
fi fi
else else
OSCFLAGS="${OSCFLAGS} -DTURN_NO_PROMETHEUS" OSCFLAGS="${OSCFLAGS} -DTURN_NO_PROMETHEUS"
fi fi

View File

@ -1,5 +1,5 @@
.\" Text automatically generated by txt2man .\" Text automatically generated by txt2man
.TH TURN 1 "29 April 2020" "" "" .TH TURN 1 "08 July 2020" "" ""
.SH GENERAL INFORMATION .SH GENERAL INFORMATION
\fIturnadmin\fP is a TURN administration tool. This tool can be used to manage \fIturnadmin\fP is a TURN administration tool. This tool can be used to manage

View File

@ -1,5 +1,5 @@
.\" Text automatically generated by txt2man .\" Text automatically generated by txt2man
.TH TURN 1 "29 April 2020" "" "" .TH TURN 1 "08 July 2020" "" ""
.SH GENERAL INFORMATION .SH GENERAL INFORMATION
The \fBTURN Server\fP project contains the source code of a TURN server and TURN client The \fBTURN Server\fP project contains the source code of a TURN server and TURN client
@ -396,6 +396,14 @@ The flag that sets the origin consistency
check: across the session, all requests must have the same check: across the session, all requests must have the same
main ORIGIN attribute value (if the ORIGIN was main ORIGIN attribute value (if the ORIGIN was
initially used by the session). initially used by the session).
.RS
.TP
.B
\fB\-\-no\-prometheus\fP
Disable prometheus metrics. By default it is
enabled and listening on port 9121 unther the path /metrics
also the path / on this port can be used as a health check
.RE
.TP .TP
.B .B
\fB\-h\fP \fB\-h\fP

View File

@ -1,5 +1,5 @@
.\" Text automatically generated by txt2man .\" Text automatically generated by txt2man
.TH TURN 1 "29 April 2020" "" "" .TH TURN 1 "08 July 2020" "" ""
.SH GENERAL INFORMATION .SH GENERAL INFORMATION
A set of turnutils_* programs provides some utility functionality to be used A set of turnutils_* programs provides some utility functionality to be used

View File

@ -36,7 +36,7 @@ int start_prometheus_server(void){
turn_total_traffic_peer_sentb = prom_collector_registry_must_register_metric(prom_counter_new("turn_total_traffic_peer_sentb", "Represents total peer sent bytes", 3, (const char *[]) {"realm", "user", "allocation" })); turn_total_traffic_peer_sentb = prom_collector_registry_must_register_metric(prom_counter_new("turn_total_traffic_peer_sentb", "Represents total peer sent bytes", 3, (const char *[]) {"realm", "user", "allocation" }));
promhttp_set_active_collector_registry(NULL); promhttp_set_active_collector_registry(NULL);
struct MHD_Daemon *daemon = promhttp_start_daemon(MHD_USE_SELECT_INTERNALLY, DEFAULT_PROM_SERVER_PORT, NULL, NULL); struct MHD_Daemon *daemon = promhttp_start_daemon(MHD_USE_SELECT_INTERNALLY, DEFAULT_PROM_SERVER_PORT, NULL, NULL);
if (daemon == NULL) { if (daemon == NULL) {
@ -49,7 +49,7 @@ void prom_set_status(const char* realm, const char* user, unsigned long long all
if (turn_params.prometheus == 1){ if (turn_params.prometheus == 1){
char allocation_chars[1024]; char allocation_chars[1024];
char lifetime_chars[1024]; char lifetime_chars[1024];
snprintf(allocation_chars, sizeof(allocation_chars), "%018llu", allocation); snprintf(allocation_chars, sizeof(allocation_chars), "%018llu", allocation);
snprintf(lifetime_chars, sizeof(lifetime_chars), "%lu", lifetime); snprintf(lifetime_chars, sizeof(lifetime_chars), "%lu", lifetime);