Creating MRTG-style bandwidth graphs

258 views
Skip to first unread message

dusura

unread,
Sep 14, 2011, 7:33:01 PM9/14/11
to OpenTSDB
Hi,

I am interested in replacing an existing MRTG system with OpenTSDB. I
would like to use gnuplot.

My data is in bytes, so if I use the "rate" function I will have
"bytes/s". Is it possible to do a formula to convert to bits/s or
should I import my data as bits instead of bytes?

I would like to show "1 M, 2 M" on the Y-axis rather than very large
numbers in scientific notation. Any advice on how to customize the Y-
axis scale would be much appreciated.

Also, I would like to customize the graph "line style" and the metric
titles. For the metric titles I would like to show "Upload" and
"Download" rather than the OpenTDSB metric. I am thinking of
submitting a patch for this as it seems it wouldn't be too difficult
(looking at the Plot.java class).

Regards,
David Donn
Message has been deleted

tsuna

unread,
Sep 14, 2011, 7:46:01 PM9/14/11
to dusura, OpenTSDB
On Wed, Sep 14, 2011 at 4:33 PM, dusura <dus...@gmail.com> wrote:
> My data is in bytes, so if I use the "rate" function I will have
> "bytes/s". Is it possible to do a formula to convert to bits/s or
> should I import my data as bits instead of bytes?

Right now, yeah, you'd have to store your data in bits instead of
bytes. In the future the goal is to allow you to plot arbitrary
arithmetic expressions, so you would be able to express "plot this
time series multiplied by 8".

> I would like to show "1 M, 2 M" on the Y-axis rather than very large
> numbers in scientific notation. Any advice on how to customize the Y-
> axis scale would be much appreciated.

Use this format string: %.0s%c

> Also, I would like to customize the graph "line style" and the metric
> titles. For the metric titles I would like to show "Upload" and
> "Download" rather than the OpenTDSB metric. I am thinking of
> submitting a patch for this as it seems it wouldn't be too difficult
> (looking at the Plot.java class).

Right now the code won't let you use your own labels in the key, so
yes you'd need to patch Plot.java and possibly other files. Let us
know if you have a specific question.

--
Benoit "tsuna" Sigoure
Software Engineer @ www.StumbleUpon.com

Kraig Amador

unread,
Sep 14, 2011, 7:52:53 PM9/14/11
to open...@googlegroups.com, dusura

I've done some work to clean up the key by filtering out the metric name if it is the only metric plotted, and changing the format from metric{tag=value,tag2=value2} to things like 'metric: tag=value, value2', or 'value' depending on parameters. If there is some interest I can extract the code from my branch and submit a patch for the parameter. It is very nice when you are plotting the same metric across many hosts, the key could only show the hostname, or the misc cpu types, etc.


--

Kraig Amador

Dave Barr

unread,
Sep 14, 2011, 8:54:19 PM9/14/11
to open...@googlegroups.com, dusura

Yes, if this were selectable in some way this would be very helpful.  I think there is already an open issue for this.

dusura

unread,
Sep 16, 2011, 2:28:27 AM9/16/11
to OpenTSDB
Thank you very much Benoit for the advise on bytes vs bits and Y-axis
formatting.

Kraig, I guess what I have in mind for metric titles is perhaps
something more general than what you have implemented. I simply want
to say "title of "metric{tag=value,tag2=value2}" = "MyMetricTitle""

Kraig Amador

unread,
Sep 16, 2011, 2:06:16 PM9/16/11
to dusura, OpenTSDB
That can be done once functions can be wrapped around metrics, for now the 'simplekey' may be enough to help you out. 

Reply all
Reply to author
Forward
0 new messages