Hi,
According to this blog post there are 1, 5 and 15 minute rates for Graylog log levels. I’m particularly looking for these:
org.apache.logging.log4j.core.Appender.warn
org.apache.logging.log4j.core.Appender.error
org.apache.logging.log4j.core.Appender.fatal
Using the Graylog prometheus report I only see totals available, example:
org_apache_logging_log4j_core_Appender_warn_total
Are the other ones available anywhere else? Graylog ver 2.1.2.
jochen
(Jochen)
September 8, 2017, 2:01pm
2
The metrics do exist in Graylog:
The Prometheus metrics reporter just exports the total number of messages per log level and not the aggregated values (such as the 1m, 5m, 15m values):
/**
* Export a Meter as as prometheus COUNTER.
*/
List<MetricFamilySamples> fromMeter(String dropwizardName, Meter meter) {
String name = sanitizeMetricName(dropwizardName);
return Arrays.asList(
new MetricFamilySamples(name + "_total", Type.COUNTER, getHelpMessage(dropwizardName, meter),
Arrays.asList(new MetricFamilySamples.Sample(name + "_total",
new ArrayList<String>(),
new ArrayList<String>(),
meter.getCount())))
);
}
You should be able to calculate the change rate or averages per timeframe in Prometheus using the included functions .
Also make sure to check out https://prometheus.io/docs/querying/examples/ .
Yeah thanks, I used irate:
irate(org_apache_logging_log4j_core_Appender_warn_total{job="graylog", location="earth"}[15m])
system
(system)
Closed
September 22, 2017, 2:14pm
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.