0

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

laapsaap
  • 181
  • 11
  • After using it for two weeks, at first it looks complicated and a bit unclear. But damn, its actually quite good and there any many tools that uses graphite as backend. Pretty much different flavors for different people. One tip is to save graphs, read graphite functions documentation and use wildcards alot * – laapsaap Oct 31 '13 at 15:15

2 Answers2

0

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.

erbdex
  • 1,899
  • 3
  • 22
  • 40
  • 1
    Hi, the wildcard here is very useful indeed. I understand now how to "merge" these data with wildcards. So how do you save this preset, so that I dont have to do it everytime manually? Thanks – laapsaap Oct 23 '13 at 07:43
  • @laapsaap i've added another answer. It has floated up. This perhaps is the default behaviour of so. – erbdex Oct 23 '13 at 14:19
0

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'.

erbdex
  • 1,899
  • 3
  • 22
  • 40