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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...