Your session is invalid. Please login. Splunk username: bob Password: password _audit /opt/splunk/var/lib/splunk/audit/db /opt/splunk/var/lib/splunk/audit/colddb /opt/splunk/var/lib/splunk/audit/thaweddb _internal /opt/splunk/var/lib/splunk/_internaldb/db /opt/splunk/var/lib/splunk/_internaldb/colddb /opt/splunk/var/lib/splunk/_internaldb/thaweddb _introspection /opt/splunk/var/lib/splunk/_introspection/db /opt/splunk/var/lib/splunk/_introspection/colddb /opt/splunk/var/lib/splunk/_introspection/thaweddb
12.34.56.78 - - [12/Dec/2018:02:19:04 +0100] "GET http://www.example.com/index.html HTTP/1.1" 200 345 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"This corresponds to the default Varnish log format :
%h
(12.34.56.78) : remote host%l
(-) : remote logname. Always -.%u
(-) : remote user from auth%t
([12/Dec/2018:02:19:04 +0100]) : time when the request was received, in HTTP date/time format%r
(GET http://www.example.com/index.html HTTP/1.1) : first line of the request. Synthesized from other fields, so it may not be the request verbatim (details).%s
(200) : HTTP status code sent to the client%b
(345) : size of response in bytes, excluding HTTP headers%{X}i
: contents of request header X :
%{Referer}i
(-) : HTTP referer (none here)%{User-agent}i
(Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0) : the user agentresultFile='data.csv'; echo 'sourceIp,timestamp,httpMethod,url,httpVersion,httpStatusCode,responseSizeBytes,httpReferer,userAgent' > "$resultFile"; for logFile in *log*; do sed -re 's/%[0-9a-fA-F]{2}/_XX/g' -e 's/,/-COMMA-/g' -e 's/\*/-ASTERISK-/g' -e 's/%s:80/-NOIP-:80/g' -e 's/%[a-z]{1,2}/-HEX-/g' "$logFile" | awk '{printf $1","$4" "; for(i=5; i<=11; i++) {printf $i","}; for(i=12; i<=NF; i++) {printf $i" "}; print""}' | tr -d '"' >> "$resultFile"; echo -n '.'; done
Notes :%xx
. awk looks puzzled by them (not investigated the exact cause) so let's remove them, we don't need the very exact URLs anyway.,
around.*
here and there preventing fields splitting.%
in the logs. awk dislikes.After 60 days you can convert to a perpetual free license or purchase a Splunk Enterprise license to continue using the expanded functionality designed for enterprise-scale deployments.This is the version we'll install here.
Please enter an administrator username: admin Please enter a new password: password
The Splunk web interface is at http://myDebianStretchHost:8000
Systemd unit file installed at /etc/systemd/system/Splunkd.service. this is Splunkd, with a capital S
Configured as systemd managed service.
splunkd is running (PID: 1739). splunk helpers are running (PIDs: 1799 1812 1937 1997).This also supports start, stop, ...
● Splunkd.service - Systemd service file for Splunk, generated by 'splunk enable boot-start' Loaded: loaded (/etc/systemd/system/Splunkd.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2019-06-27 12:12:16 CEST; 2s ago Main PID: 27173 (splunk) Tasks: 3 (limit: 4915) Memory: 7.9M (limit: 996.4M) CPU: 1.715s CGroup: /system.slice/Splunkd.service ├─27173 /opt/splunk/bin/splunk _internal_launch_under_systemd ├─27234 sh -c btool server list general --no-log └─27235 /opt/splunk/bin/splunkd btool server list general --no-log Jun 27 12:12:18 Stretch splunk[27173]: Checking configuration... Done. Jun 27 12:12:18 Stretch splunk[27173]: Checking critical directories... Done Jun 27 12:12:18 Stretch splunk[27173]: Checking indexes...