Skip to content

Instantly share code, notes, and snippets.

View savchenkoDev's full-sized avatar

Sergey Savchenko savchenkoDev

  • Yekaterinburg, Russia
View GitHub Profile
@savchenkoDev
savchenkoDev / advanced
Created November 23, 2018 19:22
Monit config for advanced
### Nginx ###
check process nginx with pidfile /opt/nginx/logs/nginx.pid
start program = "/etc/init.d/nginx start"
stop program = "/etc/init.d/nginx stop"
if cpu > 90% for 2 cycles then restart
if memory usage > 90% for 3 cycles then restart
if failed host 127.0.0.1 port 80 protocol http
then restart
if 5 restarts within 5 cycles then timeout
CREATE DATABASE `test_guru`;
USE `test_guru`;
CREATE TABLE `categories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(45) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE `tests` (
air133:~ sergejsavchenko$ ncat httpbin.org 80 -C
GET /anything HTTP/1.1
Host: httpbin.org
HTTP/1.1 200 OK
Connection: keep-alive
Server: gunicorn/19.8.1
Date: Thu, 28 Jun 2018 09:00:24 GMT
Content-Type: application/json
Content-Length: 185