Splunk Enterprise

ERROR Unable to send HTTP in appender

vigneshwaran280
New Member
status = ON
name = log4j
monitorInterval=30

rootLogger.level = OFF

property.defaultUrl = http://localhost:8000
property.defaultToken = 321d1411-04a4-4179-8f49-6ce502f1236a
property.defaultPattern = %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n

appender.console.type = Console
appender.console.name = console
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %d [%t] %-5p %c - %m%n

appender.lightconsole.type = Console
appender.lightconsole.name = lightconsole
appender.lightconsole.layout.type = PatternLayout
appender.lightconsole.layout.pattern = %m%n


loggers = DATABASE

logger.DATABASE.name = DATABASE
logger.DATABASE.level = INFO
logger.DATABASE.additivity = false
logger.DATABASE.appenderRefs = database
logger.DATABASE.appenderRef.database.ref = database

appenders = database

appender.database.type = http
appender.database.name = database
appender.database.url = ${defaultUrl}
appender.database.token = ${defaultToken}
appender.database.layout.type = PatternLayout
appender.database.layout.pattern = ${defaultPattern} 
With the following set up when I try to post the logs into the splunk I am getting the following error.
main ERROR Unable to send HTTP in appender [updater] java.io.IOException
public class TestSplunk {
public static final Logger direct = LogManager.getLogger("DATABASE");

    public static void main(String[] args) {
        /*
         * *Log message which has to be visible in splunk dashboard
         */
        direct.info("The following message should be displayed); 
        direct.info("!!!!!!!!!!!!!!!!!!!!!!");
}
The program which I used to post the message into the splunk Dashboard.

 

Labels (1)
0 Karma
Get Updates on the Splunk Community!

Get Inspired! We’ve Got Validation that Your Hard Work is Paying Off

We love our Splunk Community and want you to feel inspired by all your hard work! Eric Fusilero, our VP of ...

What's New in Splunk Enterprise 9.4: Features to Power Your Digital Resilience

Hey Splunky People! We are excited to share the latest updates in Splunk Enterprise 9.4. In this release we ...

Take Your Breath Away with Splunk Risk-Based Alerting (RBA)

WATCH NOW!The Splunk Guide to Risk-Based Alerting is here to empower your SOC like never before. Join Haylee ...