简体   繁体   English

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

[英]Setting tag property for librato metrics with librato-metrics node package

I am using node-metrics package for posting librato metrics and not able to figure out how to add tags to the metrics. 我正在使用node-metrics包发布librato指标,但无法弄清楚如何向这些指标添加标签。 I tried below code but it does not work. 我试过下面的代码,但它不起作用。 It posts the metrics fine but I do not see any tags attached to the metrics as shown here: https://www.librato.com/docs/kb/faq/glossary/whats_a_tag/ 它可以很好地发布指标,但是我看不到任何附加到指标的标签,如下所示: https : //www.librato.com/docs/kb/faq/glossary/whats_a_tag/

code: 码:

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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM