Open umarizulkifli opened 8 years ago
This module does almost no error handling at present and will blow up if you don't provide it with a valid metric. If your metric is stored in, $basedir/foo/bar.rrd
then try http://localhost:12345/metric?metric=foo/bar
Hi,
I configure config.js as below
var config = { 'host': '0.0.0.0', 'port': 12345, 'basedir': '/usr/share/cacti/rra/' }
However when i run node serve.js and try to curl localhost:12345/metric I encounter error message as below
TypeError: Cannot read property 'indexOf' of undefined at /home/umari/rrd-server/index.js:12:14 at Layer.handle [as handle_request] (/home/umari/rrd-server/node_modules/express/lib/router/layer.js:95:5) at next (/home/umari/rrd-server/node_modules/express/lib/router/route.js:131:13) at Route.dispatch (/home/umari/rrd-server/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/umari/rrd-server/node_modules/express/lib/router/layer.js:95:5) at /home/umari/rrd-server/node_modules/express/lib/router/index.js:277:22 at Function.process_params (/home/umari/rrd-server/node_modules/express/lib/router/index.js:330:12) at next (/home/umari/rrd-server/node_modules/express/lib/router/index.js:271:10) at expressInit (/home/umari/rrd-server/node_modules/express/lib/middleware/init.js:33:5) at Layer.handle [as handle_request] (/home/umari/rrd-server/node_modules/express/lib/router/layer.js:95:5)