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
This version includes a few changes, these include two new parameters on the version control backup:
`run_ko_query` - if enabled this runs a Splunk savedsearch and adds the additional information of tag=`git_tag_name` into the output of the modular input which is then indexed
`run_ko_diff` - if enabled in combination with `run_ko_query` this additionally adds a diff=`git_difference_result` from comparing the new version with HEAD~1
To run the query the macro `splunk_vc_ko_query`, should be configured to point to an appname:searchname, the default is `splunk_kom:splunk_vc_kom_audit_summary`
If you have the Knowledge Object Overview App for Splunk (https://splunkbase.splunk.com/app/5399/) installed then there is a savedsearch called `splunk_vc_kom_audit_summary` which can be moved or copied into the `splunk_kom` app for this new functionality to work as expected
In addition the field qualifiedSearch is now longer backed up for savedsearches
Boolean tickboxes are now used for options that should be true or false
Also attempted to improve the error logging for failed OS process execution
Fixed a few misc bugs related to setting email address/name in the git repo among others
Copy file name to clipboardExpand all lines: README.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -169,6 +169,8 @@ There are also many online resources to help with learning git
169
169
- git_branch - optional, sets the git branch to use, defaults to master
170
170
- git_proxy - optional, if supplied provides a proxy setting to use to access the git repository (https proxy). Use https://user:password:[email protected]:3128 and the application will obtain the password for the entry 'passwordinpasswordsconf'. If password: is not used the password is used as per a normal proxy setting, for example https://user:[email protected]:3128
171
171
- file_per_ko - optional, do you want one file per knowledge object? Or a combined file? Defaults to false (i.e. 1 large file for global dashboards in an app). Note that if you change this setting you will need to re-create or wipe the repository as the files are stored differently...Note this setting should match in both backup and restore modular inputs for a particular repo
172
+
- run_ko_query - optional, do you want to run a Splunk query to determine which knowledge objects changed? Uses macro `splunk_vc_ko_query` (defaults to false)
173
+
- run_ko_diff - optional, should output of the modular input include diff information (requires `run_ko_query` to be true, defaults to false)
172
174
173
175
"More settings"
174
176
- interval - how often the backup should run, if not set the backup will only run on restart of the Splunk instance or when you save this configuration...
@@ -206,6 +208,19 @@ The following macros exist and are relate to the `splunkversioncontrol_restore_d
206
208
-`splunk_vc_timeout` - this is the time delay between triggering the remote command and waiting for the `_audit` index to catchup with a log entry to advise the command was run, if set too short the restore may fail because the `| postversioncontrolrestore` search has not appeared in the `_audit` index yet
207
209
-`sslVerify` - defaults to "False", this can be set to the location of a CA file to be used by the python requests library to validate the SSL certificates in use
208
210
-`requestingAddress` - by default the REST endpoint splunkversioncontrol_rest_restore will make a HTTPS call back to the calling IP address, this overrides the address to call back, the default of False results in a call back to the requesting IP address which is used in most use cases
211
+
-`splunk_vc_ko_query`, should be configured to point to an appname:searchname, the default is `splunk_kom:splunk_vc_kom_audit_summary`
212
+
213
+
## Configuring the macro & savedsearch to work with the run_ko_query option
214
+
If `run_ko_query` is configured, then the app will attempt to trigger the savedsearch configured by the macro `splunk_vc_ko_query`
215
+
The macro should be in the format appcontext:savedsearchname
216
+
217
+
By default this is configured to `splunk_kom:splunk_vc_kom_audit_summary` and was tested against version 1.0.26 of the Knowledge Object Overview App for Splunk (kom) application (https://splunkbase.splunk.com/app/5399/)
218
+
219
+
Note that the savedsearch `splunk_vc_kom_audit_summary` is included in the Splunk version control application but will need to be moved into the `splunk_kom` app context to work as expected, or you can make your own search if preferred.
220
+
221
+
Since the output is from the modular input, the output will default to the sourctype `splunkversioncontrol_backup` and will appear in the main index (you can change this in more settings)
222
+
223
+
Finally, the `run_ko_diff` option if configured in addition to the `run_ko_query` will run a git diff of HEAD~1 and include that in the output of the modular input (and will therefore be indexed into Splunk)
209
224
210
225
## Troubleshooting
211
226
In some Linux OS distributions an error similar to `OPENSSL_1.0.0 not found` may appear, `os.unsetenv('LD_LIBRARY_PATH')` appears to fix this however AppInspect does not allow modification of OS environment variables.
@@ -274,6 +289,22 @@ To do this you will need to install Version Control For SplunkCloud on your Splu
This version includes a few changes, these include two new parameters on the version control backup:
294
+
`run_ko_query` - if enabled this runs a Splunk savedsearch and adds the additional information of tag=`git_tag_name` into the output of the modular input which is then indexed
295
+
`run_ko_diff` - if enabled in combination with `run_ko_query` this additionally adds a diff=`git_difference_result` from comparing the new version with HEAD~1
296
+
297
+
To run the query the macro `splunk_vc_ko_query`, should be configured to point to an appname:searchname, the default is `splunk_kom:splunk_vc_kom_audit_summary`
298
+
If you have the Knowledge Object Overview App for Splunk (https://splunkbase.splunk.com/app/5399/) installed then there is a savedsearch called `splunk_vc_kom_audit_summary` which can be moved or copied into the `splunk_kom` app for this new functionality to work as expected
299
+
300
+
In addition the field qualifiedSearch is now longer backed up for savedsearches
301
+
302
+
Boolean tickboxes are now used for options that should be true or false
303
+
304
+
Also attempted to improve the error logging for failed OS process execution
305
+
306
+
Fixed a few misc bugs related to setting email address/name in the git repo among others
307
+
277
308
### 1.2.1
278
309
This version includes some changes that should reduce the storage size of savedsearches, in particular:
279
310
- listDefaultActionArgs=false is now used on the savedsearches REST endpoint
Copy file name to clipboardExpand all lines: README/inputs.conf.spec
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,10 @@ git_proxy = <value>
47
47
* If supplied provides a proxy setting to use to access the git repository (https proxy). Use https://user:password:[email protected]:3128 and the application will obtain the password for the entry 'passwordinpasswordsconf'. If password: is not used the password is used as per a normal proxy setting, for example https://user:[email protected]:3128</description>
48
48
file_per_ko =<boolean>
49
49
* Do you want one file per knowledge object? Or a combined file? Defaults to false (i.e. 1 large file for global dashboards in an app). Note that if you change this you will need to re-create or wipe the repository as the files are stored differently...Note this setting should match in both backup and restore modular inputs for a particular repo
50
+
run_ko_query =<boolean>
51
+
* Do you want to run a Splunk query to determine which knowledge objects changed? macro 'splunk_vc_ko_query' (defaults to false)
52
+
run_ko_diff =<boolean>
53
+
* Should output of the modular input include diff information (requires run_ko_query to be true, defaults to false)
Copy file name to clipboardExpand all lines: bin/splunkversioncontrol_backup.py
+30-6Lines changed: 30 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -58,12 +58,14 @@
58
58
<description>disable the backup of user level / private objects (true/false), default false</description>
59
59
<validation>is_bool('noPrivate')</validation>
60
60
<required_on_create>false</required_on_create>
61
+
<data_type>boolean</data_type>
61
62
</arg>
62
63
<arg name="noDisabled">
63
64
<title>noDisabled</title>
64
65
<description>disable the backup of objects with a disabled status in Splunk (true/false), default false</description>
65
66
<validation>is_bool('noDisabled')</validation>
66
67
<required_on_create>false</required_on_create>
68
+
<data_type>boolean</data_type>
67
69
</arg>
68
70
<arg name="includeEntities">
69
71
<title>includeEntities</title>
@@ -90,12 +92,14 @@
90
92
<description>turn on DEBUG level logging (defaults to INFO) (true/false), default false</description>
91
93
<validation>is_bool('debugMode')</validation>
92
94
<required_on_create>false</required_on_create>
95
+
<data_type>boolean</data_type>
93
96
</arg>
94
97
<arg name="useLocalAuth">
95
98
<title>useLocalAuth</title>
96
99
<description>Instead of using the srcUsername/srcPassword, use the session_key of the user running the modular input instead (works on localhost only) (true/false), default false</description>
97
100
<validation>is_bool('useLocalAuth')</validation>
98
101
<required_on_create>false</required_on_create>
102
+
<data_type>boolean</data_type>
99
103
</arg>
100
104
<arg name="remoteAppName">
101
105
<title>remoteAppName</title>
@@ -146,6 +150,22 @@
146
150
<title>file_per_ko</title>
147
151
<description>Do you want one file per knowledge object? Or a combined file? Defaults to false (i.e. 1 large file for global dashboards in an app)</description>
148
152
<required_on_create>false</required_on_create>
153
+
<data_type>boolean</data_type>
154
+
<validation>is_bool('file_per_ko')</validation>
155
+
</arg>
156
+
<arg name="run_ko_query">
157
+
<title>run_ko_query</title>
158
+
<description>Do you want to run a Splunk query to determine which knowledge objects changed? macro 'splunk_vc_ko_query' (defaults to false)</description>
159
+
<required_on_create>false</required_on_create>
160
+
<data_type>boolean</data_type>
161
+
<validation>is_bool('run_ko_query')</validation>
162
+
</arg>
163
+
<arg name="run_ko_diff">
164
+
<title>run_ko_diff</title>
165
+
<description>Should output of the modular input include diff information (requires run_ko_query to be true, defaults to false)</description>
0 commit comments