graylog2

How to get GELFJ appender work in log4j?

[亡魂溺海] 提交于 2019-12-05 08:08:26
I need to get my Java application writing logging to a Graylog2 server. The application uses a log4j configuration. Several things I have tried to get the logging writing to the Graylog2 server, the things I got working was sending a test message directly to the server, as shown here (first example). Yet, when I write an appender and attach it to the root logger, I always get this error message the first time a log event is to be fired: log4j:ERROR Could not send GELF message Nothing then happens on the Graylog2 server side. The appender I try to get working: <appender name="graylog2" class=

Graylog2- how to config logs retention to 1 week

眉间皱痕 提交于 2019-12-05 06:42:09
We are using some Graylog2 servers ( graylog-server version 1.3.4). Because we receive too much of log messages, it requires a lot of memory. I am trying to reduce the logs retention to 1 week, every log messages older than 1 week will be deleted. However, I cannot find out any value in configuration file to do that. I used "max_time_per_index = 7d" value but max_time_per_index seems just define the age of an index until it's rotated and a new index is being created, not of the messages in that index. So, what's the best way to set message retention to 1 week? Please help me. Thanks a lot.

Searching for Gray Log 2 API or a way to query ElasticSearch

孤街醉人 提交于 2019-12-05 03:07:04
I have a question regarding Gray Log 2 In the company I work for all systems report exceptions to Gray Log server which has predefined streams. I need to build an external Dashboard which retrieves data from different streams. I haven't found any Gray Log 2 API to use for this. I read that there is a possibility to query Elastic Search directly. Can you please advise how do I do so or if there is any Gray Log 2 API. My Dashboard will be written or in JSF or in .NET still not sure about which is best to use. I would be very grateful for detailed answer on this question. Links will help too.

Graylog2 with Symfony 2 (Monolog)

╄→гoц情女王★ 提交于 2019-12-04 22:13:20
问题 I want to use the "Monolog -> GelfHandler" in a SF2 project. So I've added the following to my composer.json: "graylog2/gelf-php": "dev-master" My SF2 config.yml: monolog: handlers: main: type: gelf publisher: hostname: %Graylog2.Host% port: %Graylog2.Port% level: info formatter: monolog.formatter.session_request But now, if I want to log something, I get an error in GelfHandler::write() Gelf\Publisher::publish() must be an instance of Gelf\MessageInterface, string given What is wrong here?

How to handle multiple heterogeneous inputs with Logstash?

人走茶凉 提交于 2019-11-27 04:59:16
问题 Let's say you have 2 very different types of logs such as technical and business logs and you want: raw technical logs be routed towards a graylog2 server using a gelf output, json business logs be stored into an elasticsearch cluster using the dedicated elasticsearch_http output. I know that with Syslog-NG for instance, the configuration file allow to define several distinct inputs which can then be processed separately before being dispatched; what Logstash seems unable to do. Even if one