1
おはようございます!NodeJSを使用してlibradoでメトリックを取得する
librato
から単一の番号を取得しようとすると、htmlページで問題が発生しています。
は、私はちょうどメトリックAWS.Billing.EstimatedCharges.total
の最後の値を取得したい、クライアントの名前がその値を過ごしていると、HTMLページ内にすべて一緒にそれを置く私は
(単純ではなく、私には)このAPIを使用しようとしていますhttps://github.com/goodeggs/librato-node そして、私はまだこの問題を解決する方法を考え出していません。
ps:埋め込みグラフは使用できません。
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); });
こんにちは、SOへようこそ!コードで試したことを表示できますか – Fuzzybear
var http = require( 'http'); http.createServer(function(req、res){ })listen(1337、 "127.0.0.1"); console.log( 'サーバーはhttp://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(); //オプションでコールバックを取ります) }); //エラーハンドラを指定するのを忘れないでください。そうでなければエラーがスローされます。 librato.on( 'error'、function(err){ console.error(err); }); – Rando1234
この後、私は何をするべきかわからない – Rando1234