forked from lerndevops/labs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configureForwarding.txt
executable file
·41 lines (27 loc) · 1.12 KB
/
configureForwarding.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Configure Forwarder where to forward the data ( before running below we need to configure the receiving on splu
nk server )
cd /opt/splunkforwarder/bin
./splunk add forward-server 172.31.7.70:5552
cd /opt/splunkforwarder/etc/system/local/
more outputs.conf
=============================================================================================================
push data to splunk
cd /opt/splunkforwarder/bin
./splunk add monitor /var/log/messages
cd /opt/splunkforwarder/etc/apps/search/local/
more inputs.conf
[monitor:///var/log/messages]
disabled = false
we can also edit input.conf file & add our monitors accordinlgy ( if we edit manaually the splunk forwarder nee
d to be restarted )
cd /opt/splunkforwarder/etc/apps/search/local/
vi inputs.conf
[monitor:///var/log/httpd/*log]
disabled = false
index=apachelogs
[monitor:///var/log/nginx/*.log]
disabled = false
index=apachelogs
sourcetype=nginx
to restart splunk forwarder
/opt/splunkforwarder/bin/splunk restart