icon/x Created with Sketch.

Splunk Cookie Policy

We use our own and third-party cookies to provide you with a great online experience. We also use these cookies to improve our products and services, support our marketing campaigns, and advertise to you on our website and other websites. Some cookies may continue to collect information after you have left our website. Learn more (including how to update your settings) here.
Accept Cookie Policy

Accept License Agreements

This app is provided by a third party and your right to use the app is in accordance with the license provided by that third-party licensor. Splunk is not responsible for any third-party apps and does not provide any warranty or support. If you have any questions, complaints or claims with respect to this app, please contact the licensor directly.

Thank You

Downloading Holidays
SHA256 checksum (holidays_100.tgz) c1939b102089e458259ceedb30a2d7d4e138862eb1bac559ecc00f122505a11c
To install your download
For instructions specific to your download, click the Details tab after closing this window.

Flag As Inappropriate

Holidays

Splunk AppInspect Passed
Admins: Please read about Splunk Enterprise 8.0 and the Python 2.7 end-of-life changes and impact on apps and upgradeshere.
Overview
Details
Ever needed an easy way to generate if a given day is a holiday in your locale? This app provides a wrapper for for the python library python-holidays (https://github.com/dr-prodigy/python-holidays) to enrich existing data with timestamps to know if the given timestamp is a holiday, business day, or business holiday (a holiday that occurs on a normal business day). This can be helpful for a number of reasons but often for predictions or forecasts (like in Smart Forecasting's "Special Days field" option) as those days usually will mean a difference in the model, especially those holidays that land on a business day.

SA-holidays

This supporting add-on provides one command -- holidays. A wrapper for python-holidays (https://github.com/dr-prodigy/python-holidays) providing holidays, business days, and business holidays when presented a _time (or specified) field.

Version: 1.0

Command reference:

holidays

Description

A wrapper for for the python library python-holidays (https://github.com/dr-prodigy/python-holidays) to enrich existing data with timestamps to know if the given timestamp is a holiday, business day, or business holiday (a holiday that occurs on a normal business day). Default settings: country is set to US and timestamp is expected in the _time field. This can be helpful for a number of reasons but often for predictions or forecasts as those days usually will mean a difference in the model, especially those holidays that land on a business day.

Supported country, state, and province codes can be found listed on https://github.com/dr-prodigy/python-holidays/blob/master/README.rst

Syntax

search * | holidays [timefield=<field>] [country=<string>] [province=<string>] [state=<string>] [business_days=<comma_sep_int>] [custom_holiday=<date>]

Optional arguments

timefield
Syntax: timefield="<field>"
Description: The field containing the timestamp in unix epoch, normally this is _time which is the default if not set.
Usage: i.e. timefield=timestamp
Default: _time

country
Syntax: country="<string>"
Description: Country code string from https://github.com/dr-prodigy/python-holidays/blob/master/README.rst, defaults to US
Usage: i.e. country=DE
Default: US

state
Syntax: state="<string>"
Description: State code string from https://github.com/dr-prodigy/python-holidays/blob/master/README.rst, defaults to none
Usage: i.e. state=CA
Default: None

province
Syntax: province="<string>"
Description: Province code string from https://github.com/dr-prodigy/python-holidays/blob/master/README.rst, defaults to none
Usage: i.e. country=DE province=BW
Default: None

business_days
Syntax: business_days="<comma-sep-int>"
Description: Defaults to Monday-Friday (1-5) but if different days are business days they can be specified using numbers (Saturday and Sunday are 6 and 7 respectively)
Usage: i.e. business_days="2,3,4,5,6,7"
Default: 1,2,3,4,5

custom_holiday
Syntax: custom_holiday="<date>"
Description: Ability to supply a date string for a non-standard holiday.
Usage: i.e. custom_holiday="2020-01-16"
Default: None

Examples

1: Enrich existing _time field with US holidays

* | holidays

2: Enrich existing _time field with US holidays in California

* | holidays state=CA

3: Add custom holiday

* | holidays custom_holiday="Jan 16,2020"

4: Hong Kong holidays

* | holidays country=HK

5: Baden-Württemberg province in Germany holidays

* | holidays country=DE province=BW

Release Notes

Version 1.0.0
Jan. 16, 2020

13
Installs
39
Downloads
Share Subscribe LOGIN TO DOWNLOAD

Subscribe Share

AppInspect Tooling

Splunk AppInspect evaluates Splunk apps against a set of Splunk-defined criteria to assess the validity and security of an app package and components.

Are you a developer?

As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps and add-ons from Splunk, our partners and our community. Find an app or add-on for most any data source and user need, or simply create your own with help from our developer portal.

Follow Us:
© 2005-2020 Splunk Inc. All rights reserved.
Splunk®, Splunk>®, Listen to Your Data®, The Engine for Machine Data®, Hunk®, Splunk Cloud™, Splunk Light™, SPL™ and Splunk MINT™ are trademarks and registered trademarks of Splunk Inc. in the United States and other countries. All other brand names, product names, or trademarks belong to their respective owners.