Zabbix Log Monitoring
Материал из noname.com.ua
Версия от 14:05, 17 июня 2016; Sirmax (обсуждение | вклад)
Zabbix Мониторинг логов
cat sample1 | grep --color '\[error\]' | sed 's~2016/06/1[0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] \[error\] [0-9]*#0: \*[0-9]*~~' | sed 's~client: [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*,~~' | sed 's~/adrequest.php?order_line_id.*\ HTTP~/adrequest.php~g' | sed 's~GET d=.*HTTP~GET d=.~g' | sed '~adrequest.php?publisher_id.*\HTTP~HTTP~g'| grep 'PHP' | sort | uniq
PHP message: PHP Fatal error PHP message: PHP Warning PHP message: PHP Notice
screen -dmS zbx_nginx_err /usr/local/zabbix_scripts/monitor_nginx_log_error.sh screen -dmS zbx_nginx_warn /usr/local/zabbix_scripts/monitor_nginx_log_warning.sh screen -dmS zbx_nginx_notice /usr/local/zabbix_scripts/monitor_nginx_log_notice.sh
screen -x There are several suitable screens on: 22143.zbx_nginx_warn (06/17/2016 12:05:25 PM) (Detached) 22080.zbx_nginx_notice (06/17/2016 12:04:33 PM) (Detached) 21435.zbx_nginx_err (06/17/2016 11:35:06 AM) (Detached)