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
This app is not "visible" in the Splunk UI app menu. After installing the app, follow this process:
1. Do a search of any data and switch to the visualisation tab
2. In the top left, in the visualisastion menu, select "Region Chart viz"
3. Open the "Format" menu then select "Help"
4. There will be a link to the in-app documentation, which includes working examples
This visualisation should work with any data that works with the Splunk built-in line chart. The first column (which is often "_time") will be the X-axis and subsequent columns will be rendered as lines (so they should be numeric values). A column with the specific name "regions" should be supplied which defines the regions to draw behind the chart.
This is how the data should look:
Regions are drawn per-column vertically, from bottom to top. Horizontal regions can be drawn by setting the same region value on multiple columns. See the examples below.
The format for the region field is comma-seperated key-value pairs and best explained with examples:
"regions" field | Result |
red |
The most basic example that creates a region. A red column of data will be drawn from the bottom of the chart to the top of chart. Region colors can be specificed as valid HTML colours (RBG, Hex, named colours, etc..). |
Out of hours=#ccccc |
Create a named region in a grey color for the chart column. This name will be seen on the tooltip when hovering the chart. |
green,1000,orange,1500,red |
Create a green region from the bottom of the chart to 1000, an orange region from 1000 to 1500 and a red region from 1500 to the top of the chart. |
,1000,Warning=orange,1500,Critical=red |
Create a orange region from 1000 to 1500 and a red region from 1500 to the top of the chart. |
Especially useful for visualizing the adaptive thresholds that were set by ITSI (also works with ITSI static thresholds). Requires add-on Get ITSI Thresholds - custom command
index="itsi_summary" itsi_service_id=c2d8f443-fd65-4872-b3b8-1ac7757b57f6 kpiid=a672f70631ce28a0be31e1f2 indexed_is_service_max_severity_event=0
| timechart span=1h avg(alert_value) as alert_value
| getitsithresholds service=c2d8f443-fd65-4872-b3b8-1ac7757b57f6 kpi=a672f70631ce28a0be31e1f2
Over a 24 hour chart, show the hours that are important.
... search ...
| timechart span=1h avg(series1) as avg
| eval hour = strftime(_time, "%H")
| eval regions = if(hour > 17 OR hour < 9,"Out of hours=#009DD9","")
| fields - hour
Hardcoded simple static thresholds.
... search ...
| timechart span=1m avg(series1) as avg
| eval regions = "normal=#99D18B,5000,Warning=#FCB64E,7000,Error=#B50101"
Add a gray region to highlight the area of the chart that is less than 15 minutes old. Can easily be adapted to show a maintinance window.
... search ...
| timechart span=1h avg(series1) as avg
| eval regions = if(_time > (now() - 900),"Data still arriving=#aaaaaa","")
Calculate the historical average and standard deviation of the data. Then mark regions based on the standard deviations.
... search over 2 weeks of data ...
| timechart span=1h avg(FIELD) as avg stdev(FIELD) as stddev
| timewrap w series=short align=now
| where _time > now() - 86400
| eval regions = "3 standard deviations below=#B50101," + tostring(avg_s1 - stddev_s1 * 3) + ",2 standard deviations below=#FCB64E," + tostring(avg_s1 - stddev_s1 * 2) + ",normal=#99D18B," + tostring(avg_s1 + stddev_s1 * 2) + ",2 standard deviations above=#FCB64E," + tostring(avg_s1 + stddev_s1 * 3) + ",3 standard deviations above=#B50101"
| table _time avg_s0 avg_s1 regions
There are two modes of rendering the lines when there are multiple series of data. "Lighter/Dashed" is best suited when the data series are historical trend lines. E.g. Comparing CPU performance this week against last week and the week before. "Coloured" is best suited when the data series are peers. E.g. The average CPU of three servers in a cluster.
There are some text overlays that can be enabled. Note that these overlays are only for the primary data series.
The following third-party libraries are used by this app. Thank you! * jQuery - MIT - https://jquery.com/ * D3 - BSD 3-Clause - https://d3js.org/ * TinyColor - MIT - https://github.com/bgrins/TinyColor * Font Awesome - Creative Commons Attribution-ShareAlike 4.0 License - https://fontawesome.com/
No changes, just a version bump to prevent Splunkbase from archiving this app.
v.1.1.10
* Update internal jquery library for Splunk Cloud compatibility
v.1.1.8
Regions now default to centered over the data point. Revert to the old behavior by setting "Region align=left"
Changed the bottom axis so that won't leave a gap at the start anymore. Revert to the old behaviour by setting "Adjust ticks=no"
* Minor dark mode and tooltip fixes
v.1.1.7
* Better handling for when the chart value is a constant value
v.1.1.5
* Add new formatting menu option that allows for autoscaling the left axis so that all regions are displayed
v1.0.5
Can compare regions using >= or > using new option in format menu
Fixes for dark mode
v1.0.4
* Minor bug fixes
v.1.1.9
* Update internal jquery library for Splunk Cloud compatibility
v.1.1.8
Regions now default to centered over the data point. Revert to the old behavior by setting "Region align=left"
Changed the bottom axis so that won't leave a gap at the start anymore. Revert to the old behaviour by setting "Adjust ticks=no"
* Minor dark mode and tooltip fixes
v.1.1.7
* Better handling for when the chart value is a constant value
v.1.1.5
* Add new formatting menu option that allows for autoscaling the left axis so that all regions are displayed
v1.0.5
Can compare regions using >= or > using new option in format menu
Fixes for dark mode
v1.0.4
* Minor bug fixes
v.1.1.8
Regions now default to centered over the data point. Revert to the old behavior by setting "Region align=left"
Changed the bottom axis so that won't leave a gap at the start anymore. Revert to the old behaviour by setting "Adjust ticks=no"
* Minor dark mode and tooltip fixes
v.1.1.7
* Better handling for when the chart value is a constant value
v.1.1.5
* Add new formatting menu option that allows for autoscaling the left axis so that all regions are displayed
v1.0.5
Can compare regions using >= or > using new option in format menu
Fixes for dark mode
v1.0.4
* Minor bug fixes
v.1.1.7
* Better handling for when the chart value is a constant value
v.1.1.5
* Add new formatting menu option that allows for autoscaling the left axis so that all regions are displayed
v1.0.5
Can compare regions using >= or > using new option in format menu
Fixes for dark mode
v1.0.4
* Minor bug fixes
v.1.1.5
* Add new formatting menu option that allows for autoscaling the left axis so that all regions are displayed
v1.0.5
Can compare regions using >= or > using new option in format menu
Fixes for dark mode
v1.0.4
* Minor bug fixes
v1.0.5
Can compare regions using >= or > using new option in format menu
Fixes for dark mode
v1.0.4
* Minor bug fixes
v1.0.4
* Minor bug fixes
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.