Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8837be6
Fix jinja template bug under SA-Eventgen app
Mar 5, 2019
3a664d3
Feature timeMultiple (#141)
jmeixensperger Mar 6, 2019
65f06d3
Merge branch 'develop' into bugfix/jinja_template_bug_under_app
li-wu Mar 7, 2019
2cba4ce
Merge pull request #137 from splunk/bugfix/jinja_template_bug_under_app
li-wu Mar 7, 2019
a13e819
Update issue templates
GordonWang Mar 12, 2019
48637f2
Merge pull request #143 from splunk/dev-process-refinement
lephino Mar 12, 2019
571dbd6
changing the stanzas to produce data
Mar 12, 2019
2f64665
Merge pull request #144 from splunk/cleanup
arctan5x Mar 12, 2019
03b7b91
Windbag generator/count + end=0 edge cases (#145)
jmeixensperger Mar 15, 2019
9018b34
Update docs (#146)
jmeixensperger Mar 15, 2019
a3fd0e3
Bump version
jmeixensperger Mar 15, 2019
e1e7929
add python code style lint and format
Mar 20, 2019
eacc92d
Merge pull request #147 from splunk/codeformat
li-wu Mar 21, 2019
c24f655
[Docs] update contribute docs (#148)
GordonWang Mar 22, 2019
9602895
Fix make docs bug and summary anchor link error
Mar 28, 2019
070c6e0
Merge pull request #152 from splunk/gitbookdocs
li-wu Apr 2, 2019
26f0ed2
init unittest
Mar 14, 2019
986d89f
Add more UT for config module
Mar 19, 2019
574c64c
Add more unit tests for config module
Mar 25, 2019
f0cc38b
[Build] add ut for timeparser functions
Mar 15, 2019
5cb93a6
Merge pull request #150 from splunk/unittest
li-wu Apr 4, 2019
710da6e
Pep8 (#151)
jmeixensperger Apr 4, 2019
0279c9c
Update docs
Apr 10, 2019
e3f8b17
Merge pull request #156 from splunk/docupdate
li-wu Apr 14, 2019
1a35eea
Post-PEP8 Fixes (#157)
jmeixensperger Apr 15, 2019
2a416a9
Issue 160 (#163)
arctan5x Apr 18, 2019
b67c295
Fixed timer and token (#162)
arctan5x Apr 18, 2019
ad6b942
add extendIndexes feature (#154)
Yangxulight Apr 18, 2019
da1fb02
Test fix (#168)
arctan5x Apr 18, 2019
7139cb5
Update version.json
arctan5x Apr 18, 2019
420fea1
Merge branch 'master' into develop
arctan5x Apr 18, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
name: Run Tests
command: |
make test
no_output_timeout: 30m
- store_test_results:
path: /home/circleci/project/tests/test-reports
- store_artifacts:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Bug report
about: Provide the details of the bug to us in order to further triage and fix
title: "[BUG]"
labels: bug
assignees: li-wu, GordonWang
assignees: lephino, arctan5x, jmeixensperger, li-wu, GordonWang

---

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Feature request
about: Suggest an idea or improvement for this project
title: "[FEATURE/IMPROVEMENT]"
labels: enhancement
assignees: li-wu, GordonWang
assignees: lephino, arctan5x, jmeixensperger, li-wu, GordonWang

---

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ stage/
local/
eventgen_wsgi.conf
*.log
dist
*.egg-info
**/*.tgz
.cache
Expand All @@ -27,3 +26,4 @@ _book
*.result
venv/*
*.log.*
splunk_eventgen-*/
2 changes: 2 additions & 0 deletions .yapfignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
splunk_eventgen/lib/concurrent
splunk_eventgen/lib/requests_futures
91 changes: 4 additions & 87 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,99 +1,16 @@
# Contributing

When contributing to this repository, please first discuss the change you wish to make via issue,
email, or any other method with the owners of this repository before making a change.
When contributing to this repository, please read over the [contributing document](http://splunk.github.io/eventgen/CONTRIBUTE.html). [Create a issue](http://splunk.github.io/eventgen/FILE_ISSUES.html) to discuss your demand and follow the [guidelines](http://splunk.github.io/eventgen/CONTRIBUTE_CODE.html) to make the code change

Please note we have a code of conduct, please follow it in all your interactions with the project.
Please note we have a [code of conduct](http://splunk.github.io/eventgen/CONTRIBUTE.html#code-of-conduct), please follow it in all your interactions with the project.

## Pull Request Process

1. Ensure any install or build dependencies are removed before the end of the layer when doing a
build.
2. Update the splunk_eventgen/README/eventgen.conf.spec with details of changes to the interface, this includes new environment
variables, exposed ports, useful file locations and container parameters. Also, update the necessary documentation.
3. Increase the version numbers in splunk_eventgen/version.json. The versioning scheme we use is [SemVer](http://semver.org/).
4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
do not have permission to do that, you may request the second reviewer to merge it for you.

## Code of Conduct

### Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

### Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

### Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

### Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

### Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at tonyl@splunk.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

### Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

### Past / Active(marked as *) Contributors
bbingham*
arctan5x*
jmeixensperger*
li-wu*
GordonWang*
coccyx
Jaykul
allanwsplk
Expand Down
21 changes: 10 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ XLARGE ?= 'tests/xlarge'
NEWLY_ADDED_PY_FILES = $(shell git ls-files -o --exclude-standard | grep -E '\.py$$')
CHANGED_ADDED_PY_FILES = $(shell git ls-files -mo --exclude-standard | grep -E '\.py$$')

.PHONY: tests, lint, format
.PHONY: tests, lint, format, docs

all: egg

Expand All @@ -24,7 +24,7 @@ image: setup_eventgen egg
rm splunk_eventgen/default/eventgen_engine.conf || true
docker build -f dockerfiles/Dockerfile . -t eventgen

test: egg image test_helper test_collection_cleanup
test: egg image test_helper run_tests test_collection_cleanup

test_helper:
docker run -d -t --net=host -v /var/run/docker.sock:/var/run/docker.sock --name ${EVENTGEN_TEST_IMAGE} eventgen:latest cat
Expand All @@ -41,15 +41,10 @@ test_helper:
@echo 'Installing test requirements'
docker exec -i ${EVENTGEN_TEST_IMAGE} /bin/sh -c "pip install -r $(shell pwd)/tests/requirements.txt" || true

run_tests:
@echo 'Running the super awesome tests'
docker exec -i ${EVENTGEN_TEST_IMAGE} /bin/sh -c "cd $(shell pwd); python tests/run_tests.py ${SMALL} ${MEDIUM} ${LARGE} ${XLARGE}" || true

echo 'Collecting results'
#TODO: Should be paramaterized or generalized so that we don't need to add this here
docker cp ${EVENTGEN_TEST_IMAGE}:$(shell pwd)/tests_results.xml tests_results.xml || echo "no tests_results.xml" || true

docker stop ${EVENTGEN_TEST_IMAGE} || true

test_collection_cleanup:
@echo 'Collecting results'
#TODO: Should be paramaterized or generalized so that we don't need to add this here
Expand Down Expand Up @@ -97,9 +92,7 @@ run_controller: eg_network
docker run --name eg_controller --network eg_network -d -p 5672:5672 -p 15672:15672 -p 9500:9500 eventgen:latest controller

docs:
npm install -g gitbook-serve
cd docs/
gitbookserve
cd docs/; bundle install; bundle exec jekyll serve

build_spl: clean
python -m splunk_eventgen build --destination ./
Expand All @@ -124,3 +117,9 @@ else
@yapf -i $(NEWLY_ADDED_PY_FILES)
endif

lint-all:
@flake8 .

format-all:
@isort -rc .
@yapf -r -i .
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ The Splunk Event Generator is licensed under the Apache License 2.0. Details can
### Support

This software is released as-is. Splunk provides no warranty and no support on this software.
If you have any issues with the software, please file an issue (https://github.com/splunk/eventgen/issues/new)
If you have any issues with the software, please read over the [guidelines](http://splunk.github.io/eventgen/FILE_ISSUES.md) and file an issue.
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_site
6 changes: 3 additions & 3 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ These requirements have led to this new architecture in verison 4. Eventgen is
* Handles flattening of configs from global defaults and individual config files
* Loading Plugins
* Load plugins from the `lib/plugins` directory or App's `bin` directories, with three types of Plugins: Rating, Generator and Output
* For more detail on writing plugins, see the [Plugins documentation](Plugins.md)
* For more detail on writing plugins, see the [Plugins documentation](PLUGINS.md)
* Creating timers for each sample
* For samples with queueable generators (meaning we can have multiple threads generating sample simultaneously), the timer wakes up every interval and puts a task in the queue to be generated by a generator worker
* For samples which are not queueable (meaning we can only run one simultaneous thread of the generator), the thread runs the generator plugin single threaded and handles sleeping the proper amount to manage intervals.
Expand All @@ -38,13 +38,13 @@ Depending on tunable parameters, these can be threads or processes and can eithe

# Scaling

This queue architecture allows significant advantages by distributing processing. At each timer execution a generation job gets put in the queue. This queue by default is a Python Queue (either in queue.Queue or multiprocessing.Queue). For details, see the [Performance guide](Performance.md)
This queue architecture allows significant advantages by distributing processing. At each timer execution a generation job gets put in the queue. This queue by default is a Python Queue (either in queue.Queue or multiprocessing.Queue). For details, see the [Performance guide](PERFORMANCE.md)

# Testing

Given the complexity and the reimplementation of a number of features during refactors, we've also built out a number of test examples. We currently don't have test scripts built with assertions etc, but there are a series of configs and samples under the `tests/` directory which should demonstrate and allow testing of basic functionality. Check out the ``tests/sample_eventgen_conf`` directory in the project for commonly-used plugins and configurations. You can execute a test config by doing:

python bin/eventgen.py generate tests/<dir>/<test>.conf
python -m splunk_eventgen generate tests/<dir>/<test>.conf

# Server-Controller Architecture

Expand Down
Loading