Filtering local holidays(date) in Kibana dashboard

I’m using ELK – 7.12.1 and the following days are our local holidays.


In Kibana dashboard is it possible to exclude these holidays(specific dates) by applying some filters? If yes please let me know the method, it would be helpful. Thanks.

you can start composing a huge filter in the filter bar, something like this:
(@timestamp < "2021-01-01T00:00:00" OR @timestamp > "2021-01-01T23:59:59") AND (@timestamp < "2021-01-14T00:00:00" OR @timestamp > "2021-01-14T23:59:59") .... and so on.

Or, the prettier version: create a scripted field (something called holiday maybe) that checks if the timestamp is in any of those days and returns true if it is. And then just filter on the dashboard/visualization for holiday = False and that should be it.

Ok marius thanks. Scripted field would be best, So can you please help me with that?

There isn't one already created, but you can follow on from this:

def month = doc['@timestamp'].value.getMonthValue();
def day = doc['timestamp'].value.getDayOfMonth();
if (month == 1){
    if  ((day == 1) || (day == 14) || (day == 16))  {
        return true
    else {
        return false

you can extend it with further days following this example.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.