You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Interval, in seconds. A good starting point is `300` seconds to collect every five mintues.
64
-
- Splunk index name
65
-
- Start time, in relative shorthand form, e.g.: `24h` for 24 hours before input execution time.
66
-
-*(optional)* End time, in relative shorthand form, e.g.: `5m` for 5 minutes before input execution time.
67
-
-*(optional)* Query string used to return matching events.
68
-
-*(optional)* Maximum number of events to return.
69
-
70
-
8. For DataSet Power Queries, enter:
71
-
- A name for the input.
72
-
- Interval, in seconds. A good starting point is `300` seconds to collect every five mintues.
73
-
- Splunk index name
74
-
- Start time, in relative shorthand form, e.g.: `24h` for 24 hours before input execution time.
75
-
-*(optional)* End time, in relative shorthand form, e.g.: `5m` for 5 minutes before input execution time.
76
-
- Query string used to return matching events, including commands such as `| columns`, `| limit`, etc.
77
-
78
-
## Usage
79
-
80
-
### Inputs
81
-
The DataSet Add-on for Splunk collects the following inputs utilizing time-based checkpointing to prevent reindexing the same data:
82
-
83
-
| Source Type | Description | CIM Data Model |
84
-
| ------ | ------ | ------ |
85
-
| dataset:alerts| Predefined Power Query API call to index [alert state change records](https://app.scalyr.com/help/alerts#logging)|[Alerts](https://docs.splunk.com/Documentation/CIM/latest/User/Alerts)|
86
-
| dataset:query| User-defined standard [query](https://app.scalyr.com/help/api#query) API call to index events | - |
87
-
| dataset:powerquery| User-defined [PowerQuery](https://app.scalyr.com/help/api#powerquery) API call to index events | - |
48
+
5. To confirm connectivity, simply search `|dataset` and validate results.
88
49
89
50
## SPL Command
90
-
The `| dataset` command allows queries against the DataSet API directly from Splunk's search bar. Optional parameters are supported:
51
+
The `| dataset` command allows queries against the DataSet API directly from Splunk's search bar.
91
52
92
-
-**method** - Define `query`, `powerquery` or `timeseries` to call the appropriate REST endpoint. Default is query.
93
-
-**query** - The DataSet [query](https://app.scalyr.com/help/query-language) or filter used to select events. Default is no filter (return all events limited by maxCount).
53
+
Optional parameters are supported:
54
+
55
+
-**method** - Define `query`, `powerquery`, `facet` or `timeseries` to call the appropriate REST endpoint. Default is query.
56
+
-**query** - The DataSet [query](https://app.scalyr.com/help/query-language) or filter used to select events. Default is no filter (return all events limited by time and maxCount).
94
57
-**starttime** - The Splunk time picker can be used (not "All Time"), but if starttime is defined it will take precedence to define the [start time](https://app.scalyr.com/help/time-reference) for DataSet events to return. Use epoch time or relative shorthand in the form of a number followed by d, h, m or s (for days, hours, minutes or seconds), e.g.: `24h`. Default is 24h.
95
58
-**endtime** - The Splunk time picker can be used (not "All Time"), but if endtime is defined it will take precedence to define the [end time](https://app.scalyr.com/help/time-reference) for DataSet events to return. Use epoch time or relative shorthand in the form of a number followed by d, h, m or s (for days, hours, minutes or seconds), e.g.: `5m`. Default is current time at search.
96
59
97
-
For query and powerquery, additional parameters include:
60
+
For query and powerquery:
98
61
-**maxcount** - Number of events to return.
99
62
-**columns** - Specified fields to return from DataSet query (or powerquery, analogous to using `| columns` in a powerquery). Yields performance gains for high volume queries instead of returning and merging all fields.
100
63
101
-
For timeseries, additional parameters include:
64
+
For facet:
65
+
-**field** - Define field to get most frequent values of. Default is logfile.
66
+
67
+
For timeseries:
102
68
-**function** - Define value to compute from matching events. Default is rate.
103
69
-**buckets** - The number of numeric values to return by dividing time range into equal slices. Default is 1.
104
70
-**createsummaries** - Specify whether to create summaries to automatically update on ingestion pipeline. Default is true; recommend setting to false for one-off or while testing new queries.
@@ -123,24 +89,71 @@ Power Query Example 2: `| dataset method=powerQuery search="$serverHost == 'clou
Since events are returned in JSON format, the Splunk [spath command](https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Spath) is useful. Additionally, the Splunk [collect command](https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/collect) can be used to add the events to a summary index:
Since events are returned in JSON format, the Splunk [spath command](https://docs.splunk.com/Documentation/SplunkCloud/latest/SearchReference/Spath) is useful. Additionally, the Splunk [collect command](https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/collect) can be used to add the events to a summary index:
For use cases requiring data indexed in Splunk, optional inputs are provided utilizing time-based checkpointing to prevent reindexing the same data:
114
+
115
+
| Source Type | Description | CIM Data Model |
116
+
| ------ | ------ | ------ |
117
+
| dataset:alerts| Predefined Power Query API call to index [alert state change records](https://app.scalyr.com/help/alerts#logging)|[Alerts](https://docs.splunk.com/Documentation/CIM/latest/User/Alerts)|
118
+
| dataset:query| User-defined standard [query](https://app.scalyr.com/help/api#query) API call to index events | - |
119
+
| dataset:powerquery| User-defined [PowerQuery](https://app.scalyr.com/help/api#powerquery) API call to index events | - |
120
+
121
+
1. On the inputs page, click Create New Input and select the desired input
- Interval, in seconds. A good starting point is `300` seconds to collect every five mintues.
136
+
- Splunk index name
137
+
- Start time, in relative shorthand form, e.g.: `24h` for 24 hours before input execution time.
138
+
-*(optional)* End time, in relative shorthand form, e.g.: `5m` for 5 minutes before input execution time.
139
+
-*(optional)* Query string used to return matching events.
140
+
-*(optional)* Maximum number of events to return.
141
+
142
+
4. For DataSet Power Queries, enter:
143
+
- A name for the input.
144
+
- Interval, in seconds. A good starting point is `300` seconds to collect every five mintues.
145
+
- Splunk index name
146
+
- Start time, in relative shorthand form, e.g.: `24h` for 24 hours before input execution time.
147
+
-*(optional)* End time, in relative shorthand form, e.g.: `5m` for 5 minutes before input execution time.
148
+
- Query string used to return matching events, including commands such as `| columns`, `| limit`, etc.
149
+
139
150
## Alert Action
140
151
An alert action allows sending an event to the DataSet [addEvents API](https://app.scalyr.com/help/api#addEvents).
141
152
142
153
## Support
143
-
For support, please open an issue on GitHub.
154
+
To troubleshooting the custom command, check the Job Inspector search log, also available in the internal index: `index=_internal app="TA-dataset" sourcetype=splunk_search_messages`. Common issues include incorrect API key or firewalls blocking outbound traffic on port 443.
155
+
156
+
For support, open a ticket with support, or open a GitHub issue.
144
157
145
158
##### Note
146
159
This add-on was built with the [Splunk Add-on UCC framework](https://splunk.github.io/addonfactory-ucc-generator/).
0 commit comments