I am using collectd (c plugin) with graphite, how do I merge the graphs together (cpu, network,etc)?

StackOverflow https://stackoverflow.com/questions/19521762

  •  01-07-2022
  •  | 
  •  

Question

I am using collectd (c plugin) with graphite, and all the info like eth0, eth1 cpu0, cpu1, cpu2 etc are saved in graphite as one graph.

How do I merge the graphs together, like all the CPU's? Its somehow not very intuitive~

Thank you

Was it helpful?

Solution

It would be more helpful if you indicate the actual metric name. Elaborate what you mean bt- saved in graphite as one graph..

Assuming your metrics are as follows(default behavior)-

data.server1.eth0

data.server1.eth1

data.server1.cpu0

data.server1.cpu1

data.server1.cpu2

data.server1.cpu3

and

data.server2.cpu0

data.server1.cpu1

data.server1.cpu2

data.server1.cpu3

You can 'see' the graphs in 3 ways-

  1. Graphite webapp (default <ip> of your server)
  2. Graphite dashboard ( <ip>/dashboard )
  3. Render URL-API ( <ip>/render?)

You can go to the graphite webapp and try to add the metric using the GUI- data.server1.* - If you want all metrics of that server. data.*.eth* - If you want all NICs on all servers.

I assume you are aware of wildcards. All Python (hence Perl) style wildcards are acceptable.

OTHER TIPS

Saving graphs to graphite is as straightforward as any GUI, but only authenticated 'graphite users' can save user-graphs. You must have created a default root user while setting up graphite. The user in context here is the same as the django admin created during installation.

cd /opt/graphite/webapp/graphite/

echo "from django.contrib.auth.models import User; User.objects.create_superuser('$GRAPHITE_USERNAME', '$GRAPHITE_EMAIL', '$GRAPHITE_PASSWORD')" | sudo python manage.py shell

With optimal settings and default setup, something like this will let you add more users to the same. Technically, the authentication is done against django's db. After that you'd have to login at the top of the webapp.

<graphite_host>/account/login

Do restart carbon and apache after these, though. Once you're logged in, you will see little thumbnail of a 'save graph' icon on the top left corner of the graph. Once you've customized the graph, you can save it. To get back to the saved user graphs, you'll have to expand the sub-tree to the left, under the node 'User=graphs'.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top