Mészáros Mihály vor 5 Jahren
Ursprung
Commit
2acb952670
7 geänderte Dateien mit 19 neuen und 10 gelöschten Zeilen
  1. 3 2
      ChangeLog
  2. 1 1
      README.turnserver
  3. 2 2
      configure
  4. 1 1
      man/man1/turnadmin.1
  5. 9 1
      man/man1/turnserver.1
  6. 1 1
      man/man1/turnutils.1
  7. 2 2
      src/apps/relay/prom_server.c

+ 3 - 2
ChangeLog

@@ -1,7 +1,8 @@
 24/06/2020 Oleg Moskalenko <[email protected]> Mihály Mészáros <[email protected]>
 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 <[email protected]> Mihály Mészáros <[email protected]>
 Version 4.5.1.3 'dan Eider':
 	- merge PR #575: (by osterik)

+ 1 - 1
README.turnserver

@@ -267,7 +267,7 @@ Flags:
 			initially used by the session).
  --no-prometheus	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
+			also the path / on this port can be used as a health check
 
 -h			Help.
 

+ 2 - 2
configure

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

+ 1 - 1
man/man1/turnadmin.1

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

+ 9 - 1
man/man1/turnserver.1

@@ -1,5 +1,5 @@
 .\" Text automatically generated by txt2man
-.TH TURN 1 "29 April 2020" "" ""
+.TH TURN 1 "08 July 2020" "" ""
 .SH GENERAL INFORMATION
 
 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
 main ORIGIN attribute value (if the ORIGIN was
 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
 .B
 \fB\-h\fP

+ 1 - 1
man/man1/turnutils.1

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

+ 2 - 2
src/apps/relay/prom_server.c

@@ -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" }));
 
   promhttp_set_active_collector_registry(NULL);
-  
+
 
   struct MHD_Daemon *daemon = promhttp_start_daemon(MHD_USE_SELECT_INTERNALLY, DEFAULT_PROM_SERVER_PORT, NULL, 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){
     char allocation_chars[1024];
     char lifetime_chars[1024];
-    
+
     snprintf(allocation_chars, sizeof(allocation_chars), "%018llu", allocation);
     snprintf(lifetime_chars, sizeof(lifetime_chars), "%lu", lifetime);