n9e / prometheus-exporter-collector

64 stars 28 forks source link

init collector #1

Closed lts120784620 closed 4 years ago

UlricQin commented 4 years ago

好的明白,我没有问题

UlricQin commented 4 years ago

突然想到一点,不同的中间件,传入的参数差别不知道大不大,如果传入的参数差别比较大,是否可以类似Prometheus那样做成多个job做一些区分,举个例子:

[
    {
        "target": "mysql",
        "exporter_urls": [],
        "append_tags": ["region=bj", "dept=cloud"],
        "username": "",
        "password": "",
        "timeout": 500
    },
    {
        "target": "redis",
        "exporter_urls": [],
        "append_tags": ["region=bj", "dept=cloud"],
        "timeout": 1000
    }
]
lts120784620 commented 4 years ago

突然想到一点,不同的中间件,传入的参数差别不知道大不大,如果传入的参数差别比较大,是否可以类似Prometheus那样做成多个job做一些区分,举个例子:

[
    {
        "target": "mysql",
        "exporter_urls": [],
        "append_tags": ["region=bj", "dept=cloud"],
        "username": "",
        "password": "",
        "timeout": 500
    },
    {
        "target": "redis",
        "exporter_urls": [],
        "append_tags": ["region=bj", "dept=cloud"],
        "timeout": 1000
    }
]

目前这种配置能覆盖大部分的中间件采集exporter,个人觉得,这种target的方式可能不太适合一些自定义的exporter。

UlricQin commented 4 years ago

好的,之前的几个问题弄完之后咱们再拉会聊聊。尽快让社区用起来,得到一些反馈