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
PIE-67 Support user customizable indexes via macros (#12)
* prep for rebase
* remove autogen readme
* adds support for variable index use by sourcetype
* pie_67_macros Use macros to allow custom index
Before this update all the searches were configured assuming the main
index was the only option.
With this update, the searches will respect user set indexes for each
sourcetype or a single global puppet data index. See the advanced
configuration option in the Readme for more details on configuring it.
This also starts the 1.5.1 release process.
* remove metadata/local.meta from commit
All report views support using custom indexes for storing event data. They accomplish this with a series of advanced search macros. The queries assume each sourcetype can be stored in it's own index (facts, summary reports, detailed reports, bolt events, action events, Puppet Enterprise metrics).
35
+
36
+
There is one top level macro, `puppet_index` which defaults to "", if you configure the HEC to use a different index and want all Puppet in that index, change that value here to be `index=puppetindexname`.
37
+
38
+
If you are using [puppetlabs/splunk_hec](https://forge.puppet.com/puppetlabs/splunk_hec/readme) version 0.5.0 or later, you can specify different HEC tokens for Summary Reports, Facts, and Metrics. Then create an index and an associated HEC token associated with those sourcetypes, and configure both the splunk_hec module in Puppet with those new values. Actions, Bolt Events, and Detailed Reports are all submitted via different tools and would need ot be changed according to use a different HEC token. Then the corresponding macro's updated to use those indexes.
39
+
40
+
For example, if you want most Puppet data to go to one index, but Facts, Metrics, and Detailed Reports to go to their own indexes, one would follow these steps:
41
+
- Create four indexes: puppet_data, puppet_facts_data, puppet_metrics_data, and puppet_detailed_data (or whatever name makes sense), each with their desired timespan, retention, etc.
42
+
- Create four HEC's (example names):
43
+
1.`puppet` with sourcetype of `puppet:summary` and the index `puppet_data`
44
+
2.`puppet_facts` with sourcetype of `puppet:facts` and the index of `puppet_facts_data`
45
+
3.`puppet_metrics` with sourcetype of `puppet:metrics` and the index of `puppet_metrics_data`
46
+
4.`puppet_detailed` with sourcetype of `puppet:detailed` and the index of `puppet_detailed_data`
47
+
- Configure the `splunk_hec` module with the corresponding tokens
48
+
1.`splunk_hec::token` with the value from the `puppet` HEC (since you want all Puppet using splunk_hec plugin to go here, except for facts and metrics)
49
+
2.`splunk_hec::token_facts` with the value from the `puppet_facts` HEC
50
+
3.`splunk_hec::token_metrics` with the value from the `puppet_metrics` HEC
51
+
- Update the Puppet Report Viewer's configuration to use the `puppet_detailed` HEC token, because detailed reports are pulled from Puppet and generated by the alert action in this application
52
+
- Update the advanced search macros to use the new values:
53
+
1. Open Advanced Search under the Settings -> Knowledge menu
54
+
2. Select `Search Macros`
55
+
3. Select `puppet_index` and change the definition to `index=puppet_data`, click save
56
+
4. Select `puppet_facts_index` and change the definition to `index=puppet_facts_data`, click save
57
+
5. Select `puppet_metrics_index` and change the definition to `index=puppet_metrics_data`, click save
58
+
6. Select `puppet_detailed_index` and change the definition to `index=puppet_detailed_data`, click save
59
+
- Reload the main view of the Puppet Report Viewer app, and you should see data, or perform the following search:
- Support for Facts sourcetype (puppet:facts), and dashboards to use it
8
+
- Introduces "Report Builder" page to help a user build reports and then craft custom search from the iterface to use for alerts or their own uses
9
+
- Introduces Advanced Search macros to allow for customized indexs without requiring to modify the app. See Advanced Configuration section of the readme
10
+
- Add's sourcetypes of puppet:action, puppet:metrics, for future use
11
+
- Example Alert added, the search to generate a detailed report for any summary report that isn't "unchanged" has been added to the app, but set as disabled
12
+
13
+
Fixes:
14
+
- Duplicate item entry fixed, sourcetype's are now configured to extract KV from json only once
0 commit comments