Giter Club home page Giter Club logo

Comments (3)

laiwei avatar laiwei commented on August 10, 2024 1

agent_hostname 和 instance 的表意是不一样的。 @oiooj

比如,categraf 会部署在node上,采集某个MySQL的metrics,那么此时agent_hostname = node_name,instance = mysql_ip:port

from categraf.

oiooj avatar oiooj commented on August 10, 2024

emmm, 看了下,有一些中间件或者服务我们有 instances 的概念,为了多实例的支持,在 toml 中以数组的形式存在 [[instances]],但是我们如果想要去确定某个 instance 一定是 instance 下的某个 key,比如 mysql 中的 address,或者 docker 中的 endpoint:


#mysql
# [[instances]]
# address = "127.0.0.1:3306"
# username = "root"
# password = "1234"

...

# Docker
[[instances]]
# # append some labels for series
# labels = { region="cloud", product="n9e" }

# # interval = global.interval * interval_times
# interval_times = 1

## Docker Endpoint
##   To use TCP, set endpoint = "tcp://[ip]:[port]"
##   To use environment variables (ie, docker-machine), set endpoint = "ENV"
endpoint = "unix:///var/run/docker.sock"

我们为什么不直接使用这个 key 来做实例的 unique label,而不是统一使用 instance, 因为这样使用起来标签语义理解上也更加准确,instance = "unix:///var/run/docker.sock" 总感觉怪怪的。从设计上看 instance 也不是每个插件必有的。

from categraf.

UlricQin avatar UlricQin commented on August 10, 2024

emmm, 看了下,有一些中间件或者服务我们有 instances 的概念,为了多实例的支持,在 toml 中以数组的形式存在 [[instances]],但是我们如果想要去确定某个 instance 一定是 instance 下的某个 key,比如 mysql 中的 address,或者 docker 中的 endpoint:


#mysql
# [[instances]]
# address = "127.0.0.1:3306"
# username = "root"
# password = "1234"

...

# Docker
[[instances]]
# # append some labels for series
# labels = { region="cloud", product="n9e" }

# # interval = global.interval * interval_times
# interval_times = 1

## Docker Endpoint
##   To use TCP, set endpoint = "tcp://[ip]:[port]"
##   To use environment variables (ie, docker-machine), set endpoint = "ENV"
endpoint = "unix:///var/run/docker.sock"

我们为什么不直接使用这个 key 来做实例的 unique label,而不是统一使用 instance, 因为这样使用起来标签语义理解上也更加准确,instance = "unix:///var/run/docker.sock" 总感觉怪怪的。从设计上看 instance 也不是每个插件必有的。

你这是个问题?还是陈述心得?我没看懂...

from categraf.

Related Issues (20)

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.