GROK

отрезание вот этой части «/srv/www/magento/releases/20180117114104» дословно \/srv\/www\/magento\/releases\/[0-9]+

Read More &#8594

Elastic serach curator

Строка запуска curator —config /root/.curator/config.yml /etc/curator/packetbeat.yml Файл конфигурации /root/.curator/config.yml client: hosts: — 127.0.0.1 port: 9200 url_prefix: use_ssl: False certificate: client_cert: client_key: ssl_no_validate: False http_auth: timeout: 7200 master_only: False logging: loglevel: INFO logfile: /tmp/curator.log logformat: default blacklist: [‘elasticsearch’, ‘urllib3’] Установка, добавить repo [curator-5] name=CentOS/RHEL 6 repository for Elasticsearch Curator 5.x packages baseurl=https://packages.elastic.co/curator/5/centos/6 gpgcheck=1 gpgkey=https://packages.elastic.co/GPG-KEY-elasticsearch enabled=1  

Read More &#8594

Grok slow mysql

if [message] =~ «^# Time:.*$» { drop {} } multiline { pattern => «^# User@Host:.*$» negate => true what => «previous» } grok { match => [ «message», «(?m)^# User@Host: %{GREEDYDATA:user}\[%{GREEDYDATA}\] @ \[%{IP:client_ip}\]\s*# Query_time: %{NUMBER:query_time:float} Lock_time: %{NUMBER:query_lock_time:float} Rows_sent: %{NUMBER:query_rows_sent:int} Rows_examined: %{NUMBER:query_rows_examined:int}\s*SET timestamp=%{NUMBER:log_timestamp};\s*%{GREEDYDATA:query}$», «message», «(?m)^# User@Host: %{GREEDYDATA:user}\[%{GREEDYDATA}\] @ \[%{IP:client_ip}\]\s*# Query_time: %{NUMBER:query_time:float} Lock_time: %{NUMBER:query_lock_time:float} Rows_sent: %{NUMBER:query_rows_sent:int} Rows_examined: […]

Read More &#8594

mytop на centos

wget http://jeremy.zawodny.com/mysql/mytop/mytop-1.6.tar.gz tar -zxvf mytop-1.6.tar.gz cd mytop-1.6 yum install perl-CPAN yum install perl-devel yum install perl-DBD-mysql perl Makefile.PL make make test make install Файл /root/.mytop user=root host=localhost db=db_dev1 pass=Grakmyakhec3 color=1 idle=1 delay=1  

Read More &#8594