Graylog Internal Monjitoring via API

Dear All,

I am looking to monitor graylog internal metrics via the api y creating a GUI monitoring app. I want to monitor the following:-

Input , Prcesss and Output buffers
Journal Utilisation
JVM heap metrics

I want to recreate the node’s ui which has percentage bar for all of these.

The idea is to alert when they hit certain levels i.e level 1 =50% , level 2 =65%, level 3=80% over a sampling period of time.

I found the following metrics available from the api.

graylog journal utilisation
/api/system/metrics/org.graylog2.journal.utilization-ratio

Process Buffer

“org.graylog2.shared.buffers.ProcessBuffer.decodeTime”
“org.graylog2.shared.buffers.ProcessBuffer.incomingMessages”
“org.graylog2.shared.buffers.ProcessBuffer.parseTime”
“org.graylog2.shared.buffers.ProcessBuffer.thread-factory.created”
“org.graylog2.shared.buffers.ProcessBuffer.thread-factory.running”
“org.graylog2.shared.buffers.ProcessBuffer.thread-factory.terminated”
“org.graylog2.shared.buffers.processors.ProcessBufferProcessor.filteredOutMessages”
“org.graylog2.shared.buffers.processors.ProcessBufferProcessor.incomingMessages”
“org.graylog2.shared.buffers.processors.ProcessBufferProcessor.outgoingMessages”
“org.graylog2.shared.buffers.processors.ProcessBufferProcessor.processTime”

Output Buffer

“org.graylog2.buffers.OutputBuffer.incomingMessages”
“org.graylog2.buffers.OutputBuffer.thread-factory.created”
“org.graylog2.buffers.OutputBuffer.thread-factory.running”
“org.graylog2.buffers.OutputBuffer.thread-factory.terminated”
“org.graylog2.buffers.processors.OutputBufferProcessor.executor-service.completed”
“org.graylog2.buffers.processors.OutputBufferProcessor.executor-service.duration”
“org.graylog2.buffers.processors.OutputBufferProcessor.executor-service.idle”
“org.graylog2.buffers.processors.OutputBufferProcessor.executor-service.running”
“org.graylog2.buffers.processors.OutputBufferProcessor.executor-service.submitted”
“org.graylog2.buffers.processors.OutputBufferProcessor.incomingMessages”
“org.graylog2.buffers.processors.OutputBufferProcessor.processTime”

Input Buffer
“org.graylog2.shared.buffers.InputBufferImpl.incomingMessages”
“org.graylog2.shared.buffers.InputBufferImpl.thread-factory.created”
“org.graylog2.shared.buffers.InputBufferImpl.thread-factory.running”
“org.graylog2.shared.buffers.InputBufferImpl.thread-factory.terminated”

My question is how are the percentage’s calculated for the input, process and output buffers?

Perhaps someone could point me to the code so that i could read it and understand which metrics are being used in the calculation in the web interfaces.

Kind Regards

Jake

from https://github.com/Graylog2/graylog2-server/blob/master/graylog2-web-interface/src/components/nodes/BufferUsage.jsx

progress bars on node page from above using the formula below:

metric = usage/size *100

“org.graylog2.buffers.input.size”,
“org.graylog2.buffers.input.usage”,
“org.graylog2.buffers.output.size”,
“org.graylog2.buffers.output.usage”,
“org.graylog2.buffers.process.size”,
“org.graylog2.buffers.process.usage”,

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.