Clickatell Output Plugin for Graylog v1.0.0

Introduction

This Graylog Output Plugin can send short messages (SMS) via the Clickatell Messaging Provider based on messages that are assigned to a specific stream in Graylog. It is based on the new version 1 plugin architecture. This plugin does essentially the same as the Clickatell AlarmCallback Plugin for Graylog, but works on streams instead of alert conditions. So with this plugin you can forward all messages (or parts thereof) of a given stream to one or more recipients.

Here is a brief overview of what is covered:

Installation

You install this plugin by copying the JAR file to the Graylog plugin directory which is /opt/graylog/plugin by default (or check the plugin_dir variable in your graylog.conf file). After a restart of the Graylog server the plugin will be visible under the Details view of the Node under the System menu.

Installed Graylog Output Plugin

You can also follow the information in Using drone.io to automatically integrate your Graylog2 Plugins in Docker to integrate the plugin in your docker image.

Configuration Options

There are several options you can use to configure the plugin. Some of them are specific to Clickatell as the messaging provider and some are specific to the message properties from Graylog. You can use the exact same Configuration Options described in Clickatell AlarmCallback Plugin except for the CONFIG_RESULT_DESCRIPTION option.

Configuration Options

Testing


To test the plugin you create a stream and add an output with the options described in Configuration Options that it will look similar to this:

Configured Output Plugin

After you inserted a message into Graylog that matches that stream the output plugin will be triggered and you will a receive a message like this:

Sent SMS

As you can see in the screenshot the plugin has been configured with a static text GraylogRockZz. In addition the fields names and values stream, timestamp, source, cpu, disk, mem are sent with the message. As there is no message size limit defined the whole message is sent.

Download

Notes

  • Currently, it is not possible to change the configuration of a plugin once it is configured. That means -event when you only want to change the recipient- you have to delete and re-create the output configuration.

  • Upon start/first invocation of the plugin your balance at your Clickatell account will be queried. The result will be shown on graylog.log (via LOG.info). This is also used for verifying your authentication token.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: