Zenoss has a pretty nice integration with rrdtool. You can get a lot of pretty graphs out of it. I like to take these graphs and put them on the company intranet for other employees to enjoy†. I also find that it’s quite helpful to show some of the more important graphs in one place (like response time for the production web servers or temperature in the server closets).
The URL to the Zenoss graph image has a few parameters and a big old blob of base64 data. This data is the actual rrd commands to build the graph. Unfortunately, it’s not really easy to get at this data. The data is a base64 encoded, zipped, pipe-delimited bunch of RRD commands. To alter the graph, all you have to do is decode this data, change the RRD parameters, encoded it, and send it back to Zenoss. Zenoss will happily display the graph with the new configuration … and poof, instant realtime rrd image server.
When I first wanted to customize a graph, I decoded the blob on the python command line. I got annoyed with this process almost immediately and figured a tool would help, so I wrote one. See: Zenoss RRD Graph Helper.
This is what you do:
Grab the link to your favorite RRD image on your Zenoss server.
Head over my Zenoss RRD Graph Helper.
Paste in your URL, click decode.
Alter the RRD statements, click Encode.
Copy the new URL and put it into your favorite website for others to enjoy.
Per request, here’s the meat of the decoding process:
from zlib import compress, decompress
from base64 import b64encode, b64decode
sbz = gopts.replace('-','+').replace('_','/')
sb = b64decode(sbz)
s = decompress(sb)
s = '\n'.join(s.split('|'))
s = '|'.join(ungopts.split('\r\n'))
sz = compress(s, 9)
szb = b64encode(sz)
szb_safe = szb.replace('/','_').replace('+','-')
# strip newlines (created by b64 encode)
gopts = szb_safe.replace('\n','')
If you want to mix in a few graphs together, you can decode the images that you want to merge, grab the commands you need, then create a totally new graph. I’m using Zenoss Core 2.3. Different versions may yield different results.
And yes, I know that you can achieve similary results by using custom graph commands and/or using the multigraph reporting features. But that can be a more complicated and less obvious process. Sometimes you need the basics.
Footnote: Allow anonymous access to the RenderServer
This information is readily available on the ‘net, and not too hard to figure out. But I’ll include it here for completeness.
Zenoss’s RenderServer (like everything else in Zenoss) requires authorization to see. This means if you just copy a graph url and paste it somewhere else, you won’t see the image unless you have already logged in to Zenoss. Fortunately you can overcome this pretty quickly. Go to: http://your-zenoss:8080/zport/RenderServer/manage_access, and set RenderServer to anonymous. This will allow anonymous access to the RenderServer, and you’ll be able to see the images anywhere.
† As a certified mathematician, I get a lot more out of graphs than most people.