# Receive events from 24224/tcp
# This is used by log forwarding and the fluent-cat command
@type forward
port 24224
# http://this.host:9880/myapp.access?json={"event":"data"}
@type http
port 9880
每个source指令必须包含 @type 参数。@type 参数指定了何种输入插件将被使用。
插播一下:Routing
source 将事件提交到Fluentd的路由引擎。每个事件由3部分实体组成:tag, time 和 record。tag 是由’.'分隔的字符串(如:myapp.access),并且作为Fluentd内部路由的指示。time字段由 input 插件指定,并且必须得是Unix时间格式。record 是一个JSON对象。
2. match: 告诉 fluentd 该干什么!
match 指令查找所有具有匹配tag的事件,并且进行处理。match 指令最常见的用法是将事件输出到其它系统(因此,对应于match指令的插件被称为"output"插件)。Fluentd的标准输出插件包括 file 和 forward。现在来加入到配置文件中。
# Receive events from 24224/tcp
# This is used by log forwarding and the fluent-cat command
@type forward
port 24224
# http://this.host:9880/myapp.access?json={"event":"data"}
@type http
port 9880
# Match events tagged with "myapp.access" and
# store them to /var/log/fluent/access.%Y-%m-%d
# Of course, you can control how you partition your data
# with the time_slice_format option.
@type file
path /var/log/fluent/access
每个 match 指令必须包括一个匹配模板和一个 @type 参数。只有tag 匹配到模板的事件会被送到输出目的地(在上述示例中,只有tag为"myapp.access"的事件会被匹配)。@type 参数指定了将要使用的 output 插件。
3. filter: 事件处理管道
filter 指令与 match 有相同的语法,但 filter 可以将处理串成管道。 使用 filter 时事件流看起来会像这样:
Input -> filter 1 -> ... -> filter N -> Output
现在添加一个标准的 record_transformer filter 到刚刚写的 match 示例中。
在数据库系统中存储过程是必不可少的利器,存储过程是预先编译好的为实现一个复杂功能的一段Sql语句集合。它的优点我就不多说了,说一下我碰到的问题吧。我在项目开发的过程中需要用存储过程来实现一个功能,其中涉及到判断一张表是否已经建立,没有建立就由存储过程来建立这张表。
CREATE OR REPLACE PROCEDURE TestProc
IS
fla
使用jsonp不能发起POST请求。
It is not possible to make a JSONP POST request.
JSONP works by creating a <script> tag that executes Javascript from a different domain; it is not pos
(一)Keepalived
(1)安装
# cd /usr/local/src
# wget http://www.keepalived.org/software/keepalived-1.2.15.tar.gz
# tar zxvf keepalived-1.2.15.tar.gz
# cd keepalived-1.2.15
# ./configure
# make &a