[ANSWERED] Graph, RRDTool, Title in 2 lines

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

[ANSWERED] Graph, RRDTool, Title in 2 lines

Post by Sirup »

Is there a possibility to "wrap" the title of a graph in to lines?

Example in the screenshot
Attachments
lines.jpg
lines.jpg (13.12 KiB) Viewed 4205 times
Last edited by Sirup on Tue May 18, 2010 2:02 am, edited 1 time in total.
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

No. RRDTool does not support this.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

Okay thanks a lot.
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Linegod wrote:No. RRDTool does not support this.
J.P., yes, this is (has been?) the standard answer.

Now that I read it, it comes to my mind that rrdtool 1.4.x supports pango markup. This way, it may be possible to tweak a <br/> into the title. I did not test that. But if plain rrdtool 1.4.x works well, then Cacti 088 will support it!

R.
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

I will see what I can do with v1.4 if I get a chance...
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

Just a test below. Not 'simple'.

I will take a look at 0.8.8 and see what I can do....
Attachments
rrdtool_1.3.9_newline.png
rrdtool_1.3.9_newline.png (23.22 KiB) Viewed 4152 times
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

Perfect! :lol:

How did you do this? So this will probably work with cacti 0.88 and rrdtool 1.4.x but not in the combo 0.88/1.4.x?
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
User avatar
Linegod
Developer
Posts: 1626
Joined: Thu Feb 20, 2003 10:16 am
Location: Canada
Contact:

Post by Linegod »

The '--pango-markup' option needs to be passed to the 'rrdtool graph' command. Unicode Entity in hexadecimal notation needs to be passed in the title for newline in the title.

It works with rrdtool 1.3.9, but it will have to wait for 0.8.8, as some logic around when to apply it will have to be included.
--
Live fast, die young
You're sucking up my bandwidth.

J.P. Pasnak,CD
CCNA, LPIC-1
http://www.warpedsystems.sk.ca
User avatar
Sirup
Cacti Moderator
Posts: 348
Joined: Tue Mar 02, 2010 9:03 am

Post by Sirup »

Thanks again - for the technical details
[size=67]Cacti version: 0.8.7e5
OS: FreeBSD 7.2
Plugin Architecture: 2.6
Plugins: aggregate 0.74, autom8 0.33, loginmod 1.0

[url=http://docs.cacti.net/manual:087]Official Cacti Documentation[/url]
[url=http://docs.cacti.net/manual:087:4_help.2_debugging#debugging]Gandalfs Official Debugging Help[/url]
[/size]
juangose
Posts: 12
Joined: Thu Jul 07, 2005 2:15 pm

Re: [ANSWERED] Graph, RRDTool, Title in 2 lines

Post by juangose »

What are the steps that I need in order to put 2 lines in the Title of the graphs.
juangose
Posts: 12
Joined: Thu Jul 07, 2005 2:15 pm

Re: [ANSWERED] Graph, RRDTool, Title in 2 lines

Post by juangose »

My version is Cacti 8.8b

MY RRD is 1.4.x
petski
Posts: 1
Joined: Wed Mar 08, 2017 7:20 am

Re: [ANSWERED] Graph, RRDTool, Title in 2 lines

Post by petski »

[*] To use the pango-markup feature mentioned by Linegod, you can use it this way:

Code: Select all

--pango-markup --title='<span>Line1&#xa;Line2&#xa;Line3</span>'
The output will look like this (which is probably just fine if you use two lines, but not that pretty if you use more than two lines):

Image



[*] As a work-around, you can use a newline-patch I wrote for rrdtool-1.6.0. You can use it this way (with "?" as our separation character):

Code: Select all

--title='Line1?Line2?Line3'
The output will look like this:

Image

You can find the patch here: https://gist.github.com/petski/6240b64e ... d866cbeec1

Direct download link: https://gist.githubusercontent.com/pets ... title.diff

If you have any remarks on the code, please let me know on the gist page. I'll be happy to merge them!
Attachments
newlinehack.png
newlinehack.png (21.34 KiB) Viewed 1758 times
pango.png
pango.png (21.18 KiB) Viewed 1758 times
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests