Deployment Architecture

When trying to monitor two logs file formal from the same directory, why is it throwing an error: Parameters must be in the form '-parameter value'?

clementros
Path Finder

Hi,

I'm trying to monitor 2 logs file format (.out & .err) from a same directory (/var/splunkdata).

I use the CLI command to execute the add monitor command :

sudo /opt/splunkforwarder/bin/splunk add monitor /var/splunkdata/*.out -index nbtktfed -sourcetype NBTKTFED.out

This command generate the following result :

Parameters must be in the form '-parameter value'

I don't know what i'm doing wrong.

Any idea ?

0 Karma
1 Solution

nickhills
Ultra Champion

try:
./splunk add monitor -source "/var/splunkdata/*.out" -index nbtktfed -sourcetype "NBTKTFED.out"

If my comment helps, please give it a thumbs up!

View solution in original post

0 Karma

nickhills
Ultra Champion

try:
./splunk add monitor -source "/var/splunkdata/*.out" -index nbtktfed -sourcetype "NBTKTFED.out"

If my comment helps, please give it a thumbs up!
0 Karma

clementros
Path Finder

Thanks you !

0 Karma

nickhills
Ultra Champion

You're welcome -source is not mandatory but sometimes I have found it useful to specify it and "quote" the paths to make it clear to Splunk what you are trying to do.
Please upvote this answer to help others in the future!
All the best.

If my comment helps, please give it a thumbs up!
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...