https://github.com/facebook/scribe/wiki/Scribe-Configuration
安装目录facebook-scribe-2ee14d3/examples下
examples/
├── example1.conf #模拟服务端
├── example2central.conf #在同一台机器模拟服务端的配置
├── example2client.conf #在同一台机器模拟客户端的配置
├── hdfs_example2.conf
├── hdfs_example.conf
├── README
├── scribe_cat #python客户端
└── scribe_ctrl #管理scribe实例的工具
Scribe can be configured with
1.scribe运行时的配置文件可以在命令行用-c指定
2.默认的配置位置在env_default.h中的DEFAULT_CONF_FILE_LOCATION设置(/usr/local/scribe/scribe.conf)
Global Configuration Variables
port
1.设置scribe server监听在哪个端口上
2.默认是0,可以在命令行通过-p指定。
max_msg_per_second
1.used in scribeHandler::throttleDeny
2.default 0
3.the default value is 0 and this parameter is ignored if the value is 0. With recent changes this parameter has become less relevant, and max_queue_size should be the parameter used for throttling business
max_queue_size in bytes
1.设置消息队列的大小,用在scribeHandler::Log中
2.默认值是5,000,000 bytes。
check_interval in seconds
1.设置多长时间检测一次存储,
2.默认值是5秒。
new_thread_per_category yes/no
1.值如果是yes,则会为每一个category创建一个线程,如果是no,则所有定义的store只创建一个线程,
2.对于prefix stores或者default store,如果值是no,则会导致所有匹配这个category的消息都由一个单独的存储来处理,否则,将为每一个唯一的category创建存储。
3.默认yes
num_thrift_server_threads
1.监听进入消息的线程数
2.默认是3。
Example:
port=1463
max_msg_per_second=2000000
max_queue_size=10000000
check_interval=3
Store Configuration
scribe server根据配置文件中store的定义来记录消息,每一个store必须指定消息category用来处理三种异常情况:
default store
默认category处理任何不能被其他store处理的category,只能有一个默认store
prefix stores
如果一个指定的category以*结尾,这个存储将处理所有以指定前缀开头的category 。
multiple categories
在一个store的定义中可以使用'categories='创建多个store
- categories=rock paper* scissors
在上面三种情况下,scribe将为每一个唯一的category创建一个子目录,除非new_thread_per_category被设置为false。
Store Configuration Variables
category
设置哪些消息被这个store处理。
type
- file
- buffer
- network
- bucket
- thriftfile
- null
- mutil
。
target_write_size 默认是16,384 bytes
消息在被处理之前,category的消息队列可以增长到多大。
max_batch_size默认是1,024,000 bytes
在内存存储队列中一次可以被处理的数据量。
max_write_interval 默认是1秒
决定在这些消息处理之前在给定category的消息队列可以用多长时间。
must_succeed yes/no
1.如果一个store处理消息失败,是否重新进入消息队列排队。
2.如果设置为no,一个store不能处理这些消息的话,消息将被丢弃。
3.建议:使用缓存来指一个定二级存储来处理失败的日志。
4.默认是yes
Example:
<store>
category=statistics
type=file
target_write_size=20480
max_write_interval=2
</store>
File Store Configuration
file store把信息写入文件中。
file_path
默认路径是‘/tmp’。
base_filename
默认category名称。
use_hostname_sub_directoryyes/no, default no
是否使用server的hostname建立子目录
sub_directory string
使用指定的名称创建子目录。
rotate_period “hourly”, “daily”, “never”, or number[suffix]; “never” by default
1.设置多久创建一个文件,
2.suffix可以是“s”, “m”, “h”, “d”, “w”,‘s’是默认值。
rotate_hour0-23, 1 by default
如果rotate_period是daily,设置每天何时创建新文件
rotate_minute 0-59, 15 by default
如果rotate_period是daily或者hourly,设置一个小时多久后可以创建新文件,值可以是0-59,默认是15。
max_size1,000,000,000 bytes by default
在轮转一个文件前,该文件可以增长到多大
write_meta“yes” or anything else; false by default
如果文件被轮转,最后一行将包含"scribe_meta",跟着就是下一个文件名。
fs_type
支持两种类型std和hdfs,默认是std。
chunk_size
默认是0,如果一个chunk大小被指定,在文件内没有消息能够跨越chunk的边界,除非有消息的大小超过chunk的大小。
add_newlines 0 or 1, 0 by default
默认是0,如果是1,则在每行后面加入换行符。
create_symlink “yes” or anything else; “yes” by default
默认值是yes,如果是真,则维护一个符号连接到最近被写入的文件。
write_stats yes/no, yes by default
是否对每一个store创建一个scribe_stats文件用来跟踪文件的写入轨迹,默认yes。
max_write_size
1000000 bytes by default. The file store will try to flush the data out to the file system in chunks of max_write_size of bytes. max_write_size cannot be more than max_size. Say due to target_write_size a certain number of messages were buffered. And then the file store was called to save these messages. The file-store will save these messages at least max_write_size bytes sized chunks at a time. The last write that the file store will make can be smaller than max_write_size.
Example:
<store>
category=sprockets
type=file
file_path=/tmp/sprockets
base_filename=sprockets_log
max_size=1000000
add_newlines=1
rotate_period=daily
rotate_hour=0
rotate_minute=10
max_write_size=4096
</store>
Network Store Configuration
network store向其它scribe server发送消息,Scribe保持持久的链接打开以至于它能够发送消息。在正常运行的情况下,scribe会基于当前缓存中存在多少条消息等待发送而分批次的发送。
remote_host
远程主机的ip或者名称。
remote_port
远程主机的端口。
timeout
socket超时时间,毫秒,默认为DEFAULT_SOCKET_TIMEOUT_MS,在store.h中设定默认为5000毫秒。
use_conn_pool
是否使用连接池代替为每一个远程主机打开的链接,默认是false。
Example:
<store>
category=default
type=network
remote_host=hal
remote_port=1465
</store>
Buffer Store Configuration
buffer store中包含两个子store:primary和secondary。日志会先尝试写到primary store中,如果primary store出现故障,则scribe会将日志暂存到secondary store中,待primary store恢复性能后,再将secondary store中的数据拷贝到primary store中(除非replay_buffer=no)。其中,secondary store仅支持两种store:file和null。
buffer_send_rate 1 by default
在check_interval周期内,执行多少次secondary store读出一组消息并且发送到primary store中。
retry_interval 300 seconds by default
primary store写入失败后,等待多久尝试重新发送primary store。
retry_interval_range 60 seconds by default
将在retry_interval的区间内随机的选择一个重新发送时间。
replay_buffer yes/no, default yes
如果设置为no,将不会从secondary store迁移消息到primary store。
Example:
<store>
category=default
type=buffer
buffer_send_rate=1
retry_interval=30
retry_interval_range=10
<primary>
type=network
remote_host=wopr
remote_port=1456
</primary>
<secondary>
type=file
file_path=/tmp
base_filename=thisisoverwritten
max_size=10000000
</secondary>
</store>
Bucket Store Configuration
bucket stores使用消息前缀作为key,将消息hash到多个文件中去
num_bucketsdefaults to 1
1.hash到buckets的个数
2.不能被hash进bucket的消息将被放入一个特别的0号bucket。
bucket_type
“key_hash”, “key_modulo”, or “random”。
delimiter
值必须是1~255之间的ascii,默认是':'
第一次出现在消息前缀中的delimiter在‘hash/modulo’中将被用作key。
remove_key
是否移除key的前缀,默认是no。
bucket_subdir
如果使用一个单独定义的bucket,则每一个子目录的名称根据bucket的数量编号生成。
Example:
<store>
category=bucket_me
type=bucket
num_buckets=5
bucket_subdir=bucket
bucket_type=key_hash
delimiter=58
<bucket>
type=file
fs_type=std
file_path=/tmp/scribetest
base_filename=bucket_me
</bucket>
</store>
Instead of using a single ‘bucket’ definition for all buckets, you can specify each bucket explicitly:
<store>
category=bucket_me
type=bucket
num_buckets=2
bucket_type=key_hash
<bucket0>
type=file
fs_type=std
file_path=/tmp/scribetest/bucket0
base_filename=bucket0
</bucket0>
<bucket1>
...
</bucket1>
<bucket2>
...
</bucket2>
</store>
You can also bucket into network stores as well:
<store>
category=bucket_me
type=bucket
num_buckets=2
bucket_type=random
<bucket0>
type=file
fs_type=std
file_path=/tmp/scribetest/bucket0
base_filename=bucket0
</bucket0>
<bucket1>
type=network
remote_host=wopr
remote_port=1463
</bucket1>
<bucket2>
type=network
remote_host=hal
remote_port=1463
</bucket2>
</store>
Null Store Configuration
Null store告诉scribe对给定的category,忽略所有的消息。
Example:
<store>
category=tps_report*
type=null
</store>
Multi Store Configuration
一个multi store会将消息转发到多个子stores中去
子store以“store0”, “store1”, “store2”命名。
report_success “all” or “any”, defaults to “all”
是否所有substores或任何substores必须成功地记录消息。
Example:
<store>
category=default
type=multi
target_write_size=20480
max_write_interval=1
<store0>
type=file
file_path=/tmp/store0
</store0>
<store1>
type=file
file_path=/tmp/store1
</store1>
</store>
Thriftfile Store Configuration
Thriftfile Store 类似与 File store,只是它将消息存储在Thrift的 TFileTransport file.
file_path: defaults to “/tmp”
分享到:
相关推荐
scribe安装配置文档[汇编].pdf
Groove Scribe 是一个针对鼓手的 HTML 应用程序。Groove Scribe 是一个点击式创作系统,用于创建鼓乐谱,也是一种用于...配置:无 依赖项 谷歌的 Leto 字体 谷歌的 url 缩短 api 部署说明 将文件部署到 HTTP 服务器。
安装 最新发布版本: 0.1.0 。 请参阅 。 Maven 依赖: < groupId>com.github.ddth</ groupId> < artifactId>ddth-log2scribe < version>0.1.0 用法 Log4j 配置 log4j.appender.X=...
:waving_hand: Scribe可以帮助您自动生成文档,但是如果您真的想制作友好,可维护和可测试的API文档,则还需要了解一些其他信息。 所以我为你做。 :hugging_face: 特征 漂亮HTML文档页面,包括随附的代码示例和友好...
配置:无依存关系Google的Leto字体Google的网址缩短API 部署说明将文件部署到HTTP服务器。贡献准则编写测试代码审查其他指引我要和谁说话? github中的文件问题: : montulli dot org的lou是管理员和作者。 他无法...
Scribe并不是从头开始构建现有的日志记录框架,而是承担了它们的性能和设计缺陷,它是从头开始构建的,可以在Scala,Scala.js和Scala Native中提供快速有效的日志记录,而无需配置文件或其他依赖项。 日志的所有...
:waving_hand: Scribe可帮助您自动生成文档,但是如果您真的想制作友好,可维护和可测试的API文档,还需要了解一些其他信息。 所以我为你做。 产品特点 漂亮HTML文档页面,包括随附的代码示例和友好的文本 附带的...
隶一种在Discord上录制语音呼叫的漫游器。... 有关更多详细信息,请参见...配置(环境变量) DISCORD_TOKEN参见 GOOGLE_APPLICATION_CREDENTIALS请参阅 GOOGLE_SPEECH_MODEL请参阅 GOOGLE_SPEECH_USE_ENHANCED_MODEL请参阅
使用您喜欢的文本编辑器(根目录中的config.json)配置Scribeline 运行Scribeline: nodemon app / Scribeline中的nodemon app或node app.js Copyright 2015 Chaoyi Zha <me [at] cydrobolt [dot] c
要在您的应用程序中注册包,您必须将包添加到$bundles数组中的AppKernel.php文件中: new Scribe\ClockworkBundle\ScribeClockworkBundle()配置编辑您的 symfony config.yml 文件并至少添加以下几行: scribe_c
ScribeStripeBundle Symfony 包处理与 stripe.com api 的交互以进行支付要求您必须注册一个帐户并从接收 API 密钥PHP5 卷曲 PHP 模块安装将以下内容添加到您的 composer.json 文件中的require块中: "scribe/stripe-...
只需在您的 Python 项目的根目录中运行scribe,它就会找到您的文档。 静态生成:描绘网站很容易托管在 GitHub 页面和其他类似服务上,因为它们输出为标准的静态 HTML 网站。 Markdown Aware:描绘将自动包含您的...
Server 这是整个系统最核心的模块了...把配置的scribe连接地址通过环境变量写入container,container中的app就可以把log推到这个scribe服务器 问题 如果server挂了怎么办? Agent配置了两个server的地址,平时只启动一
PdfScribe v1.0.9 PdfScribe是PDF虚拟打印机。...在应用程序配置文件(PdfScribe.exe.config)中,“ applicationSettings”元素中包含以下设置: AskUserForOutputFilename-如果您希望PdfScribe询问用户将
我们希望您使用org.apache.flume.source.scribe.ScribeSource ,它将从 Brave Zipkin Span Collector 或原始 Zipkin 代码接收 span。 代理应该这样配置: ScribeSource -> Channel of your choice -> ...
有关格式精美的文档,包括编译和安装指南,模块配置指令以及其他信息,有关基于Ruby的RSpec测试体系结构的信息,我们完整的许可信息以及大量其他信息,请访问我们的官方文档页面,网址为: 。 屏幕截图 以下屏幕截图...
本文来自于cnblogs,文章主要讲解了Fluem的一些简单介绍,架构分布式环境部署,高级动态配置等。Flume是一个分布式、可靠、和高可用的海量日志聚合的系统,支持在系统中定制各类数据发送方,用于收集数据;同时,...
Scrawl.js W3C小组划线员的便捷划线员工具。 安装 在本地克隆存储库,然后在此存储库... 将这两个文件配置为满足您的条件后,请参见下文。 命令行用法 要全局安装scrawl,请运行... $ npm i -g 然后... $ scrawl
第一部分 NoSQL入门 第1章 NoSQL的概念及适用范围 2 1.1 定义和介绍 3 1.1.1 背景与历史 3 1.1.2 大数据 5 1.1.3 可扩展性 7 1.1.4 MapReduce 8 1.2 面向列的有序存储 9 ...附录A 安装与配置 278
⼤数据中数据采集的⼏种⽅式 ⼀、采集⼤数据的⽅法 1.1通过系统⽇志采集⼤数据 ⽤于系统⽇志采集的⼯具,⽬前使⽤最⼴泛的有:Hadoop 的Chukwa、ApacheFlumeAFacebook的Scribe和LinkedIn的Kafka等。这 ⾥主要学习...