简体   繁体   中英

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. 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/

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/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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