Skip to content

Instantly share code, notes, and snippets.

View ziminator's full-sized avatar
🏠
Working from home

Alexandr Zimin ziminator

🏠
Working from home
View GitHub Profile
### Nginx ###
check process nginx with pidfile /run/nginx.pid
start program = "/usr/sbin/service nginx start"
stop program = "/usr/sbin/service nginx stop"
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then restart
if memory usage > 80% for 5 cycles then restart
if failed host 185.20.227.61 port 80 protocol http
then restart
if 3 restarts within 5 cycles then timeout
Hello World!
Создайте базу данных test_guru
------------------------------
postgres=# CREATE DATABASE test_guru;
CREATE DATABASE
postgres=#
GET запрос без параметров:
alex@ubuntu:~$ ncat -C httpbin.org 80
GET / HTTP/1.1
Host: httpbin.org
HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: *
Content-Type: text/html; charset=utf-8