4 Maintenance Procedures
This section provides details about the OSO maintenance procedures.
4.2 Managing 5G NFs
This section describes procedures to manage 5G NFs in CNE OSO.
4.2.1 Updating Alert Rules for an NF
This section describes the procedure to add or update the alerting rules for any Cloud Native Core (CNC) 5G Network Functions (NF) in OSO Prometheus GUI.
Prerequisites
- All NFs are required to create a separate
Alert-rules
. - For OSO Prometheus: A valid OSO release must be installed and an alert file describing all NF alert rules according to old format is required.
Add or Update Alert Rules
Perform the following steps to add alert rules in OSO Prometheus GUI:
- Take the backup of current configuration map of OSO
Prometheus.
$ kubectl get configmaps <OSO-prometheus-configmap-name> -o yaml -n <namespace> /tmp/tempPrometheusConfig.yaml
Where,<OSO-prometheus-configmap-name>
is the name of the OSO Prometheus configuration map.<namespace>
is the OSO namespace.
- Check and add the NF Alert file name inside the Prometheus configuration
map.
<nf-alertsname>
varies from NF to NF, and can be retrieved from each individual NF alert rules file.For example, in the following screenshot, "alertscndbtier" is thenf-alertsname
for cnDBTier.Figure 4-1 OSO Alert file
After retrieving thenf-alertsname
run the following steps:$ sed -i '/etc\/config\/<nf-alertsname>/d' /tmp/tempPrometheusConfig.yaml $ sed -i '/rule_files:/a\ \- /etc/config/<nf-alertsname>' /tmp/tempPrometheusConfig.yaml
- Update the configuration map with the updated
file.
$ kubectl -n <namespace> replace configmap <OSO-prometheus-configmap-name> -f /tmp/tempPrometheusConfig.yaml
- Patch the NF alert rules in OSO Prometheus configuration map by mentioning the
Alert-rule file
path.
$ kubectl patch configmap <OSO-prometheus-configmap-name> -n <namespace> --type merge --patch "$(cat ./NF_altertrules.yaml)"