5.5 NRF Alert Configuration

NRF Alert Configuration

Follow the steps below for NRF Alert configuration in Prometheus:

Note:

  1. The Name is the release name used in helm install command.
  2. The Namespace is the namespace used in helm install command. By default Namespace for NRF is ocnrf that must be update as per the deployment.
  3. The ocnrf-config-1.1.0.0.0.zip file can be downloaded from OHC.

    Unzip the ocnrf-config-1.1.0.0.0.zip package after downloading to get NrfAlertrules.yaml file.

  1. Take Backup of current configuration map of Prometheus:
    kubectl get configmaps _NAME_-server -o yaml -n _Namespace_ > /tmp/tempConfig.yaml
  2. 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
  3. Update configuration map with updated file name of NRF alert file:
    kubectl replace configmap _NAME_-server -f /tmp/tempConfig.yaml
  4. 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.