Skip to content
This repository has been archived by the owner on Aug 3, 2020. It is now read-only.

Javascript error in 3.0 dev with flapjack curl_json rrds #133

Open
jessereynolds opened this issue Jul 25, 2013 · 2 comments
Open

Javascript error in 3.0 dev with flapjack curl_json rrds #133

jessereynolds opened this issue Jul 25, 2013 · 2 comments
Labels
Milestone

Comments

@jessereynolds
Copy link
Collaborator

Uncaught TypeError: Cannot call method 'replace' of undefined (graph.js:93)

I'm running collectd 5.3 on mac, so this error may not hold true on supported platforms. Other rrd files draw fine in visage but the ones i'm generating with the curl_json plugin don't draw any graphs in the ui, and throw a javascript error.

screen shot 2013-07-25 at 5 50 40 pm

screen shot 2013-07-25 at 5 51 12 pm

@jessereynolds
Copy link
Collaborator Author

json retrieved from visage for the missing graph is at the following gist: https://gist.github.com/jessereynolds/6077848

@jessereynolds
Copy link
Collaborator Author

I'm wondering if it's the second hyphen in the type-type_instance section of the metric address. Line 93 of graph.js is in here (stash.replace...) :

    else if ( plugin.test(/^curl_json/) ) {
        var stash = instance.split('-')[2];
        var stash = stash.replace(/[-|_]/, ' ');
        name = stash
    }

{"curl_json-flapjack":{"derive-all_time-action"

Actually it looks like it's trying to find three strings after splitting "curl_json-flapjack" by "-", and there are only 2, hence stash is undefined.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant