Giter Club home page Giter Club logo

services-examples's Introduction

services-examples

Examples of third-party integration scripts for Slack

slack_room_message.pl is a simple wrapper for use from the command line, with minimal dependencies. Use it like so:

slack_room_message.pl -text="some event happened" -channel="#events" -username='a_bot'

services-examples's People

Contributors

cmcavoy avatar digiguru avatar grantmd avatar iamcal avatar jdonagher avatar john-paulsmith avatar naota avatar

Stargazers

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

Watchers

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

services-examples's Issues

Document what the server is expecting from the commit hook

Hi. It's taken me a while to work out what format the server was expecting it's payload (I had to translate the hook into powershell). I thought it would be good to make a comment on what is epxected by the subversion commit hook.

POST https: //hitched.slack.com/services/hooks/subversion?token=xxxxxx
Content-Type: application/x-www-form-urlencoded
Host: foo.slack.com
Content-Length: 101

payload=%7B%22revision%22%3A1%2C%22url%22%3A%22http%3A%2F%2Fsvnserver%22%2C%22author%22%3A%22digiguru%22%2C%22log%22%3A%22Log%20info%22%7D

That is specifically lowercase JSON parameters with double quotes, and no quotes around the revsision number

{"revision":1,"url":"http://svnserver","author":"digiguru","log":"Log info"}

Any other format returns a "No payload received from svn" response

UTF8 support

This bot doesn't seem to properly encode utf-8 content.
I posted ๐Ÿ˜ in a svn commit message (which is correctly parsed by other SVN clients), but the hook sent this to slack: ?\240?\159?\152?\129.

Our jenkins setup correctly parsed the svn commit, and also sent a slack message, with proper formatting. So both SVN and slack correctly handle this, but not the svn hook from this repository.

Add more fields into alerts for nagios

Is is possible to enable more fields like to the alerts going into slack, for example on an acknowlegement you just get ACKNOWLEDGED, If I add fields for $SERVICEACKAUTHOR$ and $SERVICEACKCOMMENT$ they do not show up in the alert. My service alert script looks like so:

$USER1$/slack-nagios.pl -field slack_channel=#alert -field HOSTALIAS="$HOSTNAME$" -field SERVICEDESC="$SERVICEDESC$" -field SERVICESTATE="$SERVICESTATE$" -field SERVICEOUTPUT="$SERVICEOUTPUT$" -field NOTIFICATIONTYPE="$NOTIFICATIONTYPE$" -field SERVICENOTES="$SERVICENOTES$" -field SERVICEACKAUTHOR="$SERVICEACKAUTHOR$" -field SERVICEACKCOMMENT="$SERVICEACKCOMMENT$"

downtime notifications

does this script support downtime notifications? i can see that for service conf you are using w,u,c,r but s is missing.

i have configured nagios to send the downtime notification by using the s flag but nothing gets displayed in slack. in nagios notification history i can see that there was an attempt to send it via your command.

Mention nagios prerequisite

My Nagios notification wasn't working; turns out running it manually mentioned /etc/pki/tls/certs/ca-bundle.crt not existing. yum install ca-certificates fixed this.

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.