Questions tagged [gelf]

The Graylog Extended Log Format (GELF) is a log format.

The Extended Log Format (GELF) is a log format that avoids the shortcomings of classic plain syslog:

  • Limited to length of 1024 bytes – Not much space for payloads like backtraces
  • No data types in structured syslog. You don’t know what is a number and what is a string.
  • The RFCs are strict enough but there are so many syslog dialects out there that you cannot possibly parse all of them.
  • No compression

There are a number of software libraries that can be used to produce logs in GELF, e.g. .

Links:

87 questions
9
votes
1 answer

Redirecting output of non pid 1 process to docker logs

How to redirect logs of non pid 1 process to dockerlogs with ultimate goal of redirecting them to gelf? There are 2 processes inside the docker container: 1) pid 1 process 2) non pid 1 process which writes to log file at path Following docker…
rok
  • 9,403
  • 17
  • 70
  • 126
9
votes
2 answers

Sending logs to Graylog and in Gelf format

I would like to use graylog as central logging server and currently I am just using slf4j Logger "slf4j-api" as Java logging framework for logging in my java application. Can i use SLF4J to send logging to Graylog? or Which additional libraries do i…
orcl user
  • 167
  • 1
  • 4
  • 9
8
votes
2 answers

Docker Gelf driver custom fields

I can see in Docker documentation: https://docs.docker.com/config/containers/logging/gelf/ In GELF, every log message is a dict with the following fields: ... any custom fields you configure yourself Does it mean that this driver support custom…
Piotr Kozlowski
  • 899
  • 1
  • 13
  • 25
7
votes
0 answers

How to define docker-compose services to log into graylog

I'm having docker-compose.yaml as below: My problem is that stdout prints or logs written to it are appearing in graylog- but just those under the command /usr/bin/tini -- foo1.start. And when I try entering the docker container of the service…
JavaSa
  • 5,813
  • 16
  • 71
  • 121
6
votes
2 answers

log4j2-gelf "ERROR StatusLogger appenders contains an invalid element or attribute "GELF" "

just started to get into Graylog2 and wanted to log some Java-Applications via GELF Input. Therefore I used the library log4j2 and added the graylog2-gelfclient. All dependencies are satisfied and the programm is running. But the initialisation of…
Felix
  • 91
  • 1
  • 5
5
votes
1 answer

Log level as a field for Docker GELF logging driver

I want to get stdout logs from a docker container and send them to ELK stack. So far, I know that there is a GELF logging driver in Docker. However, I can't figure out how I can parse ERROR, WARNING or DEBUG messages from the message and put them in…
skynyrd
  • 942
  • 4
  • 14
  • 34
5
votes
2 answers

How to transfer MDC via gelf to graylog?

We have a logging flow where our java application fills an MDC which is transferred via log4j2 to syslog to a central rsyslog installation. Here we make extensive use of MDC. Our setup is thus:
Martin Schröder
  • 4,176
  • 7
  • 47
  • 81
5
votes
0 answers

How to use GELF HTTP input

I'm trying to setup a GrayLog2 server and need to use the GELF HTTP input listener. I've made a small C# console program which sends test logs to the server. However it seems that only a couple of messages are actually parsed by gl2 and I cannot…
jaspernygaard
  • 3,098
  • 5
  • 35
  • 52
4
votes
1 answer

How do I send logs to GELF UDP endpoint from Kubernetes on a per-pod basis

I've recently started using kubernetes and am now looking at how I can configure centralised logging. For the majority of the pods, the application itself logs straight to the GELF endpoint (logstash), however there are a number of "management" pods…
thewire247
  • 795
  • 1
  • 9
  • 24
4
votes
1 answer

Docker GELF logging additional fields

I am trying to make my docker-compose file write its logging to a Graylog server, using the GELF protocol. This works fine, using the following configuration (snippet of docker-compose.yml): logging: driver: gelf options: …
Paul S
  • 434
  • 4
  • 13
4
votes
2 answers

Error processing element GELF ([Appenders: null]): CLASS_NOT_FOUND

I am getting the following error in my log4j2.xml file: Error processing element GELF ([Appenders: null]): CLASS_NOT_FOUND At first I thought it was because I was referencing an invalid appender, but I still have the error after commenting it out.…
mr nooby noob
  • 1,860
  • 5
  • 33
  • 56
3
votes
0 answers

push Application logs directly to Graylog when apps running on kubernetes

I had 30+ applications that were running on Rancher (1.x) in a docker-composed way. The logging of the applications (those were running inside the container) was done in such a way that no app logs get stored on the container or on the system but…
vivek
  • 187
  • 14
3
votes
1 answer

NXLog: Json input to GELF UDP Output

We have a setup where a program logs to a .Json file, in a format that follows the GELF specification. Currently this is sent to a Graylog2 server using HTTP. This works, but due to the nature of HTTP there's a significant latency, which is an issue…
NT93
  • 316
  • 2
  • 15
3
votes
1 answer

How to send spring boot access logs to a remote server via GELF?

For our spring boot applications we use logback + GELF to send the application logs to our central log server where we can analyze them. Is it possible to do the same with spring boot's access log? And if not, are there any other suggestions or…
Bastian Voigt
  • 5,311
  • 6
  • 47
  • 65
3
votes
1 answer

Graylog GELF max field size

I'm trying to insert web service input/output as xml into Graylog. To do this I used "GELFJ - A GELF Appender for Log4j and a GELF Handler for JDK Logging". Here is the sample code: public static void main(String[] args) throws IOException { …
Levent Tokmak
  • 339
  • 1
  • 6
  • 17
1
2 3 4 5 6