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!

Federated Search for Amazon S3 | Key Use Cases to Streamline Compliance Workflows

Modern business operations are supported by data compliance. As regulations evolve, organizations must ...

New Dates, New City: Save the Date for .conf25!

Wake up, babe! New .conf25 dates AND location just dropped!! That's right, this year, .conf25 is taking place ...

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud

Introduction to Splunk Observability Cloud - Building a Resilient Hybrid Cloud  In today’s fast-paced digital ...