Getting Data In

Why is my scripted input excluded from the results?

Simeon
Splunk Employee
Splunk Employee

I am running a scripted input that outputs the "apachectl -S" configuration. I have set the proper permissions, tested it via "splunk cmd ", and found that it will index other information if added to the script. I noticed that my splunkd.log file shows the following:

07-14-2010 17:26:03.881 ERROR ExecProcessor - message from "/home/splunk/etc/apps/search/bin/apachectl.sh" httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
07-14-2010 17:26:03.881 ERROR ExecProcessor - message from "/home/splunk/etc/apps/search/bin/apachectl.sh" VirtualHost configuration:
07-14-2010 17:26:03.881 ERROR ExecProcessor - message from "/home/splunk/etc/apps/search/bin/apachectl.sh" wildcard NameVirtualHosts and _default_ servers:
07-14-2010 17:26:03.881 ERROR ExecProcessor - message from "/home/splunk/etc/apps/search/bin/apachectl.sh" _default_:443          127.0.0.1 (/etc/httpd/conf.d/ssl.conf:81)
07-14-2010 17:26:03.881 ERROR ExecProcessor - message from "/home/splunk/etc/apps/search/bin/apachectl.sh" Syntax OK

Is there a reason why this particular script output is not showing up?

Tags (1)
1 Solution

Simeon
Splunk Employee
Splunk Employee

For the above scenario, the "apachectl -S" command is writing to standard error and not standard out. When running the script manually, everything looks okay since it is sent directly to the terminal. To fix this problem, you must edit your script to send the standard error data to the standard out. To do this, add "2>&1" to the command:

apachectl -S 2>&1

View solution in original post

Simeon
Splunk Employee
Splunk Employee

For the above scenario, the "apachectl -S" command is writing to standard error and not standard out. When running the script manually, everything looks okay since it is sent directly to the terminal. To fix this problem, you must edit your script to send the standard error data to the standard out. To do this, add "2>&1" to the command:

apachectl -S 2>&1
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Quantify Your Splunk Investment Impact: Introducing Savings Metrics to Value Insights

Building on the foundation established in our initial Value Insights releases, we are introducing the Savings ...

Event Series: Telemetry Pipeline Management

Balancing Scale and Spend: Gaining Control Over High-Volume Metrics in Splunk Observability Cloud As ...

Kick the Tires Before You Commit: A Hands-On Tour of the Splunk Observability Cloud ...

Evaluating an enterprise observability platform usually goes like this: fill out a form, get a free trial with ...