Skip to main content

Raymii.org Logo (IEC resistor symbol)logo

Quis custodiet ipsos custodes?
Home | About | All pages | RSS Feed | Gopher

Munin plugin to show Logstash/Kibana messages per hour

Published: 12-04-2013 | Author: Remy van Elst | Text only version of this article


Table of Contents


This is a simple munin plugin which shows you the amount of log messages yourlogstash/kibana server receives per hour. It should run on the Logstash host, itgets the data from out the Elasticsearch database.

If you like this article, consider sponsoring me by trying out a Digital OceanVPS. With this link you'll get $100 credit for 60 days). (referral link)

Munin plugin example

Setup instructions

You need CURL, so you might need to install that via your package manager.

Clone the git repository:

git clone git://github.com/RaymiiOrg/munin-plugins.git

Place the plugin file in /usr/share/munin/plugins/, make it executable andcreate a symlink in /etc/munin/plugins/

cd munin-pluginscp logstash-messages-per-hour.sh /usr/share/munin/pluginschmod +x /usr/share/munin/plugins/logstash-messages-per-hour.shln -s /usr/share/munin/plugins/logstash-messages-per-hour.sh /etc/munin/plugins/logstash

Edit the plugin if your elasticsearch database URL is on another host:

# Edit the following line, and change localhost to what it should beTOTAL_EVENTS=$(curl -s -k -XGET http://localhost:9200/logstash

Then wait until your munin server has updated, and enjoy.

Tags: elasticsearch, kibana, logging, logstash, monitoring, munin, plugin, rsyslog, software, syslog