Is there any way to set identification numbers for each alerts generating the icinga log?
The issue I am facing is, I have different network links configured on icinga. If any fluctuation happened, icinga will send down alerts first. Then it will send recovery alerts. I would like to create a script to find the actual downtime of network..I need to match the downtime with exact recovery time. Since there no identification numbers, i couldn't create the same including down time. What I can do now is to create the script to generate the dates in which downtime happened. Even that will not be actual downtime due to fluctuation.
icinga logs
script i am using
b=$(grep -ir ILL /var/log/icinga2/icinga2.log |
grep "Problem" |
grep "Completed" |
grep "UV-Jabong_TCL(RECON)_ILL" |
cut -c2,3,4,5,6,7,8,9,10,11 |
uniq
)
echo "UV-Jabong TCL ILL was down on following days"
echo "------------------------------------------------"
echo "$b"
I want to include the down time in the script above. Due to fluctuations, I can't find the exact downtime. Any suggestions?