首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用NodeJS通过librado检索指标

使用NodeJS通过librado检索指标
EN

Stack Overflow用户
提问于 2016-12-19 19:42:21
回答 0查看 70关注 0票数 1

早上好!

我在尝试从librato获取单个数字以在html页面中使用时遇到了麻烦。

我只想获得指标AWS.Billing.EstimatedCharges.total的最后一个值,即使用该值的客户的名称,并将其放在一个HTML页面中(很简单,但对我来说不是这样)

我正在尝试使用这个https://github.com/goodeggs/librato-node接口,但是我仍然不知道如何解决这个问题。

附言:我不能使用嵌入图表。

代码语言:javascript
复制
var http = require('http'); 
http.createServer(function (req, res) { }).listen(1337, "127.0.0.1"); 
console.log('Server running at 127.0.0.1:1337/'); 
var librato = require('librato-node'); 
api = librato.configure({email: 'myemail', token: 'mytoken'}); 
librato.start(); process.once('SIGINT', function() { librato.stop(); 
// stop optionally takes a callback }); 
// Don't forget to specify an error handler, otherwise errors will be thrown
librato.on('error', function(err) { console.error(err); });
EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41221835

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档