open5gs/src/amf/metrics.h

76 lines
2.3 KiB
C
Raw Permalink Normal View History

2022-06-08 08:54:46 +00:00
#ifndef AMF_METRICS_H
#define AMF_METRICS_H
#include "ogs-metrics.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef enum amf_metric_type_global_s {
AMF_METR_GLOB_GAUGE_RAN_UE,
AMF_METR_GLOB_GAUGE_AMF_SESS,
AMF_METR_GLOB_GAUGE_GNB,
[AMF] Expose more metrics [ETSI TS 128 552 V16.9.0](https://www.etsi.org/deliver/etsi_ts/128500_128599/128552/16.09.00_60/ts_128552v160900p.pdf) 5.2.2 Registration procedure related measurements SNSSAI labels are not provided. - Number of registration requests received by the AMF is exposed for each registration type. ``` fivegs_amffunction_rm_reginitreq 1 fivegs_amffunction_rm_regmobreq 0 fivegs_amffunction_rm_regperiodreq 0 fivegs_amffunction_rm_regemergreq 0 ``` - Number of successful initial registrations at the AMF is exposed for each registration type. ``` fivegs_amffunction_rm_reginitsucc 1 fivegs_amffunction_rm_regmobsucc 0 fivegs_amffunction_rm_regperiodsucc 0 fivegs_amffunction_rm_regemergsucc 0 ``` - The existing counter of failed registrations at the AMF is exposed separately for each registration type. ``` fivegs_amffunction_rm_reginitfail fivegs_amffunction_rm_regmobfail fivegs_amffunction_rm_regperiodfail fivegs_amffunction_rm_regemergfail ``` 5.2.5.2 Measurements for 5G paging Number of 5G paging procedures initiated at the AMF: ``` fivegs_amffunction_mm_paging5greq 1 ``` Number of successful 5G paging procedures initiated at the AMF: ``` fivegs_amffunction_mm_paging5gsucc 1 ``` 5.2.11 Authentication procedure related measurements Number of authentication requests: ``` fivegs_amffunction_amf_authreq 2 ``` Number of authentication rejections: ``` fivegs_amffunction_amf_authreject 1 ``` Number of failed authentications due to parameter error: ``` fivegs_amffunction_amf_authfail{cause="21"} 1 ``` 5.2.8 UE Configuration Update procedure related measurements Number of UE Configuration Update commands requested by the AMF: ``` fivegs_amffunction_mm_confupdate 2 ``` Number of UE Configuration Update complete messages received by the AMF: ``` fivegs_amffunction_mm_confupdatesucc 1 ```
2023-02-06 07:46:28 +00:00
AMF_METR_GLOB_CTR_RM_REG_INIT_REQ,
AMF_METR_GLOB_CTR_RM_REG_INIT_SUCC,
AMF_METR_GLOB_CTR_RM_REG_MOB_REQ,
AMF_METR_GLOB_CTR_RM_REG_MOB_SUCC,
AMF_METR_GLOB_CTR_RM_REG_PERIOD_REQ,
AMF_METR_GLOB_CTR_RM_REG_PERIOD_SUCC,
AMF_METR_GLOB_CTR_RM_REG_EMERG_REQ,
AMF_METR_GLOB_CTR_RM_REG_EMERG_SUCC,
AMF_METR_GLOB_CTR_MM_PAGING_5G_REQ,
AMF_METR_GLOB_CTR_MM_PAGING_5G_SUCC,
AMF_METR_GLOB_CTR_AMF_AUTH_REQ,
AMF_METR_GLOB_CTR_AMF_AUTH_REJECT,
AMF_METR_GLOB_CTR_MM_CONF_UPDATE,
AMF_METR_GLOB_CTR_MM_CONF_UPDATE_SUCC,
AMF_METR_GLOB_HIST_REG_TIME,
2022-06-08 08:54:46 +00:00
_AMF_METR_GLOB_MAX,
} amf_metric_type_global_t;
extern ogs_metrics_inst_t *amf_metrics_inst_global[_AMF_METR_GLOB_MAX];
2022-11-21 13:06:29 +00:00
int amf_metrics_init_inst_global(void);
int amf_metrics_free_inst_global(void);
2022-06-08 08:54:46 +00:00
static inline void amf_metrics_inst_global_set(amf_metric_type_global_t t, int val)
{ ogs_metrics_inst_set(amf_metrics_inst_global[t], val); }
2022-06-08 08:54:46 +00:00
static inline void amf_metrics_inst_global_add(amf_metric_type_global_t t, int val)
{ ogs_metrics_inst_add(amf_metrics_inst_global[t], val); }
2022-06-08 08:54:46 +00:00
static inline void amf_metrics_inst_global_inc(amf_metric_type_global_t t)
{ ogs_metrics_inst_inc(amf_metrics_inst_global[t]); }
2022-06-08 08:54:46 +00:00
static inline void amf_metrics_inst_global_dec(amf_metric_type_global_t t)
{ ogs_metrics_inst_dec(amf_metrics_inst_global[t]); }
2022-06-08 08:54:46 +00:00
/* BY SLICE */
typedef enum amf_metric_type_by_slice_s {
[AMF] Expose more metrics [ETSI TS 128 552 V16.9.0](https://www.etsi.org/deliver/etsi_ts/128500_128599/128552/16.09.00_60/ts_128552v160900p.pdf) 5.2.2 Registration procedure related measurements SNSSAI labels are not provided. - Number of registration requests received by the AMF is exposed for each registration type. ``` fivegs_amffunction_rm_reginitreq 1 fivegs_amffunction_rm_regmobreq 0 fivegs_amffunction_rm_regperiodreq 0 fivegs_amffunction_rm_regemergreq 0 ``` - Number of successful initial registrations at the AMF is exposed for each registration type. ``` fivegs_amffunction_rm_reginitsucc 1 fivegs_amffunction_rm_regmobsucc 0 fivegs_amffunction_rm_regperiodsucc 0 fivegs_amffunction_rm_regemergsucc 0 ``` - The existing counter of failed registrations at the AMF is exposed separately for each registration type. ``` fivegs_amffunction_rm_reginitfail fivegs_amffunction_rm_regmobfail fivegs_amffunction_rm_regperiodfail fivegs_amffunction_rm_regemergfail ``` 5.2.5.2 Measurements for 5G paging Number of 5G paging procedures initiated at the AMF: ``` fivegs_amffunction_mm_paging5greq 1 ``` Number of successful 5G paging procedures initiated at the AMF: ``` fivegs_amffunction_mm_paging5gsucc 1 ``` 5.2.11 Authentication procedure related measurements Number of authentication requests: ``` fivegs_amffunction_amf_authreq 2 ``` Number of authentication rejections: ``` fivegs_amffunction_amf_authreject 1 ``` Number of failed authentications due to parameter error: ``` fivegs_amffunction_amf_authfail{cause="21"} 1 ``` 5.2.8 UE Configuration Update procedure related measurements Number of UE Configuration Update commands requested by the AMF: ``` fivegs_amffunction_mm_confupdate 2 ``` Number of UE Configuration Update complete messages received by the AMF: ``` fivegs_amffunction_mm_confupdatesucc 1 ```
2023-02-06 07:46:28 +00:00
AMF_METR_GAUGE_RM_REGISTERED_SUB_NBR = 0,
_AMF_METR_BY_SLICE_MAX,
} amf_metric_type_by_slice_t;
void amf_metrics_inst_by_slice_add(
ogs_plmn_id_t *plmn, ogs_s_nssai_t *snssai,
amf_metric_type_by_slice_t t, int val);
/* BY CAUSE */
typedef enum amf_metric_type_by_cause_s {
[AMF] Expose more metrics [ETSI TS 128 552 V16.9.0](https://www.etsi.org/deliver/etsi_ts/128500_128599/128552/16.09.00_60/ts_128552v160900p.pdf) 5.2.2 Registration procedure related measurements SNSSAI labels are not provided. - Number of registration requests received by the AMF is exposed for each registration type. ``` fivegs_amffunction_rm_reginitreq 1 fivegs_amffunction_rm_regmobreq 0 fivegs_amffunction_rm_regperiodreq 0 fivegs_amffunction_rm_regemergreq 0 ``` - Number of successful initial registrations at the AMF is exposed for each registration type. ``` fivegs_amffunction_rm_reginitsucc 1 fivegs_amffunction_rm_regmobsucc 0 fivegs_amffunction_rm_regperiodsucc 0 fivegs_amffunction_rm_regemergsucc 0 ``` - The existing counter of failed registrations at the AMF is exposed separately for each registration type. ``` fivegs_amffunction_rm_reginitfail fivegs_amffunction_rm_regmobfail fivegs_amffunction_rm_regperiodfail fivegs_amffunction_rm_regemergfail ``` 5.2.5.2 Measurements for 5G paging Number of 5G paging procedures initiated at the AMF: ``` fivegs_amffunction_mm_paging5greq 1 ``` Number of successful 5G paging procedures initiated at the AMF: ``` fivegs_amffunction_mm_paging5gsucc 1 ``` 5.2.11 Authentication procedure related measurements Number of authentication requests: ``` fivegs_amffunction_amf_authreq 2 ``` Number of authentication rejections: ``` fivegs_amffunction_amf_authreject 1 ``` Number of failed authentications due to parameter error: ``` fivegs_amffunction_amf_authfail{cause="21"} 1 ``` 5.2.8 UE Configuration Update procedure related measurements Number of UE Configuration Update commands requested by the AMF: ``` fivegs_amffunction_mm_confupdate 2 ``` Number of UE Configuration Update complete messages received by the AMF: ``` fivegs_amffunction_mm_confupdatesucc 1 ```
2023-02-06 07:46:28 +00:00
AMF_METR_CTR_RM_REG_INIT_FAIL = 0,
AMF_METR_CTR_RM_REG_MOB_FAIL,
AMF_METR_CTR_RM_REG_PERIOD_FAIL,
AMF_METR_CTR_RM_REG_EMERG_FAIL,
AMF_METR_CTR_AMF_AUTH_FAIL,
_AMF_METR_BY_CAUSE_MAX,
} amf_metric_type_by_cause_t;
void amf_metrics_inst_by_cause_add(
uint8_t cause, amf_metric_type_by_cause_t t, int val);
void amf_metrics_init(void);
void amf_metrics_final(void);
2022-06-08 08:54:46 +00:00
#ifdef __cplusplus
}
#endif
#endif /* AMF_METRICS_H */