praeco icon indicating copy to clipboard operation
praeco copied to clipboard

Compare value of multiple fields

Open SimonVleugels opened this issue 2 years ago • 0 comments

🎉 Goal

Being able to compare the value of different fields in filter.

💪 Motivation

Now it's only possible to add a filter which compares the value of a field to a static defined value. Using "contains, is not empty, greater than, less than,..." eg. image_size greated than 1236743 Those values can only be configured in the alert rule.

In the case your data looks like this (all send to the same index): DATA 1: {image_name: image_A, max_size: 12654, image_size: 213} DATA 2: {image_name: image_B, max_size: 1267421, image_size: 1244112} DATA 3: {image_name: image_C, max_size: 2975985, image_size: 874365}

And you want to give an alarm if image_size > max_size. You will have to create a different rule for each image_type with each max_size hardcoded. For 3 different images this can be done, but this is not scalable for 100 different images.

Instead it would be handy if one could compare the value of a field with the value of another field. eg image_size greated than max_size

📖 Reference (optional)

/

📆 Schedule (optional)

/

📎 Tasks (optional)

/

SimonVleugels avatar Feb 10 '23 10:02 SimonVleugels