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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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