-
Notifications
You must be signed in to change notification settings - Fork 385
Release 1.6.18 #414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Release 1.6.18 #414
Changes from 47 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
220e143
Rework searchcommands_app to target only protocol v2, python3, and us…
fantavlik 85db94d
Fix up searchcommands and add example searches and results
fantavlik b9f902e
Attempt to remove build app stage and dist
fantavlik cb99368
Remove build step from ci
fantavlik b583f8c
Revert make command in CI
fantavlik c142bfd
Move modinputs to bin, cleanup setup.py imports
fantavlik 5c8b256
Move mod inputs to bin, add splunklib dependency
fantavlik 8da1679
Random numbers mod input example working
fantavlik d9e7044
Fix github_forks example.
fantavlik f93129f
Fix description
fantavlik e37c691
Changes added to preserve the custom field
vmalaviya-splunk ae817d9
Update README.md
vmalaviya-splunk 0875ba9
Update README.md
vmalaviya-splunk 35a8ff1
Update internals.py
vmalaviya-splunk 114f2e8
Update search_command.py
vmalaviya-splunk a622420
Update internals.py
vmalaviya-splunk c4995a6
Update internals.py
vmalaviya-splunk c6ec689
Merged fieldnames
vmalaviya-splunk b957136
Fixed: test failed due to fieldname merged
vmalaviya-splunk d20f194
Update internals.py
vmalaviya-splunk d695207
add gen_record() method for create a new record
akaila-splunk 0003f65
Update internals.py
vmalaviya-splunk c8f793d
Update search_command.py
akaila-splunk aa3bab7
added test case for generating CSC and updated README.md
akaila-splunk cc17181
updated search_command.py file
akaila-splunk 0b006d6
Add search mode example
fantavlik 465a56b
Update client.py
ashah-splunk d2ec703
Add Support for authorization tokens read from .splunkrc
akaila-splunk 8dea5eb
Update client.py
ashah-splunk 834f570
Update README.md
vmalaviya-splunk ff23960
chore: remove unused imports
artemrys fb1959e
Merge pull request #411 from arys-splunk/chore/remove-unused-imports
fantavlik f847b41
Update README.md
vmalaviya-splunk d4f1ba7
Merge pull request #412 from splunk/master
ashah-splunk 1ffab11
Update test_streaming_command.py
vmalaviya-splunk 809ae2a
Merge pull request #409 from splunk/DVPL-10195
ashah-splunk e6caf2c
Merge pull request #407 from splunk/DVPL-9943
ashah-splunk d6fc1a3
adding kvstore_owner as new property
ashah-splunk f958a9c
Update test_kvstore_conf.py
ashah-splunk ee65a75
reload the kvstore once owner is changed
ashah-splunk bc20898
Update client.py
ashah-splunk 4a1d31a
Merge pull request #413 from splunk/default-kvstore-owner-nobody
ashah-splunk c6a6dbc
Merge pull request #406 from splunk/fix-mod-inputs-examples
fantavlik 828fc1e
Merge commit '4a1d31a9c5bd70759c19bf6628951810eab82ce2' into fix-sear…
fantavlik 68b8ec3
Merge pull request #405 from splunk/fix-searchcommands_app-example
fantavlik be4e2bf
Merge pull request #408 from splunk/add-search-mode-example
fantavlik 099b7fa
release-1.6.18 changes
vmalaviya-splunk ae709be
Update CHANGELOG.md
vmalaviya-splunk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,17 @@ | ||
| # Splunk Enterprise SDK for Python Changelog | ||
|
|
||
| ## Version 1.6.18 | ||
|
|
||
| ### Bug fixes | ||
| * [#405](https://github.com/splunk/splunk-sdk-python/pull/405) Fix searchcommands_app example | ||
| * [#406](https://github.com/splunk/splunk-sdk-python/pull/406) Fix mod inputs examples | ||
| * [#407](https://github.com/splunk/splunk-sdk-python/pull/407) Modified Streaming and Generating Custom Search Command | ||
|
|
||
| ### Minor changes | ||
| * [#408](https://github.com/splunk/splunk-sdk-python/pull/408) Add search mode example | ||
| * [#409](https://github.com/splunk/splunk-sdk-python/pull/409) Add Support for authorization tokens read from .splunkrc | ||
| * [#413](https://github.com/splunk/splunk-sdk-python/pull/413) Default kvstore owner to nobody | ||
|
||
|
|
||
| ## Version 1.6.17 | ||
|
|
||
| ### Bug fixes | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| splunk-sdk-python github_forks example | ||
| ======================================== | ||
|
|
||
| This app provides an example of a modular input that generates the number of repository forks according to the Github API based on the owner and repo_name provided by the user during setup of the input. | ||
|
|
||
| To run this example locally run `SPLUNK_VERSION=latest docker compose up -d` from the root of this repository which will mount this example alongside the latest version of splunklib within `/opt/splunk/etc/apps/github_forks` and `/opt/splunk/etc/apps/github_forks/lib/splunklib` within the `splunk` container. | ||
|
|
||
| Once the docker container is up and healthy log into the Splunk UI and setup a new `Github Repository Forks` input by visiting this page: http://localhost:8000/en-US/manager/github_forks/datainputstats and selecting the "Add new..." button next to the Local Inputs > Random Inputs. Enter values for a Github Repository owner and repo_name, for example owner = `splunk` repo_name = `splunk-sdk-python`. | ||
|
|
||
| NOTE: If no Github Repository Forks input appears then the script is likely not running properly, see https://docs.splunk.com/Documentation/SplunkCloud/latest/AdvancedDev/ModInputsDevTools for more details on debugging the modular input using the command line and relevant logs. | ||
|
|
||
| Once the input is created you should be able to see an event when running the following search: `source="github_forks://*"` the event should contain fields for `owner` and `repository` matching the values you input during setup and then a `fork_count` field corresponding to the number of forks the repo has according to the Github API. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| splunk-sdk-python random_numbers example | ||
| ======================================== | ||
|
|
||
| This app provides an example of a modular input that generates a random number between the min and max values provided by the user during setup of the input. | ||
|
|
||
| To run this example locally run `SPLUNK_VERSION=latest docker compose up -d` from the root of this repository which will mount this example alongside the latest version of splunklib within `/opt/splunk/etc/apps/random_numbers` and `/opt/splunk/etc/apps/random_numbers/lib/splunklib` within the `splunk` container. | ||
|
|
||
| Once the docker container is up and healthy log into the Splunk UI and setup a new `Random Numbers` input by visiting this page: http://localhost:8000/en-US/manager/random_numbers/datainputstats and selecting the "Add new..." button next to the Local Inputs > Random Inputs. Enter values for the `min` and `max` values which the random number should be generated between. | ||
|
|
||
| NOTE: If no Random Numbers input appears then the script is likely not running properly, see https://docs.splunk.com/Documentation/SplunkCloud/latest/AdvancedDev/ModInputsDevTools for more details on debugging the modular input using the command line and relevant logs. | ||
|
|
||
| Once the input is created you should be able to see an event when running the following search: `source="random_numbers://*"` the event should contain a `number` field with a float between the min and max specified when the input was created. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import sys | ||
| import os | ||
| # import from utils/__init__.py | ||
| sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..")) | ||
| from utils import * | ||
| import time | ||
| from splunklib.client import connect | ||
| from splunklib import results | ||
| from splunklib import six | ||
|
|
||
| def cmdline(argv, flags, **kwargs): | ||
| """A cmdopts wrapper that takes a list of flags and builds the | ||
| corresponding cmdopts rules to match those flags.""" | ||
| rules = dict([(flag, {'flags': ["--%s" % flag]}) for flag in flags]) | ||
| return parse(argv, rules, ".splunkrc", **kwargs) | ||
|
|
||
| def modes(argv): | ||
| opts = cmdline(argv, []) | ||
| kwargs_splunk = dslice(opts.kwargs, FLAGS_SPLUNK) | ||
| service = connect(**kwargs_splunk) | ||
|
|
||
| # By default the job will run in 'smart' mode which will omit events for transforming commands | ||
| job = service.jobs.create('search index=_internal | head 10 | top host') | ||
| while not job.is_ready(): | ||
| time.sleep(0.5) | ||
| pass | ||
| reader = results.ResultsReader(job.events()) | ||
| # Events found: 0 | ||
| print('Events found with adhoc_search_level="smart": %s' % len([e for e in reader])) | ||
|
|
||
| # Now set the adhoc_search_level to 'verbose' to see the events | ||
| job = service.jobs.create('search index=_internal | head 10 | top host', adhoc_search_level='verbose') | ||
| while not job.is_ready(): | ||
| time.sleep(0.5) | ||
| pass | ||
| reader = results.ResultsReader(job.events()) | ||
| # Events found: 10 | ||
| print('Events found with adhoc_search_level="verbose": %s' % len([e for e in reader])) | ||
|
|
||
| if __name__ == "__main__": | ||
| modes(sys.argv[1:]) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.