Skip to content
/ shirley Public

Server monitoring with Slack notification pushes.

License

Notifications You must be signed in to change notification settings

mthjn/shirley

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Shirley

Simple Ruby module that monitores Linux server and pushes notifications to Slack.

The Observer class should be run from sudo crontab -e minutely (or so), it fires only when limits are broken.

ApacheUbuntu1404 or ApacheCentos7 are under Slackpush and send a report - run it from sudo crontab -e daily.

output

It appends a fortune cookie to the daily reports.

cookie

Setting up Slack

1/ Log in to your Slack from browser (or create new Slack)

2/ In api.slack.com should be an option Incoming Hooks.. https://api.slack.com/incoming-webhooks

3/ Create a new incoming hook

4/ Copy the URI it gives you. This is what you pass as the only variable to both the Observer and the Slackpush.

Example

Report (daily)

require_relative("mod_shirley.rb")
include Shirley
hook = "https://hooks.slack.com/services/yyyyyyy/tttttt/ffffffffffff"
Shirley::ApacheCentos7.new(hook).worker

Observer (minutely)

require_relative("mod_shirley.rb")
include Shirley
hook = "https://hooks.slack.com/services/yyyyyyy/tttttt/ffffffffffff"
Shirley::Observer.new(hook).periodiccheck

Required gems

Should be all standard in modern Rubies:

About

Server monitoring with Slack notification pushes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages