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!

Now Available: Cisco Talos Threat Intelligence Integrations for Splunk Security Cloud ...

At .conf24, we shared that we were in the process of integrating Cisco Talos threat intelligence into Splunk ...

Preparing your Splunk Environment for OpenSSL3

The Splunk platform will transition to OpenSSL version 3 in a future release. Actions are required to prepare ...

Easily Improve Agent Saturation with the Splunk Add-on for OpenTelemetry Collector

Agent Saturation What and Whys In application performance monitoring, saturation is defined as the total load ...