Code Monkey home page Code Monkey logo

graylog-plugin-twiliosms's Introduction

Twilio SMS Plugin for Graylog

Github Downloads GitHub Release Build Status

An alarm callback plugin for integrating the Twilio SMS API into Graylog.

Required Graylog version: 2.0.0 and later

Installation

Download the plugin and place the .jar file in your Graylog plugin directory. The plugin directory is the plugins/ folder relative from your graylog-server directory by default and can be configured in your graylog.conf file.

Restart graylog-server and you are done.

Build

This project is using Maven 3 and requires Java 8 or higher.

You can build the plugin (JAR) with mvn package.

DEB and RPM packages can be built with mvn jdeb:jdeb and mvn rpm:rpm respectively.

Plugin Release

We are using the maven release plugin:

$ mvn release:prepare
[...]
$ mvn release:perform

This sets the version numbers, creates a tag and pushes to GitHub. Travis CI will build the release artifacts and upload to GitHub automatically.

graylog-plugin-twiliosms's People

Contributors

bernd avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

graylog-plugin-twiliosms's Issues

plugin not loading in graylog-interface

I tried installing the plugin using

 java -jar graylog2-server.jar --install-plugin twilio_sms_transport --plugin-version 0.10.0

I got this error:

 java.io.FileNotFoundException: plugin/alarm_transports/org.graylog2.twiliosmstransport.transport.TwilioSmsTransport_gl2plugin.jar (No such file or directory)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:209)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:99)
    at org.graylog2.plugins.PluginInstaller.downloadAndCopyJar(PluginInstaller.java:166)
    at org.graylog2.plugins.PluginInstaller.install(PluginInstaller.java:100)
    at org.graylog2.Main.main(Main.java:110)

Creating the directory alarm_transports seem to fix the installation challenges but the plugin doesnt seem to be loaded on graylog-server restart

I'm using graylog2-server 0.12.0

Could not send alarm via Twilio SMS - The message body exceeds the 160 character limit

My Test notification worked with Twilio but when I tried testing few alert notification based on conditions, I got the below error in my graylog server indicating message body exceeds the 160 character limit.

2017-03-16T18:39:28.747Z ERROR [TwilioSmsAlarmCallback] Could not send alarm via Twilio SMS
com.twilio.sdk.TwilioRestException: The message body exceeds the 160 character limit.
	at com.twilio.sdk.TwilioRestException.parseResponse(TwilioRestException.java:74) ~[?:?]
	at com.twilio.sdk.TwilioRestClient.safeRequest(TwilioRestClient.java:525) ~[?:?]
	at com.twilio.sdk.TwilioRestClient.safeRequest(TwilioRestClient.java:505) ~[?:?]
	at com.twilio.sdk.resource.list.SmsList.create(SmsList.java:70) ~[?:?]
	at org.graylog2.alarmcallbacks.twilio.TwilioSmsAlarmCallback.send(TwilioSmsAlarmCallback.java:142) ~[?:?]
	at org.graylog2.alarmcallbacks.twilio.TwilioSmsAlarmCallback.call(TwilioSmsAlarmCallback.java:122) ~[?:?]
	at org.graylog2.alarmcallbacks.twilio.TwilioSmsAlarmCallback.call(TwilioSmsAlarmCallback.java:75) ~[?:?]
	at org.graylog2.alerts.AlertNotificationsSender.send(AlertNotificationsSender.java:58) ~[graylog.jar:?]
	at org.graylog2.alerts.AlertScanner.handleTriggeredAlert(AlertScanner.java:45) ~[graylog.jar:?]

While checking Twilio website, it was stated that "This error is for the deprecated SMS/Messages resource. To increase your character limit to 1600, you can switch to using the supported Messages resource." Appreciate if you can update the code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.