Can we generate logDNA alerts only based on the "presence" or "absence" of specified number of lines?

197 Views Asked by At

I have the following logs:

  1. Taking a pg_dump
  2. pg_dump successful
  3. logging into cloud
  4. logged in successfully
  5. Uploading the backup
  6. Upload successful

I want to generate a logDNA alert if line 1 AND line 6 do not appear every one hour. (not worried about the rest of the lines)

I am aware that I can generate alerts if a specified number of alerts do not show up within some time interval. But wanted to understand can I generate it when a string/regex is missing!

1

There are 1 best solutions below

0
On

Got it!! We can add in "query strings in the view" and then alert based on the number of lines... In my case, I filter line 1 AND line 6 and say alert if fewer than 2 lines appear in an hour.