These are chat archives for mp911de/logstash-gelf

22nd
Jul 2016
@marinhodev Bruno Marinho
@bdmstyle
Jul 22 2016 19:18
hello guys
I'm using
<appender name="gelf" class="biz.paluch.logging.gelf.logback.GelfLogbackAppender">
<host>udp:some</host>
<port>12201</port>
<version>1.1</version>
<facility>offers-page</facility>
<extractStackTrace>true</extractStackTrace>
<filterStackTrace>false</filterStackTrace>
<timestampPattern>yyyy-MM-dd HH:mm:ss,SSSS</timestampPattern>
<mdcFields>unique</mdcFields>
<includeFullMdc>true</includeFullMdc>
<mdcProfiling>true</mdcProfiling>
</appender>
my server are in amazon and almost all is ok
but for example when type
"hostname" at server i get "some.photongroup.cloud"
but in kibana logs i get
{
"_index": "photongroup-2016.07.22",
"_type": "logs",
"_id": "AVYUDhpYuR5avmFjg1By",
"_score": null,
"_source": {
"level": 6,
"host": "ip-10-0-1-251.ec2.internal",
"facility": "offers-page",
"@version": "1",
"@timestamp": "2016-07-22T19:21:22.628Z",
"source_host": "52.20.185.88",
"message": "Notifying Hubspot",
"Severity": "INFO",
"unique": "24plr1msts2b1el7qzszmahgk",
"LoggerName": "br.com.healwheel.common.websites.controller.progressive.ProgressiveController",
"Time": "2016-07-22 19:21:22,0628",
"SourceSimpleClassName": "ProgressiveController",
"SourceMethodName": "notifyHubSpot",
"SourceLineNumber": 826,
"SourceClassName": "br.com.healwheel.common.websites.controller.progressive.ProgressiveController",
"Thread": "qtp368802354-141"
},
"fields": {
"@timestamp": [
1469215282628
]
},
"sort": [
1469215282628
]
}
look at "host": "ip-10-0-1-251.ec2.internal",
the host is not the same return of hostname command on server someone can help me?
Mark Paluch
@mp911de
Jul 22 2016 19:47
@bdmstyle Have you looked into http://logging.paluch.biz/hostname-lookup.html?
That document describes the way how it performs the lookup
You can adjust the lookup with System properties and Env-properties
I think you should be able to achieve what you want by setting logstash-gelf.resolutionOrder=localhost,network
@marinhodev Bruno Marinho
@bdmstyle
Jul 22 2016 21:27
thanks i will try but i need change "logstash-gelf.resolutionOrder=localhost,network" in logbackfile?
@marinhodev Bruno Marinho
@bdmstyle
Jul 22 2016 21:34
or to change system properties and env-properties?
Renan Altendorf
@altendorfme
Jul 22 2016 21:48
@bdmstyle You can bypass that process by setting some SystemProperties. Set logstash-gelf.skipHostnameResolution to true ;)