使用librato-metrics节点包为librato指标设置标签属性

时间:2019-03-06 05:46:32

标签: node.js librato

我正在使用node-metrics软件包发布librato指标,但无法弄清楚如何向指标添加标签。我试过下面的代码,但它不起作用。它可以很好地发布指标,但我看不到任何附加到指标的标签,如下所示:https://www.librato.com/docs/kb/faq/glossary/whats_a_tag/

代码:

client.post("/metrics", {
                gauges: [
                    {name: "NameOfMetrics", value: 55, tag: "tag1"}
                ],
            }, function(err, response) {
                if (err) {
                    console.log("ERROR: in publishing metrics - " + err.message);
                }
            });

1 个答案:

答案 0 :(得分:0)

发现我的帐户不支持标签,但是支持用于过滤指标的来源属性:https://www.librato.com/docs/kb/faq/account_questions/tags_or_sources/

相关问题