5.5 NRF Alert Configuration
NRF Alert Configuration
Follow the steps below for NRF Alert configuration in Prometheus:
Note:
- The
Nameis the release name used in helm install command. - The
Namespaceis the namespace used in helm install command. By defaultNamespacefor NRF isocnrfthat must be update as per the deployment. - The
ocnrf-config-1.1.0.0.0.zipfile can be downloaded from OHC.Unzip the
ocnrf-config-1.1.0.0.0.zippackage after downloading to getNrfAlertrules.yamlfile.
- Take Backup of current
configuration map of Prometheus:
kubectl get configmaps _NAME_-server -o yaml -n _Namespace_ > /tmp/tempConfig.yaml - Check and Add NRF Alert
file name inside Prometheus configuration map:
sed -i '/etc\/config\/alertsnrf/d' /tmp/tempConfig.yaml sed -i '/rule_files:/a\ \- /etc/config/alertsnrf' /tmp/tempConfig.yaml - Update configuration map
with updated file name of NRF alert file:
kubectl replace configmap _NAME_-server -f /tmp/tempConfig.yaml - Add NRF Alert rules in
configuration map under file name of NRF alert file:
kubectl patch configmap _NAME_-server -n _Namespace_--type merge --patch "$(cat ~/NrfAlertrules.yaml)"
Note:
Prometheus server takes updated configuration map that is automatically reloaded after 60 seconds approximately. Refresh the Prometheus GUI to confirm that the NRF Alerts are loaded.