Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Apr 18, 2019 12:00 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 43 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: All DiskSpaces in one graph
PostPosted: Mon May 07, 2007 8:55 am 
Offline
User avatar

Joined: Thu Apr 26, 2007 3:59 am
Posts: 10
Location: Koeln, Germany
Hi.

During customising cacti to our requirments for our TC I noted that the design of the disk spaces is not well arranged, because of the multiplicity of logical disks.

Does there exist a template which shows all diskspaces in one graph?

Thanks a lot.

idg-pm


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 10, 2007 4:46 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
No, not by default. But you may combine several "single" graphs into a "mulitple" one using my aggregate plugin
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: multiple partition percents
PostPosted: Fri May 11, 2007 6:17 am 
Offline
User avatar

Joined: Mon Aug 22, 2005 9:39 pm
Posts: 42
Location: San Francisco, CA
I'm having trouble getting a CDEF to act on different pairs of data... I am trying do this:
Image

I had to go into debug mode and edit the RRDTOOL command manually to this:
Code:
/usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-8640000 \
--end=-300 \
--title="jamon - % Used Disk Space" \
--rigid \
--base=1024 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--upper-limit=100 \
--vertical-label="%" \
--slope-mode \
DEF:a="/usr/local/share/cacti/rra/jamon_hdd_total_102.rrd":hdd_total:AVERAGE \
DEF:b="/usr/local/share/cacti/rra/jamon_hdd_total_102.rrd":hdd_used:AVERAGE \
DEF:c="/usr/local/share/cacti/rra/jamon_hdd_total_104.rrd":hdd_total:AVERAGE \
DEF:d="/usr/local/share/cacti/rra/jamon_hdd_total_104.rrd":hdd_used:AVERAGE \
DEF:e="/usr/local/share/cacti/rra/jamon_hdd_total_106.rrd":hdd_total:AVERAGE \
DEF:f="/usr/local/share/cacti/rra/jamon_hdd_total_106.rrd":hdd_used:AVERAGE \
DEF:g="/usr/local/share/cacti/rra/jamon_hdd_total_107.rrd":hdd_total:AVERAGE \
DEF:h="/usr/local/share/cacti/rra/jamon_hdd_total_107.rrd":hdd_used:AVERAGE \
DEF:i="/usr/local/share/cacti/rra/jamon_hdd_total_319.rrd":hdd_total:AVERAGE \
DEF:j="/usr/local/share/cacti/rra/jamon_hdd_total_319.rrd":hdd_used:AVERAGE \
CDEF:cdefa=b,a,/,100,* \
CDEF:cdefe=d,c,/,100,* \
CDEF:cdefi=f,e,/,100,* \
CDEF:cdefbc=h,g,/,100,* \
CDEF:cdefbg=j,i,/,100,* \
AREA:cdefa#4900f4:"/"  \
GPRINT:a:LAST:" Size\:%8.2lf %s"  \
GPRINT:cdefa:LAST:" - %4.2lf %s %% used\n"  \
LINE2:cdefe#CA1165:"/data"  \
GPRINT:e:LAST:" Size\:%8.2lf %s"  \
GPRINT:cdefe:LAST:" - %4.2lf %s %% used\n"  \
LINE2:cdefi#3B5276:"/usr"  \
GPRINT:e:LAST:" Size\:%8.2lf %s"  \
GPRINT:cdefi:LAST:" - %4.2lf %s %% used\n"  \
LINE2:cdefbc#EC83f7:"/var"  \
GPRINT:g:LAST:" Size\:%8.2lf %s"  \
GPRINT:cdefbc:LAST:" - %4.2lf %s %% used\n"  \
LINE2:cdefbg#FDa418:"/data2"  \
GPRINT:i:LAST:" Size\:%8.2lf %s"  \
GPRINT:cdefbg:LAST:" - %4.2lf %s %% used\n"


I tried to create a graph template, but it only plots one line
... also, all the CDEFs only use the 'a' and 'b' data source...
Code:
CDEF:cdefa=b,a,/,100,* \
CDEF:cdefe=b,a,/,100,* \
CDEF:cdefi=b,a,/,100,* \
CDEF:cdefbc=b,a,/,100,* \
CDEF:cdefbg=b,a,/,100,* \

Do I need to use SIMILAR_DATA_SOURCES_NODUPS or something other than b,a?


Last edited by mokeybrains on Fri May 11, 2007 5:40 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Fri May 11, 2007 10:15 am 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
Bad, bad. You will need a different CDEF for all those disks. They will have to refer to the letters of the DEF's of the corresponding rrd file. Cuurently, all of them refer to DEF's a and b, respectively
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: What I am looking for
PostPosted: Fri May 11, 2007 3:33 pm 
Offline
User avatar

Joined: Mon Aug 22, 2005 9:39 pm
Posts: 42
Location: San Francisco, CA
Feature request:

When defining a CDEF {graph management -> CDEFs}, one of the options is Special Data Source. I'd like a Special Data Source that is all Graph Input Items associated with this Graph Item. ...

A 'Graph item' can be associated with multiple 'Graph item inputs'. The cacti layout doesn't make this easy. I'd like to make a graph item that sums up 3 out of 8 inputs, another that divides input item by another ... in a user defined mater and not an 'a' 'b' fashion. A big problem I have with cacti, is that how do you know which item will be a and which b? If you rename the input items, they are resorted alphabetically... how about a method of locking them into specific slots?

Am I approaching this wrong? Should I just make a whole bunch of CDEFs? What do other people do?

--------------------------------------------------------------------------------------------
Still learning the cacti lingo -- when I figure out how to ask a
questions about cacti, sometimes the answer become apparent.


Top
 Profile  
 
 Post subject: Got it working!
PostPosted: Fri May 11, 2007 5:25 pm 
Offline
User avatar

Joined: Mon Aug 22, 2005 9:39 pm
Posts: 42
Location: San Francisco, CA
What a hard process!

Anyhow, I learned a lot and wrote a helper script that will 'replicate' sections of the graph template making the addition of lines to an existing template easier.

Here is a question for gandalf: when looking at the RRDTool Command in debug mode, all the CDEFs are run twice. How would I modify the XML to prevent this. I found that if I mucked around with the hashes inside the <items> section of the <inputs> I could change the 'a' and 'b' order... seems like an ugly hack. Will RTFM help me understand this?
:wink:


Attachments:
File comment: And the graph template to do it (includes the 5 CDEFs needed).
cacti_graph_template_combined_used_disk_space_test.xml [12.53 KiB]
Downloaded 1309 times
File comment: Sample output.
combined_disk_used.png
combined_disk_used.png [ 32.97 KiB | Viewed 17720 times ]
Top
 Profile  
 
 Post subject: Re: What I am looking for
PostPosted: Sun May 13, 2007 2:42 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
mokeybrains wrote:
Feature request:

When defining a CDEF {graph management -> CDEFs}, one of the options is Special Data Source. I'd like a Special Data Source that is all Graph Input Items associated with this Graph Item. ...

A 'Graph item' can be associated with multiple 'Graph item inputs'. The cacti layout doesn't make this easy. I'd like to make a graph item that sums up 3 out of 8 inputs, another that divides input item by another ... in a user defined mater and not an 'a' 'b' fashion. A big problem I have with cacti, is that how do you know which item will be a and which b? If you rename the input items, they are resorted alphabetically... how about a method of locking them into specific slots?
Please post to the Feature Request Forum
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: Re: Got it working!
PostPosted: Wed May 16, 2007 9:46 am 
Offline
User avatar

Joined: Thu Apr 26, 2007 3:59 am
Posts: 10
Location: Koeln, Germany
[quote="mokeybrains"]What a hard process!

Anyhow, I learned a lot and wrote a helper script that will 'replicate' sections of the graph template making the addition of lines to an existing template easier.

[color=indigo]Here is a question for gandalf:[/color] when looking at the [b]RRDTool Command[/b] in debug mode, all the CDEFs are run [u]twice[/u]. How would I modify the XML to prevent this. I found that if I mucked around with the hashes inside the <items> section of the <inputs> I could change the 'a' and 'b' order... seems like an ugly hack. Will [b]RTFM[/b] help me understand this?
:wink:[/quote]

In which folder I have to copy the xml.script?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 16, 2007 3:19 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
What are you talking about: XML.script? The script or the XML referring to the script? You may find help at the first link of my signature (scroll down!)
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: XML.script how to ;)
PostPosted: Wed May 16, 2007 3:48 pm 
Offline
User avatar

Joined: Mon Aug 22, 2005 9:39 pm
Posts: 42
Location: San Francisco, CA
Import the XML file (see image below).
Click on
*Console
*Graph Management
*Add (upper right of screen)
*Pick Combined - Used Disk Space - 5 partitions
*Pick a host
*Click Create
*fill out all the partitions
(cacti wizards: how can this be automated to pre-populate paritions 1-4 with / /var /tmp /usr?)


Attachments:
File comment: How to import an XML file.
HowToImportXML.png
HowToImportXML.png [ 92.09 KiB | Viewed 17555 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Wed May 16, 2007 4:29 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
No such thing as pre-polutaion comes to my mind. You have to do it the hard way
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: Re: XML.script how to ;)
PostPosted: Mon May 21, 2007 3:37 am 
Offline
User avatar

Joined: Thu Apr 26, 2007 3:59 am
Posts: 10
Location: Koeln, Germany
[quote="mokeybrains"]Import the XML file (see image below).
Click on
*Console
*Graph Management
*Add (upper right of screen)
*Pick [i]Combined - Used Disk Space - 5 partitions[/i]
*Pick a host
*Click Create
*fill out all the partitions
(cacti wizards: how can this be automated to pre-populate paritions 1-4 with / /var /tmp /usr?)[/quote]

It doesn't work!?!?!?!?

I imported the template as discribed, but no graph ist shown.

What's the reason?

Thanks
idg-pm

@Reinhard: Hallo Reinhard.

Kann ich das angebotene Script einfach so im Cacti importieren? Bei mir wird daraufhin leider kein Graph angezeigt...

Vielen Dank
Pat


Top
 Profile  
 
 Post subject: Re: XML.script how to ;)
PostPosted: Mon May 21, 2007 2:35 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22376
Location: Muenster, Germany
idg-PM wrote:
@Reinhard: Hallo Reinhard.

Kann ich das angebotene Script einfach so im Cacti importieren? Bei mir wird daraufhin leider kein Graph angezeigt...

Vielen Dank
Pat
In general, you may simply import the Template and copy any script to the scripts folder. Please make a screenshot of RRA settings before importing. Especially if you're using non-standard RRA definitions, the will be overwritten by the template
Ja, man kann das Template einfach importieren. RRA Settings bitte vorher ausdrucken, die werden immer ueberschrieben (wenn es die standard Einstellungen sind ist das nicht weiter schlimm). Wenn ein Skript dabei ist, bitte nicht vergessen dieses in das ./scripts Verzeichnis zu kopieren
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject: Re: XML.script how to ;)
PostPosted: Mon May 21, 2007 3:33 pm 
Offline
User avatar

Joined: Mon Aug 22, 2005 9:39 pm
Posts: 42
Location: San Francisco, CA
idg-PM wrote:
It doesn't work!?!?!?!?

I imported the template as discribed, but no graph ist shown.


Du hast template gemacht Hast du jetzt die graph machen? Du must alles lesen, meine Freund!

------------
haha, haven't used German in a long time. Anyhow, follow ALL the steps. Import the graph is one step, making the graph is another.


Top
 Profile  
 
 Post subject: Re: XML.script how to ;)
PostPosted: Tue May 22, 2007 10:44 am 
Offline
User avatar

Joined: Thu Apr 26, 2007 3:59 am
Posts: 10
Location: Koeln, Germany
[quote="mokeybrains"][quote="idg-PM"]
It doesn't work!?!?!?!?

I imported the template as discribed, but no graph ist shown.
[/quote]

Du hast template gemacht Hast du jetzt die graph machen? Du must alles lesen, meine Freund!

------------
haha, haven't used German in a long time. Anyhow, follow ALL the steps. Import the graph is one step, making the graph is another.[/quote]

I read everything :D , and created the graph after the import. I observed the graph during a day working but no lines are schown.

Don't know the reason. I try to import it again and copy the same script to the scipt folder as Reinhard added.

I'll tell, if it works....

Pat


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 43 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group