Skip to content

Commit 5a6b8f2

Browse files
committed
Readme, Contributing, License files
1 parent 84ebcb9 commit 5a6b8f2

File tree

3 files changed

+131
-0
lines changed

3 files changed

+131
-0
lines changed

CONTRIBUTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
We accept contributions via Pull Requests on [Github](https://github.com/ericmakesstuff/laravel-server-monitor).
6+
7+
8+
## Pull Requests
9+
10+
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).
11+
12+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
13+
14+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
15+
16+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
17+
18+
- **Create feature branches** - Don't ask us to pull from your master branch.
19+
20+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
21+
22+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
23+
24+
25+
## Running Tests
26+
27+
``` bash
28+
$ composer test
29+
```
30+
31+
32+
**Happy coding**!

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# The MIT License (MIT)
2+
3+
Copyright (c) 2016 Eric Blount <eric@ericmakesstuff>
4+
5+
> Permission is hereby granted, free of charge, to any person obtaining a copy
6+
> of this software and associated documentation files (the "Software"), to deal
7+
> in the Software without restriction, including without limitation the rights
8+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
> copies of the Software, and to permit persons to whom the Software is
10+
> furnished to do so, subject to the following conditions:
11+
>
12+
> The above copyright notice and this permission notice shall be included in
13+
> all copies or substantial portions of the Software.
14+
>
15+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
> THE SOFTWARE.

README.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Server monitoring for Laravel apps
2+
3+
[![Latest Version](https://img.shields.io/github/release/ericmakesstuff/laravel-server-monitor.svg?style=flat-square)](https://github.com/ericmakesstuff/laravel-server-monitor/releases)
4+
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
5+
[![Build Status](https://img.shields.io/travis/ericmakesstuff/laravel-server-monitor/master.svg?style=flat-square)](https://travis-ci.org/ericmakesstuff/laravel-server-monitor)
6+
[![Quality Score](https://img.shields.io/scrutinizer/g/ericmakesstuff/laravel-server-monitor.svg?style=flat-square)](https://scrutinizer-ci.com/g/ericmakesstuff/laravel-server-monitor)
7+
[![Total Downloads](https://img.shields.io/packagist/dt/ericmakesstuff/laravel-server-monitor.svg?style=flat-square)](https://packagist.org/packages/ericmakesstuff/laravel-server-monitor)
8+
9+
This Laravel 5 package will periodically monitor the health of your server. Currently, it provides healthy/alarm status notifications for Disk Usage.
10+
11+
Once installed, monitoring your server is very easy. Just issue this artisan command:
12+
13+
``` bash
14+
php artisan monitor:run
15+
```
16+
17+
## Installation and usage
18+
19+
You can install this package via composer using:
20+
21+
`composer require ericmakesstuff/laravel-server-monitor`
22+
23+
You'll need to register the ServiceProvider:
24+
25+
```php
26+
// config/app.php
27+
28+
'providers' => [
29+
// ...
30+
EricMakesStuff\ServerMonitor\ServerMonitorServiceProvider::class,
31+
];
32+
```
33+
34+
To publish the config file to app/config/laravel-backup.php run:
35+
36+
`php artisan vendor:publish --provider="EricMakesStuff\ServerMonitor\ServerMonitorServiceProvider"`
37+
38+
## Scheduling
39+
40+
After you have performed the basic installation you can start using the monitor:run command. In most cases you'll want to schedule this command so you don't have to manually run monitor:run every time you want to know the health of your server.
41+
42+
The commands can, like an other command, be scheduled in Laravel's console kernel.
43+
44+
```php
45+
// app/Console/Kernel.php
46+
47+
protected function schedule(Schedule $schedule)
48+
{
49+
$schedule->command('monitor:run')->daily()->at('10:00');
50+
}
51+
```
52+
53+
Of course, the hour used in the code above is just an example. Adjust it to your own preferences.
54+
55+
## Testing
56+
57+
Run the tests with:
58+
59+
``` bash
60+
vendor/bin/phpunit
61+
```
62+
63+
## Contributing
64+
65+
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
66+
67+
## Security
68+
69+
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
70+
71+
## Credits
72+
73+
- [Eric Blount](https://github.com/ericmakesstuff)
74+
- [Freek Van der Herten](https://github.com/freekmurze)
75+
76+
## License
77+
78+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

0 commit comments

Comments
 (0)