Refine your search:

I have a regularly scheduled job which generates a log-file which I then use my local splunk light-forwarder to send to a remote splunk instance with splunk add oneshot $LOG_FILE -sourcetype $SOURCE

This ends up requiring authentication. I know that I could hard-code a "-auth user:pass" argument into the script as well, but I'd prefer to not do that and instead be able to just disable authentication on the local host for splunk cli access. Is there a way to do this?

asked 15 Oct '10, 15:53

katzj's gravatar image

katzj
132
accept rate: 0%

edited 15 Oct '10, 16:03

ftk's gravatar image

ftk ♦
6.2k419

I actually think this would be useful as well, something like kerberos's kadmin.local binary.

(15 Oct '10, 19:53) thartmann

2 Answers:

Just dump the file in a batch directory such as $SPLUNK_HOME/var/spool/splunk. This does not require authentication, and you can control the sourcetype, source, etc with dynamic metadata assignment:

http://www.splunk.com/base/Documentation/latest/Admin/Assignmetadatatoeventsdynamically

link

answered 13 Nov '10, 00:36

araitz's gravatar image

araitz ♦♦
7.2k2516
accept rate: 38%

I do not think you can disable authentication. You have two options that i can think of:

  • ./splunk login before you run the script
  • use:
    export SPLUNK_USERNAME=admin
    export SPLUNK_PASSWORD=changeme

cheers!
.gz

link

answered 15 Oct '10, 18:00

Genti's gravatar image

Genti ♦
3.5k122
accept rate: 36%

Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×25

Asked: 15 Oct '10, 15:53

Seen: 948 times

Last updated: 13 Nov '10, 00:36

Copyright © 2005-2012 Splunk, Inc. All rights reserved.