-
Notifications
You must be signed in to change notification settings - Fork 180
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
regex stanza bugfix #365
regex stanza bugfix #365
Changes from 8 commits
2ae86b7
ba184d5
08cb262
c078285
473fb6d
5decde0
3bc7cb7
2f87c06
1f49565
945a4a1
16eba0f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,12 +51,15 @@ test_helper: | |
@echo 'Installing docker-compose' | ||
bash install_docker_compose.sh | ||
|
||
@echo 'Build a docker image' | ||
docker build -t provision_splunk:latest -f tests/large/provision/Dockerfile tests/large/provision | ||
|
||
@echo 'Start container with splunk' | ||
docker-compose -f tests/large/provision/docker-compose.yml up & | ||
|
||
sleep 120 | ||
@echo 'Provision splunk container' | ||
docker-compose -f tests/large/provision/docker-compose.yml exec -T splunk sh -c 'cd /opt/splunk;./provision.sh;/opt/splunk/bin/splunk enable listen 9997 -auth admin:changeme;/opt/splunk/bin/splunk add index test_0;/opt/splunk/bin/splunk add index test_1;/opt/splunk/bin/splunk restart' | ||
docker exec --user splunk provision_splunk_1 sh -c 'cd /opt/splunk;./provision.sh;./add_httpevent_collector.sh;/opt/splunk/bin/splunk enable listen 9997 -auth admin:changeme;/opt/splunk/bin/splunk add index test_0;/opt/splunk/bin/splunk add index test_1;/opt/splunk/bin/splunk restart' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That only works for the build command, so we'd still have to build the image either way (I assume this is the extra step you are referring to). |
||
|
||
run_tests: | ||
@echo 'Running the super awesome tests' | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[timeorder.*] | ||
sampleDir = ../sample | ||
mode = sample | ||
sampletype = csv | ||
outputMode = stdout | ||
end = 1 | ||
|
||
token.0.token = \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} | ||
token.0.replacementType = timestamp | ||
token.0.replacement = %Y-%m-%d %H:%M:%S | ||
|
||
token.1.token = @@integer | ||
token.1.replacementType = random | ||
token.1.replacement = integer[0:10] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[sample\d] | ||
sampleDir = ../sample | ||
mode = sample | ||
earliest = -15s | ||
sampletype = raw | ||
outputMode = stdout | ||
end = 1 | ||
|
||
token.0.token = \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} | ||
token.0.replacementType = timestamp | ||
token.0.replacement = %Y-%m-%d %H:%M:%S | ||
|
||
token.1.token = @@integer | ||
token.1.replacementType = random | ||
token.1.replacement = integer[0:10] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[sample.*] | ||
sampleDir = ../sample | ||
mode = sample | ||
earliest = -15s | ||
sampletype = raw | ||
outputMode = stdout | ||
end = 1 | ||
|
||
token.0.token = \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2} | ||
token.0.replacementType = timestamp | ||
token.0.replacement = %Y-%m-%d %H:%M:%S | ||
|
||
token.1.token = @@integer | ||
token.1.replacementType = random | ||
token.1.replacement = integer[0:10] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
FROM splunk/splunk:7.0.3-monitor | ||
FROM splunk/splunk:7.3-debian | ||
|
||
# https://superuser.com/questions/1423486/issue-with-fetching-http-deb-debian-org-debian-dists-jessie-updates-inrelease | ||
RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list | ||
|
||
RUN apt-get update | ||
RUN sudo apt-get update | ||
|
||
RUN echo "installing docker dependencies and development tools" && \ | ||
apt-get --assume-yes install curl vim | ||
sudo apt-get --assume-yes install curl vim | ||
|
||
COPY provision.sh /opt/splunk/ | ||
COPY ["provision.sh", "add_httpevent_collector.sh", "/opt/splunk/"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
HTTP_INPUTS_PATH=/opt/splunk/etc/apps/search/local/inputs.conf | ||
echo "[http://test]" >> $HTTP_INPUTS_PATH | ||
echo "disabled = 0" >> $HTTP_INPUTS_PATH | ||
echo "token = 00000000-0000-0000-0000-000000000000" >> $HTTP_INPUTS_PATH | ||
echo "indexes = main,test_0,test_1" >> $HTTP_INPUTS_PATH |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ version: "3.3" | |
services: | ||
splunk: | ||
hostname: eventgensplunk | ||
build: . | ||
image: provision_splunk:latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since docker-compose is not used, I suppose |
||
ports: | ||
- 8000:8000 | ||
- 8089:8089 | ||
|
@@ -12,8 +12,10 @@ services: | |
SPLUNK_START_ARGS: --answer-yes --no-prompt --accept-license | ||
# add `SHELL` env variable to make the `dircolors` happy | ||
SHELL: /bin/bash | ||
SPLUNK_PASSWORD: changeme | ||
volumes: | ||
# the `docker` command in guest can talk to host docker daemon | ||
- "/var/run/docker.sock:/var/run/docker.sock" | ||
# to make terminal colorful | ||
tty: true | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
2014-01-04 20:00:00 WINDBAG Event 1 of 12 randint @@integer | ||
2014-01-04 20:00:01 WINDBAG Event 2 of 12 randint @@integer | ||
2014-01-04 20:00:02 WINDBAG Event 3 of 12 randint @@integer | ||
2014-01-04 20:00:03 WINDBAG Event 4 of 12 randint @@integer | ||
2014-01-04 20:00:03 WINDBAG Event 5 of 12 randint @@integer | ||
2014-01-04 20:00:04 WINDBAG Event 6 of 12 randint @@integer | ||
2014-01-04 20:00:05 WINDBAG Event 7 of 12 randint @@integer | ||
2014-01-04 20:00:06 WINDBAG Event 8 of 12 randint @@integer | ||
2014-01-04 20:00:08 WINDBAG Event 9 of 12 randint @@integer | ||
2014-01-04 20:00:20 WINDBAG Event 10 of 12 randint @@integer | ||
2014-01-04 20:00:21 WINDBAG Event 11 of 12 randint @@integer | ||
2014-01-04 20:00:21 WINDBAG Event 12 of 12 randint @@integer |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
2014-01-04 20:00:00 WINDBAG Event 1 of 12 randint @@integer | ||
2014-01-04 20:00:01 WINDBAG Event 2 of 12 randint @@integer | ||
2014-01-04 20:00:02 WINDBAG Event 3 of 12 randint @@integer | ||
2014-01-04 20:00:03 WINDBAG Event 4 of 12 randint @@integer | ||
2014-01-04 20:00:03 WINDBAG Event 5 of 12 randint @@integer | ||
2014-01-04 20:00:04 WINDBAG Event 6 of 12 randint @@integer | ||
2014-01-04 20:00:05 WINDBAG Event 7 of 12 randint @@integer | ||
2014-01-04 20:00:06 WINDBAG Event 8 of 12 randint @@integer | ||
2014-01-04 20:00:08 WINDBAG Event 9 of 12 randint @@integer | ||
2014-01-04 20:00:20 WINDBAG Event 10 of 12 randint @@integer | ||
2014-01-04 20:00:21 WINDBAG Event 11 of 12 randint @@integer | ||
2014-01-04 20:00:21 WINDBAG Event 12 of 12 randint @@integer |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
_time,_raw,index,host,source,sourcetype | ||
2015-08-18T16:28:54.695-0700,"127.0.0.1 - admin [18/Aug/2015:16:28:54.695 -0700] ""GET /en-US/api/shelper?snippet=true&snippetEmbedJS=false&namespace=search&search=search+index%3D_internal+%7C+fields+_time%2C+_raw%2C+index%2C+host%2C+source%2C+sourcetype+&useTypeahead=true&useAssistant=true&showCommandHelp=true&showCommandHistory=true&showFieldInfo=false&_=1439940537886 HTTP/1.1"" 200 994 ""https://host5.foobar.com:8000/en-US/app/search/search?q=search%20index%3D_internal%20%7C%20fields%20_time%2C%20_raw%2C%20index%2C%20host%2C%20source%2C%20sourcetype&sid=1439940529.1846224&earliest=&latest="" ""Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36"" - 55d3bfb6b17f7ff8270d50 33ms",_internal,host5.foobar.com,/usr/local/bamboo/itsi-demo/local/splunk/var/log/splunk/web_access.log,splunk_web_access | ||
2015-08-18T16:28:54.569-0700,"2015-08-18 16:28:54,569 INFO streams_utils:24 - utils::readAsJson:: /usr/local/bamboo/itsi-demo/local/splunk/etc/apps/splunk_app_stream/local/apps",_internal,host5.foobar.com,/usr/local/bamboo/itsi-demo/local/splunk/var/log/splunk/splunk_app_stream.log,splunk_app_stream.log | ||
2015-08-18T16:28:54.568-0700,"2015-08-18 16:28:54,568 INFO streams_utils:74 - create dir /usr/local/bamboo/itsi-demo/local/splunk/etc/apps/splunk_app_stream/local/",_internal,host5.foobar.com,/usr/local/bamboo/itsi-demo/local/splunk/var/log/splunk/splunk_app_stream.log,splunk_app_stream.log | ||
2015-08-18T16:28:54.564-0700,"127.0.0.1 - - [18/Aug/2015:16:28:54.564 -0700] ""GET /en-us/custom/splunk_app_stream/ping/ HTTP/1.1"" 200 311 """" """" - 55d3bfb6907f7ff805f710 5ms",_internal,host5.foobar.com,/usr/local/bamboo/itsi-demo/local/splunk/var/log/splunk/web_access.log,splunk_web_access | ||
2015-08-18T16:28:52.798-0700,"10.160.255.115 - admin [18/Aug/2015:16:28:52.798 -0700] ""GET /en-US/splunkd/__raw/servicesNS/nobody/search/search/jobs/1439940529.1846224/summary?output_mode=json&min_freq=0&_=1439940537880 HTTP/1.1"" 200 503 ""https://host5.foobar.com:8000/en-US/app/search/search?q=search%20index%3D_internal%20%7C%20fields%20_time%2C%20_raw%2C%20index%2C%20host%2C%20source%2C%20sourcetype&sid=1439940529.1846224&earliest=&latest="" ""Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36"" - 9f802569d5c3d77d468e897d34f8969f 6ms",_internal,host5.foobar.com,/usr/local/bamboo/itsi-demo/local/splunk/var/log/splunk/splunkd_ui_access.log,splunkd_ui_access | ||
2015-08-18T16:28:52.798-0700,"10.160.255.115 - admin [18/Aug/2015:16:28:52.798 -0700] ""GET /en-US/splunkd/__raw/services/search/jobs/1439940529.1846224/timeline?offset=0&count=1000&_=1439940537881 HTTP/1.1"" 200 349 ""https://host5.foobar.com:8000/en-US/app/search/search?q=search%20index%3D_internal%20%7C%20fields%20_time%2C%20_raw%2C%20index%2C%20host%2C%20source%2C%20sourcetype&sid=1439940529.1846224&earliest=&latest="" ""Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36"" - 9f802569d5c3d77d468e897d34f8969f 4ms",_internal,host5.foobar.com,/usr/local/bamboo/itsi-demo/local/splunk/var/log/splunk/splunkd_ui_access.log,splunkd_ui_access | ||
2015-08-18T16:28:52.754-0700,"10.160.255.115 - admin [18/Aug/2015:16:28:52.754 -0700] ""GET /en-US/splunkd/__raw/servicesNS/nobody/search/search/jobs/1439940529.1846224?output_mode=json&_=1439940537879 HTTP/1.1"" 200 1543 ""https://host5.foobar.com:8000/en-US/app/search/search?q=search%20index%3D_internal%20%7C%20fields%20_time%2C%20_raw%2C%20index%2C%20host%2C%20source%2C%20sourcetype&sid=1439940529.1846224&earliest=&latest="" ""Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36"" - 9f802569d5c3d77d468e897d34f8969f 4ms",_internal,host5.foobar.com,/usr/local/bamboo/itsi-demo/local/splunk/var/log/splunk/splunkd_ui_access.log,splunkd_ui_access | ||
2015-08-18T16:28:52.270-0700,"2015-08-18 16:28:52,270 ERROR pid=16324 tid=MainThread file=__init__.py:execute:957 | Execution failed: [HTTP 401] Client is not authenticated | ||
2015-08-18T16:28:52.268-0700,"127.0.0.1 - - [18/Aug/2015:16:28:52.268 -0700] ""GET /services/shcluster/config/config HTTP/1.0"" 401 148 - - - 0ms",_internal,host5.foobar.com,/usr/local/bamboo/itsi-demo/local/splunk/var/log/splunk/splunkd_access.log,splunkd_access | ||
2015-08-18T16:28:52.247-0700,"2015-08-18 16:28:52,247 INFO pid=16324 tid=MainThread file=__init__.py:execute:906 | Execute called",_internal,host5.foobar.com,/usr/local/bamboo/itsi-demo/local/splunk/var/log/splunk/python_modular_input.log,python_modular_input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@li-wu the docker-compose is still used here