Monitoring Splunk

Monitor remote host logs?

chaga
New Member

I can't understand that.
How to Splunk monitor log from remote linux log?
Universal Forwarder have been installed in the remote linux.
What I should do then?

Tags (1)
0 Karma

sandyIscream
Communicator

@chaga You should write your inputs.conf and outputs.conf

sample inputs.conf

[monitor:///filepath to monitor]
index =
sourcetype =
host = yourhostname

sample outputs.conf

Run this command to create outputs.conf /opt/splunkforwarder/bin/splunk add forward-server :port
then restart - /opt/splunkforwarder/bin/splunk restart

0 Karma

chaga
New Member

@sandyIscream i have added input and output.conf as below
[tcpout]
server = splunkserver:9997

[tcpout:default-autolb-group]
disabled = false
server = splunkserver:9997

[tcpout-server://splunkforwardserver:9997]

inputs.conf

[default]
[monitor:///var/log/messages]
index = main
sourcetype = access_common
host = splunkforwaderserver

0 Karma

sandyIscream
Communicator

Did your data started coming to your splunk instance ? @chaga

If not then let me know where exactly your are facing the issue.

0 Karma

chaga
New Member

Unfortunately, the data didnot came up. i have the following in my configuration.

i have added input and output.conf as below
[tcpout]
server = splunkserver:9997

[tcpout:default-autolb-group]
disabled = false
server = splunkserver:9997

[tcpout-server://splunkforwardserver:9997]

inputs.conf

[default]
[monitor:///var/log/messages]
index = main
sourcetype = access_common
host = splunkforwaderserver

0 Karma

chaga
New Member

Should we configure indexer also?

0 Karma

solarboyz1
Builder

Make sure the splunk user, or whatever account is running splunk, has access to read /var/log/messages.

Also, just a note, the /var/log/messages file sourcetype is normally linux_messages_syslog:
https://docs.splunk.com/Documentation/Splunk/7.0.3/Data/Listofpretrainedsourcetypes

0 Karma
Get Updates on the Splunk Community!

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...

Stay Connected: Your Guide to October Tech Talks, Office Hours, and Webinars!

What are Community Office Hours? Community Office Hours is an interactive 60-minute Zoom series where ...