add DLCX command statistics to osmo-mgw
Add a counter group for DLCX commands. The group contains counters for
successful connection processing as well as various error conditions.
This provides a quick overview of DLCX failures on each trunk throughout
the lifetime of the osmo-mgw process.
The counters are displayed by 'show mgcp stats' and 'show rate-counters'
While here, rename MGCP_MDCX_FAIL_DEFERRED_BY_POLICY to
MGCP_MDCX_DEFERRED_BY_POLICY; we have decided that deferred connections
aren't failures, and this keeps names used by DLCX and MDCX in sync.
Also remove some allocation failure checks with OSMO_ASSERT(); such
checks aren't en vogue anymore.
Change-Id: Ie0dde2faf02fd68a69f986973d39b1bea367039b
Depends: I80d36181600901ae2e0f321dc02b5d54ddc94139I
Related: OS#2660
diff --git a/include/osmocom/mgcp/mgcp.h b/include/osmocom/mgcp/mgcp.h
index aa5607f..034a780 100644
--- a/include/osmocom/mgcp/mgcp.h
+++ b/include/osmocom/mgcp/mgcp.h
@@ -152,9 +152,20 @@
MGCP_MDCX_FAIL_NO_REMOTE_CONN_DESC,
MGCP_MDCX_FAIL_START_RTP,
MGCP_MDCX_FAIL_REJECTED_BY_POLICY,
- MGCP_MDCX_FAIL_DEFERRED_BY_POLICY
+ MGCP_MDCX_DEFERRED_BY_POLICY
};
+/* Global MCGP DLCX related rate counters */
+enum {
+ MGCP_DLCX_SUCCESS,
+ MGCP_DLCX_FAIL_WILDCARD,
+ MGCP_DLCX_FAIL_NO_CONN,
+ MGCP_DLCX_FAIL_INVALID_CALLID,
+ MGCP_DLCX_FAIL_INVALID_CONNID,
+ MGCP_DLCX_FAIL_UNHANDLED_PARAM,
+ MGCP_DLCX_FAIL_REJECTED_BY_POLICY,
+ MGCP_DLCX_DEFERRED_BY_POLICY,
+};
struct mgcp_trunk_config {
struct llist_head entry;
@@ -198,6 +209,8 @@
struct rate_ctr_group *mgcp_crcx_ctr_group;
/* Rate counter group which contains stats for processed MDCX commands. */
struct rate_ctr_group *mgcp_mdcx_ctr_group;
+ /* Rate counter group which contains stats for processed DLCX commands. */
+ struct rate_ctr_group *mgcp_dlcx_ctr_group;
/* Rate counter group which aggregates stats of individual RTP connections. */
struct rate_ctr_group *all_rtp_conn_stats;
};