09 2016 档案

摘要:Filter Conditions 过滤条件:Rsyslog 提供4种不同类型的"filter 条件""传统的" severity and facility 基于selectors:基于属性的过滤器基于表达式的过滤Selectors 选择器选择器是过滤消息传统的方式, 它们被保存在 rsyslo... 阅读全文
posted @ 2016-09-30 17:00 czcb 阅读(346) 评论(0) 推荐(0) 编辑
摘要:rsyslog Properties 属性:数据项 在rsyslog 是被称为 “properties”. 它们可以有不同的源,最重要的是 那些来自接收的消息,但是还有其他。当你要访问数据items,你需要访问各自的属性使用的属性:templates条件语句:属性名字不区分大小写消息属性:那些... 阅读全文
posted @ 2016-09-30 14:49 czcb 阅读(298) 评论(0) 推荐(0) 编辑
摘要:-bash-4.1# ip add | grep inet inet 172.17.0.7/16 scope global eth0 inet6 fe80::42:acff:fe11:7/64 scope link inet 127.0.0.1/8 scope host lo... 阅读全文
posted @ 2016-09-30 13:28 czcb 阅读(146) 评论(0) 推荐(0) 编辑
摘要:Templates 模板:########################温金$template wj-flow01,"/data01/applog_backup/winfae_log/wj-flow01-catalina.out.%$year%-%$month%-%$day%" #... 阅读全文
posted @ 2016-09-30 10:51 czcb 阅读(108) 评论(0) 推荐(0) 编辑
摘要:配置:rsyslogd 配置通过rsyslog.conf file,典型的在/etc下。默认的,rsyslogd 读取/etc/rsyslog.conf 文件,这个可以通过命令行选项改变注意 配置可以通过在线rsyslog 配置创建工具生成配置文件例子可以在rsyslog wiki找到, 同时保... 阅读全文
posted @ 2016-09-29 15:26 czcb 阅读(187) 评论(0) 推荐(0) 编辑
摘要:perl 版本 ActivePerl_5.16.2.msi 阅读全文
posted @ 2016-09-29 12:40 czcb 阅读(174) 评论(0) 推荐(0) 编辑
摘要:[root@dr-mysql01 zjzc_log]# wc -l localhost_access_log.2016-09-27.txt 24004 localhost_access_log.2016-09-27.txt[root@dr-mysql01 zjzc_log]# wc -l aa ... 阅读全文
posted @ 2016-09-28 21:58 czcb 阅读(139) 评论(0) 推荐(0) 编辑
摘要:8.2.1.4 Index Merge Optimization 索引合并优化:索引合并方法是用于检索记录 使用多个 范围扫描和合并它们的结果集到一起mysql> show index from ClientInvestOrder;+-------------------+-----------... 阅读全文
posted @ 2016-09-28 13:51 czcb 阅读(137) 评论(0) 推荐(0) 编辑
摘要:8.2.1.3 Range Optimization 范围访问方法使用一个单个的索引来检索表记录的自己,包含在一个或者索引值区间。它可以用于一个单独的部分或者多个部分的索引,下面章节给出了一个详细的描述关于如何从WHERE 子句中提取区间8.2.1.3.1 范围访问方法用于单部分索引对于一个单... 阅读全文
posted @ 2016-09-28 10:57 czcb 阅读(119) 评论(0) 推荐(0) 编辑
摘要:8.2.1.2 How MySQL Optimizes WHERE Clauses MySQL 优化WHERE 子句本节讨论优化用于处理WHERE子句, 例子是使用SELECT 语句,但是相同的优化应用于WHERE子句在DELETE和UPDATE子句注意:因为MYSQL优化是不间断的,不是所有... 阅读全文
posted @ 2016-09-27 18:13 czcb 阅读(99) 评论(0) 推荐(0) 编辑
摘要:8.2.1 Optimizing SELECT Statements8.2.2 Optimizing Data Change Statements8.2.3 Optimizing Database Privileges8.2.4 Optimizing INFORMATION_SCHEMA Que... 阅读全文
posted @ 2016-09-27 16:59 czcb 阅读(113) 评论(0) 推荐(0) 编辑
摘要:[elk@dr-mysql01 frontend]$ ../../bin/logstash -f std02.conf Settings: Default pipeline workers: 8Pipeline main started31`31`ArgumentError: compariso... 阅读全文
posted @ 2016-09-27 13:47 czcb 阅读(156) 评论(0) 推荐(0) 编辑
摘要:zjtest7-frontend:/root# service rsyslog startStarting system logger: usage: rsyslogd [options]use "man rsyslogd" for details. To run rsyslog interac... 阅读全文
posted @ 2016-09-27 10:01 czcb 阅读(210) 评论(0) 推荐(0) 编辑
摘要:rsyslog 权限;默认[root@dr-mysql01 zjzc_log]# ls -ltr zj-frontend0*-access*27-rw------- 1 root root 322 Sep 27 07:55 zj-frontend02-access.2016-09-27600$F... 阅读全文
posted @ 2016-09-27 08:00 czcb 阅读(506) 评论(0) 推荐(0) 编辑
摘要:[root@dr-mysql01 zjzc_log]# >zj-frontend01-error.2016-09-26[root@dr-mysql01 zjzc_log]# [root@dr-mysql01 zjzc_log]# cat zj-frontend01-error.2016-09-2... 阅读全文
posted @ 2016-09-26 19:51 czcb 阅读(136) 评论(0) 推荐(0) 编辑
摘要:jrhapt11:/root# ps -ef | grep rsyslogroot 8233 1 0 17:42 ? 00:00:00 /sbin/rsyslogd -i /var/run/syslogd.pidroot 8342 8147 0 1... 阅读全文
posted @ 2016-09-26 18:01 czcb 阅读(221) 评论(0) 推荐(0) 编辑
摘要:er[file_system_exception: /elk/elasticsearch/data/es_cluster/nodes/0/indices/logstash-zjzc-frontend-access-2016.08.13/2/index/_d_Lucene54_0.dvm: Too... 阅读全文
posted @ 2016-09-26 14:42 czcb 阅读(12633) 评论(0) 推荐(0) 编辑
摘要:[root@frontend01 yum.repos.d]# cd /etc/yum.repos.d;wget http://rpms.adiscon.com/v8-stable/rsyslog.repo--2016-09-26 10:25:40-- http://rpms.adiscon.c... 阅读全文
posted @ 2016-09-26 11:28 czcb 阅读(554) 评论(1) 推荐(0) 编辑
摘要:rsyslog 测试(rsyslog 必须yum 安装uat-web02:/root# rpm -qa | grep rsyslogrsyslog-8.21.0-1.el6.x86_64)//读取单个文件测试:客户端发送:uat-web02:/var/log/nginx# echo "zjzc-... 阅读全文
posted @ 2016-09-26 10:10 czcb 阅读(267) 评论(0) 推荐(0) 编辑
摘要:cd /etc/yum.repos.d;wget http://rpms.adiscon.com/v8-stable/rsyslog.repouat-web02:/etc/yum.repos.d# ls -ltrtotal 32-rw-r--r--. 1 root root 4528 Dec ... 阅读全文
posted @ 2016-09-26 09:37 czcb 阅读(256) 评论(0) 推荐(0) 编辑
摘要:客户端:uat-web02:/var/log/nginx# echo "scan-cccc21231">>scan.log uat-web02:/var/log/nginx# cat scan.log scan-aaaaaaaaaaaaabbbbb21231scan-bbbbb21231scan... 阅读全文
posted @ 2016-09-25 22:39 czcb 阅读(259) 评论(0) 推荐(0) 编辑
摘要:[root@dr-mysql01 zjzc_log]# grep '24/Sep/2016' zj-api-access01.2016-09-25 | wc -l0[root@dr-mysql01 zjzc_log]# [root@dr-mysql01 zjzc_log]# [root@dr-m... 阅读全文
posted @ 2016-09-25 08:35 czcb 阅读(181) 评论(0) 推荐(0) 编辑
摘要:input(type="imfile"File="/usr/local/apache-tomcat-7.0.55_8082/logs/localhost_access_log.*.txt"Tag="wj-api-access01"Severity="info"Facility="local5")... 阅读全文
posted @ 2016-09-24 10:29 czcb 阅读(196) 评论(0) 推荐(0) 编辑
摘要:登陆;http://192.168.32.161/DEVOPS/index.php/Index/do_loginCache-Control no-store, no-cache, must-revalidate, post-check=0, pre-check=0Connection K... 阅读全文
posted @ 2016-09-23 22:48 czcb 阅读(1001) 评论(0) 推荐(0) 编辑
摘要:8.1 Optimization Overview 8.1 Optimization Overview8.2 Optimizing SQL Statements 8.3 Optimization and Indexes 8.4 Optimizing Database Struc... 阅读全文
posted @ 2016-09-23 17:56 czcb 阅读(89) 评论(0) 推荐(0) 编辑
摘要:# 下面的例子将会进行把数据写入磁盘的操作:# 900秒(15分钟)之后,且至少1次变更# 300秒(5分钟)之后,且至少10次变更# 60秒之后,且至少10000次变更## 注意:你要想不写磁盘的话就把所有 "save" 设置注释掉就行了。save 900 1save 300 10save 6... 阅读全文
posted @ 2016-09-23 13:39 czcb 阅读(156) 评论(0) 推荐(0) 编辑
摘要:80.82.78.38 [23/Sep/2016:05:36:18 +0800] "GET http://www.baidu.com/cache/global/img/gs.gif HTTP/1.1" - 404 162 "-" "Mozilla" 0.000 - 80.82.78.38 - -... 阅读全文
posted @ 2016-09-23 09:39 czcb 阅读(282) 评论(0) 推荐(0) 编辑
摘要:80.82.78.38 [23/Sep/2016:05:36:18 +0800] "GET http://www.baidu.com/cache/global/img/gs.gif HTTP/1.1" - 404 162 "-" "Mozilla" 0.000 - 需要补一刀; %{IPOR... 阅读全文
posted @ 2016-09-23 08:11 czcb 阅读(119) 评论(0) 推荐(0) 编辑
摘要:10.168.102.19 - - [22/Sep/2016:20:35:11 +0800] "POST /api/client/asset HTTP/1.1" 200 430 0.047 121.43.145.64 10.168.102.19 - - [22/Sep/2016:20:37:... 阅读全文
posted @ 2016-09-22 22:29 czcb 阅读(115) 评论(0) 推荐(0) 编辑
摘要:input { file { type => "zj_api" path => ["/data01/applog_backup/zjzc_log/zj-api*catalina*"] } ... 阅读全文
posted @ 2016-09-22 21:10 czcb 阅读(125) 评论(0) 推荐(0) 编辑
摘要:ArgumentError: comparison of String with 5 failed >= at org/jruby/RubyComparable.java:155 >= at org/jruby/RubyString.java:18... 阅读全文
posted @ 2016-09-22 18:40 czcb 阅读(142) 评论(0) 推荐(0) 编辑
摘要:use Net::SMTP;use LWP::UserAgent;use HTTP::Cookies;use HTTP::Headers;use HTTP::Response;use Encode;use File::Temp qw/tempfile/;use HTTP::Date qw(tim... 阅读全文
posted @ 2016-09-22 15:34 czcb 阅读(226) 评论(0) 推荐(0) 编辑
摘要:input { file { type => "zj_api" path => ["/data01/applog_backup/zjzc_log/zj-api*catalina*"] } ... 阅读全文
posted @ 2016-09-22 10:45 czcb 阅读(139) 评论(0) 推荐(0) 编辑
摘要:日期格式转换:/***** nginx 访问日志[elk@zjtest7-frontend config]$ cat stdin02.conf input { stdin { }}filter { grok { match => ["message", "%{IP... 阅读全文
posted @ 2016-09-21 19:36 czcb 阅读(1637) 评论(0) 推荐(0) 编辑
摘要:[elk@dr-mysql01 tomcat]$ cat logstash_tomcat.confinput { file { type => "zj_api" path => ["/data01/applog_backu... 阅读全文
posted @ 2016-09-21 17:02 czcb 阅读(158) 评论(0) 推荐(0) 编辑
摘要:$ua->post( $url, \%form ) $ua->post( $url, \@form ) $ua->post( $url, \%form, $field_name => $value, ... ) $ua->post( $url, $field_name ... 阅读全文
posted @ 2016-09-21 15:31 czcb 阅读(141) 评论(0) 推荐(0) 编辑
摘要:explain SELECT t.* FROM ( SELECT t1.sn AS clientSn, t1.userNick, t1.mobilePhone, t3.personName, t2.availableBalance, (SELECT IFN... 阅读全文
posted @ 2016-09-21 09:42 czcb 阅读(117) 评论(0) 推荐(0) 编辑
摘要:[root@wx02 ~]# cat /etc/sysconfig/iptables# Generated by iptables-save v1.4.7 on Tue Sep 20 11:18:45 2016*filter:INPUT ACCEPT [100:5792]:FORWARD ACC... 阅读全文
posted @ 2016-09-20 11:44 czcb 阅读(1579) 评论(0) 推荐(0) 编辑
摘要:-A INPUT -s 115.236.6.6/32 -p udp -m udp --dport 111 -j ACCEPT-A INPUT -s 10.175.197.98/32 -p udp -m udp --dport 111 -j ACCEPT-A INPUT -s 10.171.254... 阅读全文
posted @ 2016-09-20 11:31 czcb 阅读(231) 评论(0) 推荐(0) 编辑
摘要:iptables -I INPUT -p tcp --dport 111 -j DROPiptables -I INPUT -s 10.171.254.221 -p tcp --dport 111 -j ACCEPTiptables -I INPUT -s 10.175.197.98 -p tc... 阅读全文
posted @ 2016-09-20 10:41 czcb 阅读(536) 评论(0) 推荐(0) 编辑
摘要:input { file { type => "zj_frontend_access" path => ["/data01/applog_backup/zjzc_log/zj-frontend0*access*"] ... 阅读全文
posted @ 2016-09-20 09:59 czcb 阅读(136) 评论(0) 推荐(0) 编辑
摘要:windwos挂载linux主机NFS启动windos NFS客户端服务:1. 打开控制面板->程序->打开或关闭windows功能->NFS客户端勾选NFS客户端,即开启windows NFS客户端服务.2.win+R->cmd>mount 121.0.6.30:/nfs01 G: 阅读全文
posted @ 2016-09-20 09:38 czcb 阅读(156) 评论(0) 推荐(0) 编辑
摘要:1.创建新的action 2.创建新的develop用户 3.需要删除组不然会给组里所有人发 阅读全文
posted @ 2016-09-19 14:10 czcb 阅读(132) 评论(0) 推荐(0) 编辑
摘要:input { file { type => "zj_api_access" path => ["/data01/applog_backup/zjzc_log/zj-api*access*"] } ... 阅读全文
posted @ 2016-09-19 13:07 czcb 阅读(204) 评论(0) 推荐(0) 编辑
摘要:打上勾就行 阅读全文
posted @ 2016-09-19 10:41 czcb 阅读(90) 评论(0) 推荐(0) 编辑
摘要:Administration->Users->User name->Media 阅读全文
posted @ 2016-09-19 09:55 czcb 阅读(101) 评论(0) 推荐(0) 编辑
摘要:zabbix agentzabbix自带的客户端程序(被动模式),zabbix server主动向它收集监控数据。agent提供丰富的key,包括不限于cpu、内存、网络、磁盘、web等等。如果你不介意或者系统支持安装此程序,那么他是首选的。需要注意的是,server检索数据有超时限制,最大超时... 阅读全文
posted @ 2016-09-19 08:55 czcb 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-09-18 22:47 czcb 阅读(94) 评论(0) 推荐(0) 编辑
摘要:[elk@dr-mysql01 test]$ cat t1.conf input { stdin { }}filter { grok { match => [ "message" , "\s*%{IPORHOST:clientip}\s+\... 阅读全文
posted @ 2016-09-18 22:20 czcb 阅读(184) 评论(0) 推荐(0) 编辑
摘要:vim /etc/zabbix/zabbix_agentd.confUserParameter=zjzc.login,/bin/sh /usr/sbin/get_login.shUserParameter=zjzc.pay,/bin/sh /usr/sbin/get_pay.shUserPar... 阅读全文
posted @ 2016-09-18 21:06 czcb 阅读(125) 评论(0) 推荐(0) 编辑
摘要:开始使用Logstash本节将指导处理安装Logstash 和确认一切是运行正常的,后来的章节处理增加负载的配置来处理选择的使用案例。这个章节包含下面的主题:Installing LogstashStashing Your First Event: Basic Logstash ExampleP... 阅读全文
posted @ 2016-09-18 15:36 czcb 阅读(150) 评论(0) 推荐(0) 编辑
摘要:Logstash 介绍:Logstash 是一个开源的数据收集引擎具有实时管道能力,Logstash 可以动态的统一数据从不同的来源和使数据规范化到你选择的目的地。当Logstash 起初驾驭创新到日志收集,它的功能很好的扩展超出使用案例。任何事件的类型可以被丰富和改变使用一个input,fil... 阅读全文
posted @ 2016-09-18 13:15 czcb 阅读(176) 评论(0) 推荐(0) 编辑
摘要:只允许指定的ip访问本机的指定端口22:允许的的ip:192.168.1.123, 192.168.1.124, 192.168.1.100,其他ip都禁止访问。 切换到root用户1、在tcp协议中,禁止所有的ip访问本机的22端口。iptables -I INPUT -p tcp --dpo... 阅读全文
posted @ 2016-09-18 11:02 czcb 阅读(885) 评论(0) 推荐(0) 编辑
摘要:[elk@zjtest7-frontend type]$ cat input.conf input { file { type => "type_a" path => ["/usr/local/logstash-2.3.4... 阅读全文
posted @ 2016-09-16 14:30 czcb 阅读(1276) 评论(0) 推荐(0) 编辑
摘要:[elk@zjtest7-frontend config]$ cat stdin04.conf input { stdin { }}filter { # drop sleep events grok { match => [ "message" , "(error|ERRO... 阅读全文
posted @ 2016-09-16 11:18 czcb 阅读(413) 评论(0) 推荐(0) 编辑
摘要:[root@xxyy yum.repos.d]# yum install ruby Loaded plugins: refresh-packagekit, securitySetting up Install ProcessResolving Dependencies--> Running tr... 阅读全文
posted @ 2016-09-15 22:47 czcb 阅读(358) 评论(0) 推荐(0) 编辑
摘要:[elk@zjtest7-frontend config]$ cat stdin04.conf input { stdin { }}filter { # drop sleep events grok { match => { "message" => "SELECT aaa... 阅读全文
posted @ 2016-09-15 18:38 czcb 阅读(227) 评论(0) 推荐(0) 编辑
摘要:关于maxmemory的设置,如果redis的应用场景是作为db使用,那不要设置这个选项,因为db是不能容忍丢失数据的。如果作为cache使用,则可以启用这个选项(其实既然有淘汰策略,那就是cache了。。。)指定Redis最大内存限制,Redis在启动时会把数据加载到内存中,达到最大内存后,R... 阅读全文
posted @ 2016-09-15 14:35 czcb 阅读(2652) 评论(0) 推荐(0) 编辑
摘要:zjtest7-frontend:/usr/local/logstash-2.3.4/config# cat stdin04.conf input { stdin { }}filter { # drop sleep events grok { match => { "mes... 阅读全文
posted @ 2016-09-15 12:49 czcb 阅读(2123) 评论(0) 推荐(0) 编辑
摘要:[elk@zjtest7-frontend config]$ cat stdin04.conf input { stdin { }}filter { # drop sleep events grok { match => { "message" => "SELECT SLE... 阅读全文
posted @ 2016-09-15 12:42 czcb 阅读(371) 评论(0) 推荐(0) 编辑
摘要:input { stdin { }}filter { grok { match => ["message","\s*%{TIMESTAMP_ISO8601}\s+(?(\S+)).*"] } if [Level] ... 阅读全文
posted @ 2016-09-15 12:36 czcb 阅读(4493) 评论(0) 推荐(0) 编辑
摘要:Zabbix Housekeeper changes:使用分区表需要关闭zabbix的history/trends的housekeeper。Zabbix 2.0.x:关闭housekeeper需要变更zabbix_server.conf配置文件:DisableHousekeeping=1.关闭了... 阅读全文
posted @ 2016-09-14 17:12 czcb 阅读(421) 评论(0) 推荐(0) 编辑
摘要:[elk@zjtest7-redis bin]$ cat elasticsearch.in.sh if [ "x$ES_MIN_MEM" = "x" ]; then ES_MIN_MEM=1gfiif [ "x$ES_MAX_MEM" = "x" ]; then ES_MAX_MEM... 阅读全文
posted @ 2016-09-14 13:48 czcb 阅读(391) 评论(0) 推荐(0) 编辑
摘要:use Win32::Process::Info;while (1==1){use Sys::Hostname;use HTTP::Date qw(time2iso str2time time2iso time2isoz); use Net::SMTP; if ( $#ARGV ;... 阅读全文
posted @ 2016-09-14 12:00 czcb 阅读(182) 评论(0) 推荐(0) 编辑
摘要:Attempted to send a bulk request to Elasticsearch configured at '["http://192.168.32.152:9200"]', but an error occurred and it failed! Are you sure ... 阅读全文
posted @ 2016-09-14 10:36 czcb 阅读(339) 评论(0) 推荐(0) 编辑
摘要:elasticsearh 中每个节点中需要有相同的插件[2016-09-13 19:25:24,049][INFO ][discovery.zen ] [node02] failed to send join request to master [{node01}{QK57... 阅读全文
posted @ 2016-09-13 19:45 czcb 阅读(398) 评论(0) 推荐(0) 编辑
摘要:-bash-4.1# cat /etc/haproxy/haproxy.cfgglobal log 127.0.0.1 local3 maxconn 65535 chroot /usr/local/haproxy uid 401 gid 401 daemondefaults log glo... 阅读全文
posted @ 2016-09-13 17:16 czcb 阅读(116) 评论(0) 推荐(0) 编辑
摘要:[elk@zjtest7-frontend test]$ cat json.conf input { stdin { }}filter { json{ source =>"message" target =>"jsonconnect" }}output { stdout {... 阅读全文
posted @ 2016-09-13 11:12 czcb 阅读(164) 评论(0) 推荐(0) 编辑
摘要:Grok 正则捕获:\s+(?\d+(?:\.\d+)?)\s+回顾下: (?:pattern) 匹 配 pattern 但不获取匹配结果,也就是说这是一个非获取匹配,不进行存储供以后使用。这在使用 “或” 字符 (|) 来组合一个模式的各个部分是很有用。例如, ‘industr(?:y|... 阅读全文
posted @ 2016-09-13 11:02 czcb 阅读(231) 评论(0) 推荐(0) 编辑
摘要:时间处理(Date)之前章节已经提过,filters/date 插件可以用来转换你的日志记录中的时间字符串,变成 LogStash::Timestamp 对象,然后转存到 @timestamp 字段里output { if [type] == "zj_frontend_access... 阅读全文
posted @ 2016-09-13 10:05 czcb 阅读(439) 评论(0) 推荐(0) 编辑
摘要:filter { grok { match => [ "message" , "\s*%{IPORHOST:clientip}\s+\-\s+\-\s+\[%{HTTPDATE:time}\]\s+\"%{WORD:verb}\s+(?(\S+))\?... 阅读全文
posted @ 2016-09-13 09:05 czcb 阅读(170) 评论(0) 推荐(0) 编辑
摘要:"message" => " 10.168.255.134 [12/Sep/2016:16:30:40 +0800] \"GET /resources/plugins/artDialog/dialog-min.js?v=1&_=1473669040515 HTT... 阅读全文
posted @ 2016-09-12 22:28 czcb 阅读(232) 评论(0) 推荐(0) 编辑
摘要:"@version" => "1", "@timestamp" => "2016-09-12T08:31:06.630Z", "path" => "/data01/applog_backup/winfae... 阅读全文
posted @ 2016-09-12 21:52 czcb 阅读(149) 评论(0) 推荐(0) 编辑
摘要:1、request_time官网描述:request processing time in seconds with a milliseconds resolution; time elapsed between the first bytes were read from the client... 阅读全文
posted @ 2016-09-12 18:48 czcb 阅读(761) 评论(2) 推荐(0) 编辑
摘要:"message" => " 10.252.142.174 [12/Sep/2016:16:43:47 +0800] \"GET /resources/js/toolbar.49fc367e.js?_v=${last.updated}&_=14736698254... 阅读全文
posted @ 2016-09-12 17:41 czcb 阅读(268) 评论(0) 推荐(0) 编辑
摘要:Redis 服务器是Logstash 推荐的Broker选择,Broker 角色就意味会同时存在输入和输出两个插件。5.1.1 读取Redis 数据LogStash::Input::Redis 支持三种data_type(实际上是redis_type),不同的数据类型会导致实际采用不同的Redi... 阅读全文
posted @ 2016-09-12 09:47 czcb 阅读(198) 评论(0) 推荐(0) 编辑
摘要:ACL derivatives : hdr([[,]]) : exact string match 字符串精确匹配 hdr_beg([[,]]) : prefix match hdr_dir([[,]]) : subdir match hdr_dom([[,]])... 阅读全文
posted @ 2016-09-11 16:44 czcb 阅读(235) 评论(0) 推荐(0) 编辑
摘要:"message" => " 10.171.246.184 [11/Sep/2016:14:42:53 +0800] \"GET /wechat/home.html?useragent=android_h5_zjcap&apiver=2 HTTP/1.1\" -... 阅读全文
posted @ 2016-09-11 14:48 czcb 阅读(117) 评论(0) 推荐(0) 编辑
摘要:Configuration OKzjtest7-frontend:/usr/local/logstash-2.3.4/config# ../bin/logstash -f g01.conf Settings: Default pipeline workers: 1Pipeline main st... 阅读全文
posted @ 2016-09-11 14:03 czcb 阅读(134) 评论(0) 推荐(0) 编辑
摘要:zjtest7-frontend:/usr/local/logstash-2.3.4/config# cat g01.conf input {stdin{}} filter { grok { match => { "message" =>"\s+(?\d+(?:\.\d+)... 阅读全文
posted @ 2016-09-11 13:38 czcb 阅读(219) 评论(0) 推荐(0) 编辑
摘要:/********* 把字符串转换成整型zjtest7-frontend:/usr/local/logstash-2.3.4/config# cat geoip.confinput {stdin {} }filter { geoip { source =>"message" add_fi... 阅读全文
posted @ 2016-09-11 12:30 czcb 阅读(196) 评论(0) 推荐(0) 编辑
摘要:zjtest7-frontend:/usr/local/logstash-2.3.4/config# cat geoip.confinput {stdin {} }filter { geoip { source =>"message" add_field => [ "[geoip][sc... 阅读全文
posted @ 2016-09-11 12:00 czcb 阅读(133) 评论(0) 推荐(0) 编辑
摘要:filter { grok { match =>[ "message","%{IPORHOST:clientip} \[%{HTTPDATE:time}\] \"%{WORD:verb} %{URIPATHPARAM:request}\?.* HTT... 阅读全文
posted @ 2016-09-11 11:01 czcb 阅读(408) 评论(0) 推荐(0) 编辑
摘要:nginx 服务器配置:jrhwpt01:/root# cat /etc/rsyslog.conf $ModLoad imuxsock # provides support for local system logging (e.g. via logger command)$ModLoad im... 阅读全文
posted @ 2016-09-10 22:24 czcb 阅读(791) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-09-10 09:47 czcb 阅读(581) 评论(0) 推荐(0) 编辑
摘要:zjtest7-redis:/odbc_es# cat /odbc_es/run_mysql.sh. ~/.bash_profilecd /root/checkv_date=`date +%Y-%m-%d '--date=1 days ago'`echo $v_datesed -i s/v_da... 阅读全文
posted @ 2016-09-09 15:34 czcb 阅读(287) 评论(0) 推荐(0) 编辑
摘要:JDBC importer for Elasticsearch Java Database 连接(JDBC) 导入运行获取数据从JDBC 源安装:1.在下面的步骤 替换为一个版本,比如 1.7.0.02.下载JDBC importer 版本wget http://xbib.org/reposi... 阅读全文
posted @ 2016-09-09 14:40 czcb 阅读(847) 评论(0) 推荐(0) 编辑
摘要:tomcat 产生core日志:app:/usr/local/apache-tomcat-7.0.55_8082/logs# ulimit -acore file size (blocks, -c) 0data seg size (kbytes, -d) ... 阅读全文
posted @ 2016-09-09 10:02 czcb 阅读(496) 评论(0) 推荐(0) 编辑
摘要:$(function(){ var _del_time_list = $("select[name='del_time_list']"); var _del_table_name = $("select[name='del_table_name']"); var _button = $("in... 阅读全文
posted @ 2016-09-09 09:23 czcb 阅读(1123) 评论(0) 推荐(0) 编辑
摘要:10.168.255.134 [09/Oct/2016:15:28:52 +0800] "GET / HTTP/1.1" - 200 23388 "" "Mozilla/5.0 (Linux; U; Android 4.4.4; zh-cn; MX4 Pro Build/KTU84P) App... 阅读全文
posted @ 2016-09-07 11:38 czcb 阅读(154) 评论(0) 推荐(0) 编辑
摘要:input(type="imfile"File="/usr/local/apache-tomcat-7.0.55_8082/logs/localhost_access_log.*.txt"Tag="zjzc-api-access01"Severity="info"Facility="local5... 阅读全文
posted @ 2016-09-07 10:12 czcb 阅读(285) 评论(0) 推荐(0) 编辑
摘要:多项选择有时候我们会碰上一个日志有多种可能格式的情况。这时候要写成单一正则就比较困难,或者全用 | 隔开又比较丑陋。这时候,logstash 的语法提供给我们一个有趣的解决方式。文档中,都说明 logstash/filters/grok 插件的 match 参数应该接受的是一个 Hash 值。... 阅读全文
posted @ 2016-09-07 09:38 czcb 阅读(299) 评论(0) 推荐(0) 编辑
摘要:logstash 中的贪婪匹配:10.252.142.174 - - [06/Sep/2016:08:41:36 +0800] "GET /api/validate/code/send?mobilePhone=18652221499&messageType=1&_=1454297673274 ... 阅读全文
posted @ 2016-09-06 22:17 czcb 阅读(140) 评论(0) 推荐(0) 编辑
摘要:10.252.142.174 - - [06/Sep/2016:08:41:36 +0800] "GET /api/validate/code/send?mobilePhone=18652221499&messageType=1&_=1454297673274 HTTP/1.1" 200 52 ... 阅读全文
posted @ 2016-09-06 22:11 czcb 阅读(297) 评论(0) 推荐(0) 编辑
摘要:2016/05/31 14:47:21 [emerg] 14629#0: location "/nginx_status" is outside location "/php-fpm_status" in /usr/local/nginx/conf/nginx.conf:1416(?%{YEAR... 阅读全文
posted @ 2016-09-06 21:37 czcb 阅读(138) 评论(0) 推荐(0) 编辑
摘要:----------------------------------------------"1"模式;\"(?(\S+)?)\"?匹配0个或1个该前一个字符输出:{ "id": [ [ "1" ] ]}/*******************************"... 阅读全文
posted @ 2016-09-06 19:54 czcb 阅读(278) 评论(0) 推荐(0) 编辑
摘要:is outside location 怎么匹配?. 匹配除换行外的所有单个字符,通常与*合用? 匹配0个或1个该前一个字符.* 所有任意数量字符。 与前一字符结合,可不出现字符。+: 一个或多个相同的前导字符(模式). 如:/de+f/ 匹配的是def,deef,deeeef等。/*****... 阅读全文
posted @ 2016-09-06 19:33 czcb 阅读(616) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-09-06 19:03 czcb 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-09-06 15:27 czcb 阅读(340) 评论(0) 推荐(0) 编辑
摘要:06_Elasticsearch 批量获取mget现在有:http://192.168.32.81:9200/bank/bank_account/1http://192.168.32.81:9200/bank/bank_account/2http://192.168.32.81:9200/ban... 阅读全文
posted @ 2016-09-06 14:27 czcb 阅读(149) 评论(0) 推荐(0) 编辑
摘要:05_Elasticsearch 单模式下API的增删改查操作安装marvel 插件:zjtest7-redis:/usr/local/elasticsearch-2.3.4# bin/plugin install license-> Installing license...Trying ht... 阅读全文
posted @ 2016-09-06 13:56 czcb 阅读(141) 评论(0) 推荐(0) 编辑
摘要:03_Elasticsearch如何安装以及相关插件的介绍elasticsearch -d (-d参数是为了让服务后台运行)Elasticsearch 目录结构:文件夹 作用/bin 运行ElasicSearc... 阅读全文
posted @ 2016-09-06 11:03 czcb 阅读(134) 评论(0) 推荐(0) 编辑
摘要:2.2 CURL 命令的讲解:1.就是以命令的方式来执行HTTP 协议的请求的工具2.可以通过CURL 操作HTTP的GET/POST/PUT/DELETE方法jrhmpt01:/root# curl -i www.baidu.comHTTP/1.1 200 OKServer: bfe/1.0.... 阅读全文
posted @ 2016-09-05 21:51 czcb 阅读(175) 评论(0) 推荐(0) 编辑
摘要:2.2 CURL 命令的讲解:1.就是以命令的方式来执行HTTP 协议的请求的工具2.可以通过CURL 操作HTTP的GET/POST/PUT/DELETE方法jrhmpt01:/root# curl -i www.baidu.comHTTP/1.1 200 OKServer: bfe/1.0.... 阅读全文
posted @ 2016-09-05 21:51 czcb 阅读(115) 评论(0) 推荐(0) 编辑
摘要:一个采用Restfull API 标准的高扩展性和高可用性的实时数据分析的全文搜索工具Elasticsearch 涉及到的一些概念:1.Node(节点): 单个的装有Elasticsearch服务并且提供故障转移和扩展的服务器2.Cluster(集群):一个集群就是有一个或者多个node组织在... 阅读全文
posted @ 2016-09-05 14:40 czcb 阅读(170) 评论(0) 推荐(0) 编辑
摘要:UPDATE ClientBankInfo SET status = 3WHERE sn IN (SELECT sn FROM zjzc.ClientBankInfo WHERE car... 阅读全文
posted @ 2016-09-05 14:05 czcb 阅读(171) 评论(0) 推荐(0) 编辑
摘要:进入到安装目录下的src/ui/public/vislib/visualizations/目录1.编辑_map.js文件12//url: 'https://otile{s}-s.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpeg',url: 'http://we... 阅读全文
posted @ 2016-09-02 22:55 czcb 阅读(123) 评论(0) 推荐(0) 编辑
摘要:1.安装GeoIP数据库cd /usr/local/logstash/etccurl -O "http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz"gunzip GeoLiteCity.dat.gz1232.配... 阅读全文
posted @ 2016-09-02 18:11 czcb 阅读(297) 评论(0) 推荐(0) 编辑
摘要:filter { grok { match => { "message" => "%{IPORHOST:clientip} \[%{HTTPDATE:time}\] \"%{WORD:verb} %{URIPATHPARAM:request} HTTP... 阅读全文
posted @ 2016-09-01 17:42 czcb 阅读(142) 评论(0) 推荐(0) 编辑
摘要:1.数据写入:zjtest7-frontend:/usr/local/logstash-2.3.4/config# curl -XPOST http://192.168.32.80:9200/logstash-2015.06.21/testlog -d '{"date" :"1999999999... 阅读全文
posted @ 2016-09-01 15:56 czcb 阅读(242) 评论(0) 推荐(0) 编辑
摘要:zjtest7-frontend:/usr/local/logstash-2.3.4/config# curl -XGET http://192.168.32.80:9200/logstash-2015.06.21/testlog/_search?q=fir{"took":4,"timed_ou... 阅读全文
posted @ 2016-09-01 15:43 czcb 阅读(280) 评论(0) 推荐(0) 编辑
摘要:之前的章节讲述的都是单个Logstash进程,及其对数据的读取,解析和输出处理。但是,在生产环境中,从每台应用服务器运行logstash 进程并将数据直接发送到Elasticsearch里,显然不是第一选择,原因有三:1. 过多的客户端连接对Elaticsearch 是一种额外的压力2. 网络抖... 阅读全文
posted @ 2016-09-01 14:36 czcb 阅读(137) 评论(0) 推荐(0) 编辑
摘要:示例sql: # User@Host: zjzc_app[zjzc_app] @ [10.22.18.164] Id: 6069153 # Query_time: 153.908486 Lock_time: 0.000113 Rows_sent: 27 Rows_examined: 43... 阅读全文
posted @ 2016-09-01 14:00 czcb 阅读(1280) 评论(0) 推荐(0) 编辑
摘要:SQL> create table test(id int PRIMARY KEY, name char(10));表已创建。Session 1:SQL> select * from v$mystat where rownum select * from test;未选定行SQL> inse... 阅读全文
posted @ 2016-09-01 13:21 czcb 阅读(207) 评论(0) 推荐(0) 编辑
摘要:nginx 错误日志格式:2016/09/01 11:23:36 [error] 28388#0: *14549 open() "/var/www/zjzc-web-frontEnd/images/account/profitBttom2.png" failed (2: No such file... 阅读全文
posted @ 2016-09-01 11:25 czcb 阅读(131) 评论(0) 推荐(0) 编辑
摘要:http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr [$time_local] "$request" ' ... 阅读全文
posted @ 2016-09-01 11:17 czcb 阅读(262) 评论(0) 推荐(0) 编辑
摘要:input { stdin { add_field => { "@timestamp" => "2016-08-31T06:35:18.536Z" } codec=>"plain" tags =>["add"] type=>"std" }}out... 阅读全文
posted @ 2016-09-01 10:59 czcb 阅读(134) 评论(0) 推荐(0) 编辑