380 likes | 959 Views
System Administration of Splunk. Take the sh out of IT. What is it?. Search and analysis engine Google like search of your log data. Versions. Free 500MB/day Reporting Ad-hoc search Enterprise (all above and) 500MB/day and more! Access controls Distributed Search, Load Balancing
E N D
System Administration of Splunk Take the sh out of IT.
What is it? • Search and analysis engine • Google like search of your log data
Versions • Free • 500MB/day • Reporting • Ad-hoc search • Enterprise (all above and) • 500MB/day and more! • Access controls • Distributed Search, Load Balancing • Monitoring & Alerting
OS Supported • Windows (32 & 64-bit) • Linux • Solaris • OSX • FreeBSD • AIX • HP-UX
Two parts of Splunk • Splunkd • Does all the heavy lifting. • Indexes all files • Controls Access to data • Core component • SplunkWeb • User interface to the data • CherryPY web server
Two types of forwarder • Normal Forwarding • Lightweight Forwarding • Only difference is Lightweight disables SplunkWeb
Setup 1Single Server • Server 1 • Install Splunkd and SplunkWeb
Configuration of Server 1 • Via WebGUI under Manager tab • Add Receiver Port to enable forwarders
Setup 2Forwarder Setup (most common) • Server1 • Install Splunkd and SplunkWeb • ServerX • Install Splunkd
Configuration of ServerX • Via inputs.conf file and install script • Or CLI • Splunk add forward-server server1:9500 –auth admin:changeme (or ServerY if using a proxy type forwarding system) • Splunk add monitor E:\logs\W3SVC259463726 –index=SaaSIndex1 [default] host = ServerX [WinEventLog:Security] index = SaaSIndex1 disabled = 0 start_from = oldest current_only = 0 evt_resolve_ad_obj = 1 checkpointInterval = 5 [monitor://E:\logs\W3SVC259463726] _blacklist=(archive) disabled = false index = SaaSIndex1 SPLUNK\etc\system\local\inputs.conf
Setup 3Proxy Forwarder • Server 1 • Install Splunkd and SplunkWeb • ServerX • Install Splunkd • ServerY • Install Splunkd
Configuration of ServerY • Same as other server for local log file indexing • Need to setup to proxy traffic [pipeline:tcp] disabled = true [pipeline:udp] disabled = false SPLUNK\etc\apps\SplunkLightForwarder\local\default-mode.conf
Script to install on windows @echo off cls echo ========================== echo Installation started echo ========================== setlocal IF "%PROCESSOR_ARCHITECTURE%" == "AMD64" goto b64 IF "%PROCESSOR_ARCHITEW6432%" == "AMD64" goto b64 :b32 set SPLUNK_MSI=E:\Splunk\splunk-4.0.9-74233-x86-release.msi goto endb6432 :b64 set SPLUNK_MSI=E:\Splunk\splunk-4.0.9-74233-x64-release.msi exit :endb6432 set LOC=%ProgramFiles%\Splunk msiexec.exe /i "%SPLUNK_MSI%" INSTALLDIR="%LOC%" LAUNCHSPLUNK=0 SPLUNK_APP="" AUTOSTARTSERVICE=1 /QUIET xcopy etc "%LOC%\etc" /s /f /y pushd "%LOC%\bin\" splunk clean eventdata sample -f move "%LOC%\etc\splunk-forwarder.license" "%LOC%\etc\splunk.license" splunk restart splunk add index saas_dev -auth admin:changeme splunk add index saas_admin -auth admin:changeme splunk enable app SplunkLightForwarder -auth admin:changeme splunk add forward-server server1.mydomain.com:9500 -auth admin:changeme splunk stop
Key Things to Remember! • Never modify files in the default directories • When using critical network links between sites use the limits.conf file to restrict Splunk • If you don’t know how something is working check the splunk site. Lots of great articles