Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Nov 22, 2017 4:23 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 67 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject:
PostPosted: Fri Jun 20, 2008 6:07 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5158
Location: United Kingdom
Lonlie wrote:
Hello,

I read all messages, but i have a problem with the CPU. I don't konw how do you do to recover this. I wrote :

NODE test
LABEL {node:this:name} %
TARGET C:/Apache2.2/htdocs/cacti/rra/lol_traffic_in_36.rrd
POSITION 212 399

I don't know for "name" what I should write.


It is ALWAYS {node:this:bandwidth_in} or {node:this:bandwidth_out} or {node:this:inpercent} or {node:this:outpercent} - depending on if you want the value or percentage, and in or out.

It looks like you are looking at an interface traffic rrd file though.

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 20, 2008 7:14 am 
Offline

Joined: Thu Jun 05, 2008 3:36 am
Posts: 23
Location: France
Sorry, I took a bad example ...

NODE test
LABEL {node:this:name} %
TARGET C:/Apache2.2/htdocs/cacti/rra/cool_cpu_54.rrd
POSITION 212 399

Must I do use bandwidth_in, bandwidth_out ... too ?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 20, 2008 7:27 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5158
Location: United Kingdom
Lonlie wrote:
Sorry, I took a bad example ...

NODE test
LABEL {node:this:name} %
TARGET C:/Apache2.2/htdocs/cacti/rra/cool_cpu_54.rrd
POSITION 212 399

Must I do use bandwidth_in, bandwidth_out ... too ?


howie wrote:
ALWAYS


:-)

You change the DS name in the TARGET, but the {} part will always be bandwidth_in or bandwidth_out etc as above.

If you check the cacti.log, you will see errors from WEATHERMAP if the DS name is incorrect, along with a list of valid DS names.

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 20, 2008 10:27 am 
Offline

Joined: Thu Jun 05, 2008 3:36 am
Posts: 23
Location: France
Thanks, I understood !

I wrote :

NODE test
LABEL {node:this:outpercent:%k} %
TARGET C:/Apache2.2/htdocs/cacti/rra/cool_cpu_55.rrd:-:cpu
POSITION 53 274

In result, I have a number like this : 143.47

But the percent should be between 0 and 100 !


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 20, 2008 10:37 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5158
Location: United Kingdom
Lonlie wrote:
Thanks, I understood !

I wrote :

NODE test
LABEL {node:this:outpercent:%k} %
TARGET C:/Apache2.2/htdocs/cacti/rra/cool_cpu_55.rrd:-:cpu
POSITION 53 274

In result, I have a number like this : 143.47

But the percent should be between 0 and 100 !


I agree :-)

If you run with DEBUG logging turned on for one poller cycle, then look in cacti.log, you should see some lines like:
RRD ReadData returning [...]

that should tell you what weathermap is reading from the rrd file. I guess it's possible that for a dual core CPU, you get a number from 0 to 200%...

If that's what is going on, then you should add
MAXVALUE 200
to the node, so the percentage is calculated with 100% as the value 200 (if you see what I mean).

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 20, 2008 10:44 am 
Offline

Joined: Thu Jun 05, 2008 3:36 am
Posts: 23
Location: France
I see what you mean. And I have a dual core CPU :).
But I have one .rrd for each CPU ...


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 23, 2008 3:34 am 
Offline

Joined: Thu Jun 05, 2008 3:36 am
Posts: 23
Location: France
I used an other computer (Amd Sempron), and for the Cpu, I had 756 !
I verified, and I used the good file. Then, I opened the .rrd file with RRD Editor, and the values don't jibed with the values in weathermap ... In the file, I had the good values I think. For example :
9,2000000000E+01
9,2000000000E+01
9,3680000000E+01
9,5000000000E+01

I looked on the graph, and it's the good values.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 23, 2008 3:40 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5158
Location: United Kingdom
Lonlie wrote:
I used an other computer (Amd Sempron), and for the Cpu, I had 756 !
I verified, and I used the good file. Then, I opened the .rrd file with RRD Editor, and the values don't jibed with the values in weathermap ... In the file, I had the good values I think. For example :
9,2000000000E+01
9,2000000000E+01
9,3680000000E+01
9,5000000000E+01

I looked on the graph, and it's the good values.


Oh wait... add gauge: to the front of the TARGET - by default it multiplies by 8, because it assumes you have a byte-counter value, and you want bits/sec.

So that's:
TARGET gauge:C:/Apache2.2/htdocs/cacti/rra/cool_cpu_55.rrd:-:cpu

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 23, 2008 4:04 am 
Offline

Joined: Thu Jun 05, 2008 3:36 am
Posts: 23
Location: France
Thanks a lot !


Top
 Profile  
 
 Post subject: Re: [SOLVED] Creating stand alone values CPU,packetloss,late
PostPosted: Thu Nov 21, 2013 12:56 pm 
Offline
Cacti User

Joined: Mon May 31, 2010 9:26 am
Posts: 130
Hello, I have a question somehow related to this thread and I dont wanna open another one, I hope its not a problem:).
Howie : If I want to aggregate 2 .rrd's for a link, to have a "sum" its possible this way : ?

LABEL {node:this:inpercent}
TARGET gauge:/rra/traffic1.rrd :/rra/traffic2.rrd

Basically I want to see traffic(both inbound and outbound) on a single link combined from 2 separated interfaces.


Top
 Profile  
 
 Post subject: Re: [SOLVED] Creating stand alone values CPU,packetloss,late
PostPosted: Thu Nov 21, 2013 2:04 pm 
Offline
Cacti User

Joined: Thu Jan 21, 2010 8:41 pm
Posts: 162
Atreides, answer to your question is YES:
Below is CPU example that I use
Basically take a look at target statement It uses 2 gauge statements back to back.

NODE CPU
LABEL {node:this:inpercent:%.d}%
TARGET gauge:/var/www/html/rra/xxx_proc_system_25653.rrd:proc_system:proc_system gauge:/var/www/html/rra/xxx_proc_user_25654.rrd:proc_user:proc_user
USESCALE ping in percent
POSITION 50 50


Top
 Profile  
 
 Post subject: Re: [SOLVED] Creating stand alone values CPU,packetloss,late
PostPosted: Thu Nov 21, 2013 3:36 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5158
Location: United Kingdom
Yep, you can add two targets by adding them both on one line with a space between. You can also do subtraction by prefixing a target with a '-' (no space between the - and the target) and also multiply with '3*' prefix (again, no space around the *). Finally, because x/y = x * 1/y you can also divide: 0.5*blah.rrd

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)


Top
 Profile  
 
 Post subject: Re: [SOLVED] Creating stand alone values CPU,packetloss,late
PostPosted: Fri Nov 22, 2013 4:31 am 
Offline
Cacti User

Joined: Mon May 31, 2010 9:26 am
Posts: 130
Hmm, something I'm doing wrong, it seems that its not possible to put a LABEL on links. Keep getting this error :

Unrecognised config on line 91: LABEL {node:this:inpercent:%k}%

I have this same labe under a NODE section(for CPU) and its working. This is the full code :

# regular LINKs:
LINK ra-rd
WIDTH 5
BWOUTLINECOLOR none
BWBOXCOLOR none
LABEL {node:this:inpercent:%k}%
INFOURL /v3/graph.php?rra_id=all&local_graph_id=3388
OVERLIBGRAPH /v3/graph_image.php?local_graph_id=3388&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
TARGET gauge:/var/www/html/v3/rra/ro-ar01a-ra_traffic_in_3416.rrd:traffic_in:traffic:in gauge:/var/www/html/v3/rra/ro-ar01a-ra_traffic_in_3417.rrd:traffic_in:traffic_in


Few lines up under the NODE section I have :

NODE cpu0_aurora
LABEL {node:this:outpercent:%k}%
TARGET gauge:/var/www/html/v3/rra/local_cpu_3240.rrd:-:cpu
INFOURL /v3/graph.php?rra_id=all&local_graph_id=3212
OVERLIBGRAPH /v3/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=3212
POSITION 550 537

wich is working.


Top
 Profile  
 
 Post subject: Re: [SOLVED] Creating stand alone values CPU,packetloss,late
PostPosted: Fri Nov 22, 2013 1:24 pm 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5158
Location: United Kingdom
That's correct. There is no such thing as a label on links.

However, there is a COMMENT - check out INCOMMENT and OUTCOMMENT in the manual.

_________________
Weathermap 0.98 is out! & QuickTree 0.2. Superlinks is over there now.
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)


Top
 Profile  
 
 Post subject: Re: [SOLVED] Creating stand alone values CPU,packetloss,late
PostPosted: Fri Nov 22, 2013 1:39 pm 
Offline
Cacti User

Joined: Mon May 31, 2010 9:26 am
Posts: 130
That will do what I'm trying? Wich is a sum of 2 rrd's from 2 interfaces?

EDIT : I've read about COMMENT,'tho its a nice feature and I'll use it, its not what I'm looking for.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 67 posts ]  Go to page Previous  1, 2, 3, 4, 5  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