Skip to content

Commit

Permalink
more performance data to keep the Grafana folks happy
Browse files Browse the repository at this point in the history
  • Loading branch information
willamowius committed Oct 7, 2022
1 parent f0db515 commit fa86d5d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Toolkit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3911,6 +3911,12 @@ PString Toolkit::ReplaceGlobalParams(const PString & str)
result.Replace("%{gkip}", interfaces.front().AsString(), true);
result.Replace("%{external-ip}", GetExternalIP(), true);

result.Replace("%{registrations}", RegistrationTable::Instance()->Size(), true);
result.Replace("%{calls}", CallTable::Instance()->Size(), true);
result.Replace("%{allocated-bandwidth}", CallTable::Instance()->GetTotalAllocatedBandwidth(), true);
result.Replace("%{total-calls}", CallTable::Instance()->TotalCallCount(), true);
result.Replace("%{successful-calls}", CallTable::Instance()->SuccessfulCallCount(), true);

result.Replace("%{env1}", ::getenv("GNUGK_ENV1"), true);
result.Replace("%{env2}", ::getenv("GNUGK_ENV2"), true);
result.Replace("%{env3}", ::getenv("GNUGK_ENV3"), true);
Expand Down
1 change: 1 addition & 0 deletions changes.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Changes from 5.10 to 5.11
=========================
- new account variables %{registrations}, %{calls}, %{total-calls}, %{successful-calls}, %{allocated-bandwidth}
- new switch [HttpAcct] Authorization= to send authorization headers to support InfluxDB (GnuGk needs to be compiled with libcurl)
- replace \r and \n in HttpAcct body with carriage return and line feed characters
- BUGFIX(Toolkit.cxx) fix tracing of port notifications
Expand Down
10 changes: 10 additions & 0 deletions docs/manual/acct.sgml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,11 @@ parameters are recognized in all call related accounting events:
<item><tt/%{env9}/ - content of environment variable GNUGK_ENV9
<item><tt/%{media-oip}/ - caller's RTP media IP (only for H.245 routed/tunneled calls) DEPRECATED
<item><tt/%{codec}/ - audio codec used during the call (only for H.245 routed/tunneled calls) DEPRECATED
<item><tt/%{registrations}/ - number of endpoints currently registered
<item><tt/%{calls}/ - number of ongoing calls
<item><tt/%{total-calls}/ - total number of calls
<item><tt/%{successful-calls}/ - total number of successful calls
<item><tt/%{allocated-bandwidth}/ - currently allocated-bandwidth for all calls together
</itemize>

For Register and Unregister events you can use the following parameters:
Expand All @@ -280,6 +285,11 @@ For Register and Unregister events you can use the following parameters:
<item><tt/%{env1}/ - content of environment variable GNUGK_ENV1
<item><tt/.../
<item><tt/%{env9}/ - content of environment variable GNUGK_ENV9
<item><tt/%{registrations}/ - number of endpoints currently registered
<item><tt/%{calls}/ - number of ongoing calls
<item><tt/%{total-calls}/ - total number of calls
<item><tt/%{successful-calls}/ - total number of successful calls
<item><tt/%{allocated-bandwidth}/ - currently allocated-bandwidth for all calls together
</itemize>

For On and Off events you can use the following parameters:
Expand Down

0 comments on commit fa86d5d

Please sign in to comment.