crholliday / iota-prom-exporter

Iota Exporter for Prometheus Metrics
32 stars 5 forks source link

this.upperBounds.reduce - Can't read property 'reduce' of undefined #20

Closed dwjorgeb closed 6 years ago

dwjorgeb commented 6 years ago

Tried installing and launching, but I keep getting this error

I had the old version and worked fine.

iota-prom-exporter/node_modules/prom-client/lib/histogram.js:70
                this.bucketValues = this.upperBounds.reduce((acc, upperBound) => {
                                                     ^

TypeError: Cannot read property 'reduce' of undefined
    at new Histogram (/home/prometheus/iota-prom-exporter/node_modules/prom-client/lib/histogram.js:70:40)
    at module.exports (/home/prometheus/iota-prom-exporter/zmq/zmq.js:47:33)
    at Object.<anonymous> (/home/prometheus/iota-prom-exporter/app.js:9:42)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Function.Module.runMain (module.js:701:10)
    at startup (bootstrap_node.js:190:16)
crholliday commented 6 years ago

Can you check your config.js and make sure you have the below property set:

    // window for bucketing confirmation times by transaction
    // represents seconds and aggregates a histogram
    confirm_time_buckets: [300, 600, 1200, 2400, 3600, 7200, 21600, 43200],
dwjorgeb commented 6 years ago

@crholliday got it, apparently config by iota.partners doesn't work anymore. Had to add that and the other lines on the sample file, like zmq' lines and whatever...

thanks!

crholliday commented 6 years ago

Thanks I'll close this.