Coder Social home page Coder Social logo

liikeuforever / cnos-telegraf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cnosdb/cnos-telegraf

0.0 0.0 0.0 55.85 MB

The plugin-driven server agent for collecting & reporting metrics.

License: MIT License

Shell 0.32% Ruby 0.02% Go 99.37% PowerShell 0.01% Makefile 0.16% Dockerfile 0.01% Ragel 0.10%

cnos-telegraf's Introduction

Cnos-Telegraf

CnosDB-Telegraf 基于 Telegraf 进行开发,增加了一些功能与插件。

原版 Telegraf 文档

README.md

Cnos-Telegraf 的改动说明

Parser Plugin

增加 Parser 插件 OpenTSDB 和 OpenTSDB-Telnet,用于采集 OpenTSDB 的写入请求。

  • OpenTSDB

    通过使用 Input 插件 http_listener_v2 并配置 data_format"opentsdb",将能够解析 OpenTSDB 格式的写入请求。

    [[inputs.http_listener_v2]]
    service_address = ":8080"
    paths = ["/api/put"]
    methods = ["POST", "PUT"]
    data_format = "opentsdb"
  • OpenTSDB-Telnet

    通过使用 Input 插件 socket_listener,并配置 data_format"opentsdbtelnet",将能够解析 OpenTSDB-Telnet 格式的写入请求。

    [[inputs.socket_listener]]
    service_address = "tcp://:8081"
    data_format = "opentsdbtelnet"

Output Plugin

增加 Output 插件 CnosDB,用于将指标输出到 CnosDB。

[[outputs.cnosdb]]
url = "localhost:31006"
user = "user"
password = "pass"
database = "telegraf"
  • 配置介绍
参数 说明
url CnosDB GRpc 服务地址
user 用户名
password 密码
database CnosDB 数据库

Input Plugin

增加配置参数 high_priority_io,用于开启端到端模式。

当设置为 true 时,写入的数据将立即发送到 Output 插件,并根据 Output 插件的返回参数来决定返回值。

[[inputs.http_listener_v2]]
service_address = ":8080"
paths = ["/api/put"]
methods = ["POST", "PUT"]
data_format = "opentsdb"
high_priority_io = true

以上配置与在 Output 章节中的配置相比,增加了 high_priority_io = true 配置项。

构建

  1. 安装 Go >=1.18 (推荐 1.18.0 版本)

  2. 从 Github 克隆仓库:

    git clone https://github.com/cnosdb/cnos-telegraf.git
  3. 在仓库目录下执行 make build

    cd cnos-telegraf
    make build

启动

执行以下指令,查看用例:

telegraf --help

生成一份标准的 telegraf 配置文件

telegraf config > telegraf.conf

生成一份 telegraf 配置文件,仅包含 cpu 指标采集 & influxdb 输出两个插件

telegraf config --section-filter agent:inputs:outputs --input-filter cpu --output-filter influxdb

运行 telegraf 但是将采集指标输出到标准输出

telegraf --config telegraf.conf --test

运行 telegraf 并通过配置文件来管理加载的插件

telegraf --config telegraf.conf

运行 telegraf,仅加载 cpu & memory 指标采集,和 influxdb 输出插件

telegraf --config telegraf.conf --input-filter cpu:mem --output-filter influxdb

cnos-telegraf's People

Contributors

danielnelson avatar sparrc avatar powersj avatar dependabot[bot] avatar sspaink avatar srebhan avatar ssoroka avatar glinton avatar reimda avatar zak-pawel avatar evanphx avatar telegraf-tiger[bot] avatar sjwang90 avatar myalongmire avatar phemmer avatar hipska avatar ivorybilled avatar helenosheaa avatar prydin avatar toddboom avatar srfraser avatar russorat avatar pierref avatar jipperinbham avatar akrantz01 avatar davidgs avatar trovalo avatar brocaar avatar titilambert avatar jackzampolin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.