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

We are working on something new...

A Fresh New Splunkbase
We are designing a New Splunkbase to improve search and discoverability of apps. Check out our new and improved features like Categories and Collections. New Splunkbase is currently in preview mode, as it is under active development. We welcome you to navigate New Splunkbase and give us feedback.
Splunkbase will be undergoing a scheduled migration and will be unavailable on Saturday, Oct 1, 2022, from 11AM to 3PM PDT

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 Get ITSI Thresholds custom command
SHA256 checksum (get-itsi-thresholds-custom-command_118.tgz) 482667abfcc8b735f04eb9e62b8a02a5d65c5917ab0135e5dce4235d80de82a5 SHA256 checksum (get-itsi-thresholds-custom-command_116.tgz) 489ce940cc4d38f548be63e50ca8ef41c29405a375f7bd5aaf6e9d52deb6cbae SHA256 checksum (get-itsi-thresholds-custom-command_113.tgz) bee23a5fbc0eb7625fb78082425f215d9589f8a2f957fe80199057f3834433ae SHA256 checksum (get-itsi-thresholds-custom-command_101.tgz) 60b6167aca1081e31136ca79866eb8abeaecaddfd1c3f8a7ec7c2bf504d7fdce
To install your download
For instructions specific to your download, click the Details tab after closing this window.

Flag As Inappropriate

splunk

Get ITSI Thresholds custom command

Splunk Cloud
Overview
Details
A custom command that will retrieve the values of the time-based ITSI thresholds that are set for a KPI. Compatible with static ITSI thresholds or adaptive thresholds.

Works well with "Region Chart Viz" ( https://splunkbase.splunk.com/app/4911 )

Copyright (C) 2019 Chris Younger. I am a Splunk Professional Services consultant working for JDS Australia, in Brisbane Australia.

Source code | Questions, Bugs or Suggestions | My Splunk apps

Usage (to get the current thresholds for multiple KPIs)

| getitsithresholds mode=(now|nowextended) [services=Comma,Seperated,ServiceIds]

These modes are always a generating command and will return the current threshold for all KPIs in enabled services. This mode is useful when you are reporting current status of KPIs by searching against the itsi_summary index. If a comma seperated list of service IDs is supplied in the "services" argument, then only KPIs for those services will be returned.
In the "now" mode, the following columns will be returned: service_id, kpi_id, threhsolds. Use "nowextended" mode, to return more columns. Its also possible to return X hours forward in time by using a plus symbol. Here is an example to return all thresholds for all services, for the current time it runs, plus the next 23 hours. Useful if you want to run once a day, and output the results to a lookup table.

| getitsithresholds mode=now+23 | outputlookup itsi_all_thresholds.csv

Then you can use this threshold in subsequent searches like so:

| <some search that has fields 'service_id' and 'kpi_id'>  
| eval hour = floor(((now() / 3600) - 120) % 168) 
| lookup itsi_all_thresholds.csv service_id kpi_id hour OUTPUT thresholds

Usage (for charting a single KPI)

| getitsithresholds service=SERVICEID kpi=KPI mode=(normal|raw|columns)

This can be used as a generating command or a streaming command. If used as a streaming command, it must have a _time field/column. It will use this _time column to match the thresholds with the correct data rows. Data can be supplied in any granularity however if the time block extends through multiple time policies, then only the first time policy will be output. For this reason, its best to use data with hourly granularity.

Simple example to retrieve thresholds (generating command):

| getitsithresholds service=c2d8f443-fd65-4872-b3b8-1ac7757b57f6 kpi=a672f70631ce28a0be31e1f2

Example showing how to enrich data by adding thresholds (streaming command):

index="itsi_summary" itsi_service_id=c2d8f443-fd65-4872-b3b8-1ac7757b57f6 kpiid=a672f70631ce28a0be31e1f2 
| timechart span=1h avg(alert_value) as alert_value
| getitsithresholds service=c2d8f443-fd65-4872-b3b8-1ac7757b57f6 kpi=a672f70631ce28a0be31e1f2

Modes:

mode=normal (default) - will output a single field regions containing the severity name, the colour and the threshold value.
mode=raw - will output an unmodified JSON structure for each time policy
mode=columns - will output data as individual fields (hour, policy, min, max, severityX..., colorX..., thresholdX...). ITSI can be configured with different amounts of severities for each time policy, this is why the columns are output like this.
mode=now - output only the thresholds for the current point in time
mode=nowextended - output only the thresholds for the current point in time

Output from this command (using mode=normal) can be charted using the "Region Chart Visualization"

Round:

From version 1.6 this addon will now use simple rounding logic to round the thresholds. You can switch this off using round=f

Credits

Thank you to Luke Murphy for providing the Search Command Example template: https://github.com/LukeMurphey/splunk-search-command-example

Release Notes

Version 1.1.8
Aug. 25, 2020

v1.1.8
Correctly reports non-time policy, static thresholds
Errors reporting changed slightly
v1.1.6
for mode=now and nowextended you can retrieve not just the current hour, but also X number of hours into the future.
threshold values now default to having less precision. use "round=f" if you don't want to round the values
v1.1.3
added "mode=now" where you can pass in a list of service ID's and this will return the thresholds for all KPIs in those services - at the present time. There is also mode="nowextended" to return even more columns of data.
fixed problem where the results were offset incorrectly by a day

Version 1.1.6
Aug. 19, 2020

v1.1.6
for mode=now and nowextended you can retrieve not just the current hour, but also X number of hours into the future.
threshold values now default to having less precision. use "round=f" if you don't want to round the values
v1.1.3
added "mode=now" where you can pass in a list of service ID's and this will return the thresholds for all KPIs in those services - at the present time. There is also mode="nowextended" to return even more columns of data.
fixed problem where the results were offset incorrectly by a day

Version 1.1.3
July 25, 2020

v1.1.3
added "mode=now" where you can pass in a list of service ID's and this will return the thresholds for all KPIs in those services - at the present time. There is also mode="nowextended" to return even more columns of data.
fixed problem where the results were offset incorrectly by a day

Version 1.0.1
March 11, 2020

Subscribe Share

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 from Splunk, our partners and our community. Find an app for most any data source and user need, or simply create your own with help from our developer portal.

Follow Us:
Splunk, Splunk>,Turn Data Into Doing, Data-to-Everything, and D2E are trademarks or 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.