1 个不稳定版本
0.1.0 | 2020年4月6日 |
---|
#34 in #traffic
30KB
830 行
欢迎来到 syphon 👋
多功能的指标处理器、代理和转发器
安装
git clone github.com/butlerx/syphon
cd syphon
cargo Install
用法
$ syphon -h
syphon 0.1.0
butlerx <[email protected]>
Versatile metrics processor, proxy and forwarder
syphon is designed to accept and route metrics traffic.
Metrics can be received from socket, snooped from live traffic or read from file or grpc.
Metrics can be exportered via file, grpc or udp/tcp
USAGE:
syphon [FLAGS] [OPTIONS]
FLAGS:
-h, --help Prints help information
-p, --print Print default config
-q Silence all output
-V, --version Prints version information
-v Increase message verbosity
OPTIONS:
-c, --config <CONFIG> Config file to load (default: configs/config.toml)
配置
[metric]
# Endpoint for store internal carbon metrics.
# Valid values: "" or "local", "tcp://host:port", "udp://host:port"
endpoint = "local"
# Interval of storing internal metrics. Like CARBON_METRIC_INTERVAL
interval = "1m0s"
[[uploader.udp]]
enabled = false
host = "127.0.0.1"
port = 2004
[[uploader.tcp]]
enabled = false
host = "127.0.0.1"
port = 2004
[[uploader.file]]
enabled = true
path = "metrics_received.txt"
# RegEx pattern to use to Determine if metric should be sent
# Supports full regex from https://docs.rs/regex/1.3.6/regex/
pattern="metric.path*"
# Designed for use with carbon-clickhouse
# https://github.com/lomik/carbon-clickhouse/blob/master/grpc/carbon.proto
[[uploader.grpc]]
enabled = false
host = "127.0.0.1"
port = 2005
[file]
enabled = true
path = "metrics.txt"
[udp]
enabled = true
listen = "127.0.0.1:2003"
# Setting mode to promiscuous sets the interface to promiscuously listen
# Allows to see traffic on a port already in use
# mode = "promiscuous"
[tcp]
enabled = true
listen = "127.0.0.1:2003"
[prometheus]
enabled = true
listen = "127.0.0.1:2006"
运行测试
cargo check
cargo clippy
cargo test
作者
👤 Cian Butler
- 网站: cianbutler.ie
- 推特: @cianbutlerx
- GitHub: @butlerx
- 领英: @butlerx
🤝 贡献
欢迎贡献、问题和功能请求!
请随时查看 问题页面。
展示您的支持
如果此项目对您有帮助,请给一个 ⭐️!
📝 许可协议
版权所有 © 2020 Cian Butler。
本项目遵循 Apache License 2.0 许可协议。
依赖
~14–24MB
~318K SLoC