OCNRF Alert Configuration
OCNRF Alert Configuration
Follow the steps below for OCNRF Alert configuration in Prometheus:
Note:
- By default
Namespace
for OCNRF isocnrf
that must be update as per the deployment. - The
ocnrf-config-1.2.0.0.0.zip
file can be downloaded from OHC.Unzip the
ocnrf-config-1.2.0.0.0.zip
package after downloading to getNrfAlertrules.yaml
file.
- 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:
The Prometheus server takes an updated configuration map that is automatically reloaded after approximately 60 seconds. Refresh the Prometheus GUI to confirm that the NRF Alerts have been reloaded.