https://github.com/scottrobertson/scrutiny
An agnostic monitoring system written in PHP. Monitor any service, and report on it's status.
https://github.com/scottrobertson/scrutiny
Last synced: 4 months ago
JSON representation
An agnostic monitoring system written in PHP. Monitor any service, and report on it's status.
- Host: GitHub
- URL: https://github.com/scottrobertson/scrutiny
- Owner: scottrobertson
- License: mit
- Created: 2013-08-17T22:01:40.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-02-12T17:14:30.000Z (over 11 years ago)
- Last Synced: 2024-10-12T02:29:43.591Z (9 months ago)
- Language: PHP
- Homepage:
- Size: 510 KB
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Scrutiny
=======[](https://travis-ci.org/scottrobertson/scrutiny)
[](https://www.versioneye.com/user/projects/52111318632bac39a200ac50)
[](https://packagist.org/packages/scottrobertson/scrutiny)
[](https://packagist.org/packages/scottrobertson/scrutiny)An agnostic monitoring system written in PHP. Monitor any service, and report on it's status.
Each [Reporter](https://github.com/scottrobertson/scrutiny/wiki/Reporter) can subscribe to [Events](https://github.com/scottrobertson/scrutiny/wiki/Events) from [Services](https://github.com/scottrobertson/scrutiny/wiki/Service). There are 3 events: **up**, **down**, and **recovery**. Services can collect any meta data they want, and Reporters will have access to this data. This allows you to collect stats for instance.
### Install
```json
{
"require" : {
"scottrobertson/scrutiny" : "dev-master"
}
}
``````php
addService(new \ScottRobertson\Scrutiny\Service\Http('http://example.com'));
// Set options on a service
$mongodb = new \ScottRobertson\Scrutiny\Service\MongoDB();
$mongodb->setName('MongoDB');
$mongodb->setInterval(20);
$mongodb->setDownMessage('ER MER GERD MORGOR ER DORN');
$scrutiny->addService($mongodb);// Setup Reporters
$scrutiny->addReporter(new \ScottRobertson\Scrutiny\Reporter\Post('http://api.example.com'));
$scrutiny->addReporter(
new \ScottRobertson\Scrutiny\Reporter\Pushover(
'token',
'user'
)
);$scrutiny->watch();
```### Current Services
- MySQL
- MongoDB
- Http (Checking if a website is available)### Current Reporters
- Pushover.net
- Post### Example Use case
For example, if you wanted to monitor MySQL, you could setup the Pushover Reporter to subscribe to "down" events. This would mean that if MySQL went down, you would receive a push notification.