how to save graphs under User Graphs

Asked by katya

I'm new to Graphite and trying to figure out how to have custom views show up under User Graphs. Using web Graphite Browser, I'm able to see all the graphs that I'm creating, but I'm not sure how to save a combination of them. Also, I tried using CLI and saved a custom view, but it did not show up under User Graphs. Is it supposed to? If not, do you recommend creating a view via CLI, then getting a url out of it and then store it someplace?

Thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
Graphite Edit question
Assignee:
No assignee Edit question
Solved by:
plusbryan
Solved:
Last query:
Last reply:
Revision history for this message
Best plusbryan (plusbryan) said :
#1

It's pretty easy. You need to create user accounts first. I made a tutorial here: http://www.xobni.com/bryan/2008/12/19/adding-users-and-saving-graphs-for-graphite/

Revision history for this message
katya (katyaa) said :
#2

thanks, bryan. that worked.

Revision history for this message
katya (katyaa) said :
#3

Thanks plusbryan, that solved my question.

Revision history for this message
Kindjal (kindjal) said :
#4

The previous URL is defunct: http://www.xobni.com/bryan/2008/12/19/adding-users-and-saving-graphs-for-graphite/

Can someone repost the instructions?

Revision history for this message
chrismd (chrismd) said :
#5

In order to save graphs under 'My Graphs' and 'User Graphs' you simply need to log into Graphite and the Save/Delete buttons will then appear on the top of the Composer window. To log in you need to either create an account for yourself in the Django database or setup LDAP authentication. LDAP authentication is setup through local_settings.py, check out the example file's comments for details on doing that (or just ask if you run into any issues). However if you're not using LDAP its pretty easy to create a local user in Django's database using the Django admin interface.

When you first installed Graphite there was a step where you had to initialize the database by running 'manage.py syncdb'. That prompted you to create an admin user, if you did that already you're good to go. Otherwise you need to create an admin user by running 'manage.py createsuperuser'.

Once your admin user is setup you can go to the django admin interface by visiting http://my-graphite-server/admin/ (note: the trailing slash is required!) and logging in as your admin user. From there you need to create a new user account by clicking 'Add' under the 'Users' section. After that, go back to the main Graphite page. You may need to logout if it thinks you're still the admin user. Then log back in as you're new user and you should be able to save graphs! Also once logged in you have the ability to set profile options. Currently there is only 1 option, the "advanced UI features" option. Enabling that puts a '*' element in every folder that has more than one element, making it easier to use wildcards when you build graphs.

Hope that helps.

Revision history for this message
Kindjal (kindjal) said :
#6

Yes that is perfect. Your message was the first I'd read anything about the admin interface. You might put that in the quickstart guide, which was very useful to get me going.

(It occurs to me now that there was one step missing from the quickstart guide, but I don't remember what it was... sorry.)

Thanks for Graphite! I got it up and running in about 10 minutes, and it is perfect for my needs!

Revision history for this message
Alexandr (alexandr-bravo) said :
#7

For graphite 0.9.10 if I try to add a normal user (without LDAP authorization, admin user was created during installation successfully) through http://my-graphite-server/admin/ at the end the error screen appears and new user is not created. The last error from the screen:

File "/usr/lib/python2.7/dist-packages/django/contrib/messages/api.py", line 22, in add_message
    raise MessageFailure('You cannot add messages without installing '
MessageFailure: You cannot add messages without installing django.contrib.messages.middleware.MessageMiddleware

Looks like that some additional django package should be installed, but I can't determine which one. I'm using Debian testing (wheezy).