Giter Site home page Giter Site logo

Comments (6)

anryko avatar anryko commented on July 17, 2024

Hi Mike,
This plugin works OK for me with the default configuration. I'm testing with Grafana 2.6.0 and InfluxDB v0.9.6.1.

Could you check if series are present in InfluxDB?

$ curl -sG 'http://localhost:8086/query?pretty=true' --data-urlencode "db=collectd" --data-urlencode "q=SHOW SERIES WHERE host = 'vagrant-ubuntu-trusty-64';" | grep interface
                    "name": "interface_rx",
                            "interface_rx,host=vagrant-ubuntu-trusty-64,instance=eth0,type=if_errors",
                            "interface_rx,host=vagrant-ubuntu-trusty-64,instance=eth0,type=if_octets",
                            "interface_rx,host=vagrant-ubuntu-trusty-64,instance=eth0,type=if_packets",
                    "name": "interface_tx",
                            "interface_tx,host=vagrant-ubuntu-trusty-64,instance=eth0,type=if_errors",
                            "interface_tx,host=vagrant-ubuntu-trusty-64,instance=eth0,type=if_octets",
                            "interface_tx,host=vagrant-ubuntu-trusty-64,instance=eth0,type=if_packets",

Also it would be interesting to see the query generated by Grafana in your case. To get it you should press on the graph title and select "Edit", then switch editor mode for the raw query. In my case it looks like this:

SELECT derivative(mean("value"), 1s) * -1 FROM "interface_rx" WHERE "host" = 'vagrant-ubuntu-trusty-64' AND "instance" = 'eth0' AND "type" = 'if_octets' AND $timeFilter GROUP BY time($interval)

from grafana-influx-dashboard.

mikaelkall avatar mikaelkall commented on July 17, 2024

Hi thanks for you took the time to answer and for a great application. Here are some debug data.

curl -sG 'http://localhost:8086/query?pretty=true' --data-urlencode "db=collectd" --data-urlencode "q=SHOW SERIES WHERE host = 'example.com';" | grep interface "name": "interface_", "interface_,host=example.com,instance=bond0,type=if_packets", "interface_,host=example.com,instance=bond0,type=if_errors", "interface_,host=example.com,instance=bond0,type=if_octets",

The query is not generated at all by Grafana. The other modules cpu_ memory_ df_ and load_
is rendered successful. They all worked right out of the box by just by adding the module in collectd.
I have looked in "getdash.conf.js" and the interface definition is there.

My influxdb version.

curl -sl -I localhost:8086/ping |grep "X-Influxdb-Version" X-Influxdb-Version: 0.9
And grafana.
./grafana -v Version 2.6.0 (commit: v2.6.0)

My setup is that I have ported grafana and influxdb to be OMD compliant ( http://omdistro.org/ )
So maybe my issue is related to that? Will boot a default installation of influx and grafana and investigate if the issue persist. Thanks for your help and patience.

from grafana-influx-dashboard.

mikaelkall avatar mikaelkall commented on July 17, 2024

Just noticed my name of the metric is a bit different from yours. Will investigate if that could be the issue.

from grafana-influx-dashboard.

mikaelkall avatar mikaelkall commented on July 17, 2024

Great thanks that was the problem!

Solution for me was to change

`
// collectd interface plugin configuration
plugins.interface = new Plugin();
plugins.interface.config.multi = true;

plugins.interface.traffic = {
'graph': {
'rx': {
'color': '#447EBC',
'alias': 'octets-rx',
'apply': 'derivative',
'math': '* -1',
'type': 'if_octets'
},
'tx': {
'color': '#508642',
'alias': 'octets-tx',
'apply': 'derivative',
'type': 'if_octets'
}
},
'panel': {
'title': 'Network Traffic on @Metric',
'y_formats': [ 'Bps' ],
'grid': { 'max': null, 'min': null, 'leftMin': null }
}
};

plugins.interface.packets = {
'graph': {
'rx': {
'color': '#447EBC',
'alias': 'packets-rx',
'apply': 'derivative',
'math': '* -1',
'type': 'if_packets'
},
'tx': {
'color': '#508642',
'alias': 'packets-tx',
'apply': 'derivative',
'type': 'if_packets'
}
},
'panel': {
'title': 'Network Packets on @Metric',
'y_formats': [ 'pps' ],
'grid': { 'max': null, 'min': null, 'leftMin': null }
}
};
`

To this

`
// collectd interface plugin configuration
plugins.interface = new Plugin();
plugins.interface.config.multi = true;

plugins.interface.traffic = {
'graph': {
'': {
'color': '#447EBC',
'alias': 'octets-rx',
'apply': 'derivative',
'math': '* -1',
'type': 'if_octets'
},
'': {
'color': '#508642',
'alias': 'octets-tx',
'apply': 'derivative',
'type': 'if_octets'
}
},
'panel': {
'title': 'Network Traffic on @Metric',
'y_formats': [ 'Bps' ],
'grid': { 'max': null, 'min': null, 'leftMin': null }
}
};

plugins.interface.packets = {
'graph': {
'': {
'color': '#447EBC',
'alias': 'packets-rx',
'apply': 'derivative',
'math': '* -1',
'type': 'if_packets'
},
'': {
'color': '#508642',
'alias': 'packets-tx',
'apply': 'derivative',
'type': 'if_packets'
}
},
'panel': {
'title': 'Network Packets on @Metric',
'y_formats': [ 'pps' ],
'grid': { 'max': null, 'min': null, 'leftMin': null }
}
};
`

from grafana-influx-dashboard.

anryko avatar anryko commented on July 17, 2024

This is not right. "tx" and "rx" should be in the metric name, type or instance. Otherwise there is no way for you to know it the data is coming to the interface or out of it. I think you should investigate your collectd interface plugin configuration to get it working right.

from grafana-influx-dashboard.

mikaelkall avatar mikaelkall commented on July 17, 2024

Thanks noticed that after posted. I was just happy the graph was displayed. Think the behaviour may be because of me using latest collectd 5.5. Will investigate the possibility to split it correctly.

from grafana-influx-dashboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.