I am trying to send the gelf java logs to my graylog servers.
when i tried to send the logs manually from command line I am getting connection failure message.
> echo -n -e '{ "version": "1.1", "host": "example.org", "short_message": "A short message", "level": 5, "_some_info": "foo" }'"\0" | nc -w5 10.140.127.133 12202
> Ncat: Connection refused.
>
> curl -X POST -H 'Content-Type: application/json' -d '{ "version": "1.1", "host": "example.org", "short_message": "A short message", "level": 5, "_some_info": "foo" }' 'https://10.140.127.133:12201/gelf'
it seems i am not able to connect on ‘https://10.140.127.133:12201/gelf’.
I have configured the log4j.xml on mu application server side.
<appender name="graylog2_import" class="org.graylog2.log.GelfAppender">
<param name="graylogHost" value="xxxxxxxxxx"/>
<param name="graylogPort" value="12202"/>
<param name="originHost" value="xxxxxxxxxxx"/>
<param name="extractStacktrace" value="true"/>
<param name="addExtendedInformation" value="true"/>
<param name="facility" value="gelf-java"/>
<param name="Threshold" value="DEBUG"/>
<param name="additionalFields" value="{'environment': 'xxxxxxxxxx', 'application': 'glassfish', 'buildingblock': 'xxxxxxxx', 'logtype': 'import'}"/>
</appender>
and defined the logger.
Now i am not sure what i am missing to send the gelf java logs from my glassfish application.