Cheshire Cat Computing

Software support and information
It is currently Fri May 24, 2013 11:27 pm

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Nov 03, 2011 9:50 am 
Offline
Silver User

Joined: Thu Oct 06, 2011 8:46 am
Posts: 18
Hello,

I was wondering if someone could help with this UserDefined Graph I am attempting.

So I am creating a UserDefined Graph for Memory Usage on routers. What I have so far is so close to being where I want it to be... But maybe you can help me tweak the rest.

Here is part of the output from my template I made.
1) The First target collects "Used Memory" and "Free Memory" and then adds the 2 to get the "Total Memory" available.
2) The Second target collects just the "Used" Memory.
I believe both these targets work just fine. But my problem is, is in the "Total" and "Average" sections of the User-Defined graph are showing "Total: Total Memory" and "Average: Total Memory". I didn't want total and average of the "Total Memory" because that should never change. I was hoping to get those for the "Used Memory" portion... Any idea what I should change to achieve this??
Here is part of the cfg:
Code:
#------------------------------ TOTAL AVAILABLE MEMORY --------------------------------------#
Target[192.168.1.1.mem_1]: 1.3.6.1.4.1.9.9.48.1.1.1.6.1&1.3.6.1.4.1.9.9.48.1.1.1.6.1:community@192.168.1.1: + 1.3.6.1.4.1.9.9.48.1.1.1.5.1&1.3.6.1.4.1.9.9.48.1.1.1.5.1:community@192.168.1.1:
Title[192.168.1.1.mem_1]: 192.168.1.1 Total Memory
YLegend[192.168.1.1.mem_1]: Total Memory in Bytes
ShortLegend[192.168.1.1.mem_1]: Bytes
Legend1[192.168.1.1.mem_1]: Total Memory
LegendI[192.168.1.1.mem_1]:  Total Memory:
WithPeak[192.168.1.1.mem_1]: dwmy
MaxBytes[192.168.1.1.mem_1]: 524288000
Options[192.168.1.1.mem_1]: growright, gauge, noo
routers.cgi*GraphStyle[192.168.1.1.mem_1]: stack
routers.cgi*InSummary[192.168.1.1.mem_1]: yes
routers.cgi*InCompact[192.168.1.1.mem_1]: yes
routers.cgi*Graph[192.168.1.1.mem_1]: All-Memory
PageTop[192.168.1.1.mem_1]: <h1>192.168.1.1 Free Memory</h1>
 <div><table>
 <tr><td>System:</td>     <td>192.168.1.1 in </td></tr>
 <tr><td>Maintainer:</td> <td></td></tr>
 <tr><td>Description:</td><td>Cisco IOS Software, Catalyst 4500 L3 Switch Software (cat4500-ENTSERVICESK9-M), Version 12.2(31)SGA9, RELEASE SOFTWARE (fc1)<BR>
 Technical Support: http://www.cisco.com/techsupport<BR>
 Copyright (c) 1986-2009 by Cisco Systems, Inc.<BR>
 Compiled Mon 12-Jan-09 13:53</td></tr> 
 <tr><td>Resource:</td>   <td>Free CPU Pool Memory (1.3.6.1.4.1.9.9.48.1.1.1.6.1)</td></tr>
 </table></div>


#------------------------------ MEMORY USED --------------------------------------#
Target[192.168.1.1.mem_2]: 1.3.6.1.4.1.9.9.48.1.1.1.5.1&1.3.6.1.4.1.9.9.48.1.1.1.5.1:community@192.168.1.1:
Title[192.168.1.1.mem_2]: 192.168.1.1 Memory Used
YLegend[192.168.1.1.mem_2]: Memory Used
ShortLegend[192.168.1.1.mem_2]: Bytes
Legend1[192.168.1.1.mem_2]: Memory Used
Legend3[192.168.1.1.mem_2]: Max Used Memory
LegendI[192.168.1.1.mem_2]: &nbsp;Used-Memory:
WithPeak[192.168.1.1.mem_2]: dwmy
MaxBytes[192.168.1.1.mem_2]: 524288000
Options[192.168.1.1.mem_2]: growright, gauge, noo
routers.cgi*GraphStyle[192.168.1.1.mem_2]: stack
routers.cgi*InSummary[192.168.1.1.mem_2]: yes
routers.cgi*InCompact[192.168.1.1.mem_2]: yes
routers.cgi*Graph[192.168.1.1.mem_2]: All-Memory total average
PageTop[192.168.1.1.mem_2]: <h1>192.168.1.1 Memory Used</h1>
 <div><table>
 <tr><td>System:</td>     <td>192.168.1.1 in </td></tr>
 <tr><td>Maintainer:</td> <td></td></tr>
 <tr><td>Description:</td><td>Cisco IOS Software, Catalyst 4500 L3 Switch Software (cat4500-ENTSERVICESK9-M), Version 12.2(31)SGA9, RELEASE SOFTWARE (fc1)<BR>
 Technical Support: http://www.cisco.com/techsupport<BR>
 Copyright (c) 1986-2009 by Cisco Systems, Inc.<BR>
 Compiled Mon 12-Jan-09 13:53</td></tr>
 <tr><td>Resource:</td>   <td>Free CPU Pool Memory (1.3.6.1.4.1.9.9.48.1.1.1.6.1)</td></tr>
 </table></div>


#------------------------------ UserGraph Settings for Memory --------------------------------------#
Target[All-Memory]:
Title[All-Memory]: 192.168.1.1 Memory Usage
YLegend[All-Memory]: Memory in Bytes
ShortLegend[All-Memory]: Bytes
Legend1[All-Memory]: Total Memory
Legend2[All-Memory]: Memory Used
Legend3[All-Memory]: Max Used Memory
LegendO[All-Memory]: &nbsp;Used-Memory:
routers.cgi*MBLegend[All-Memory]: 100% usage
WithPeak[All-Memory]: dwmy
MaxBytes[All-Memory]: 524288000
Options[All-Memory]: growright, gauge
routers.cgi*GraphStyle[All-Memory]: stack
routers.cgi*InSummary[All-Memory]: yes
routers.cgi*InCompact[All-Memory]: yes
PageTop[All-Memory]: <h1>192.168.1.1 Memory Used</h1>
 <div><table>
 <tr><td>System:</td>     <td>192.168.1.1 in </td></tr>
 <tr><td>Maintainer:</td> <td></td></tr>
 <tr><td>Description:</td><td>Cisco IOS Software, Catalyst 4500 L3 Switch Software (cat4500-ENTSERVICESK9-M), Version 12.2(31)SGA9, RELEASE SOFTWARE (fc1)<BR>
 Technical Support: http://www.cisco.com/techsupport<BR>
 Copyright (c) 1986-2009 by Cisco Systems, Inc.<BR>
 Compiled Mon 12-Jan-09 13:53</td></tr>
 </table></div>



I'm thinking possibly that I just have the legends mixed up but I can't figure it out...
Any suggestion would be greatly appreciated.

Thanks in Advance,
Matt


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Fri Nov 04, 2011 11:50 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
You can use the graph options 'nototal' and 'noaverage' when defining the summary graph to suppress the total or average lines... in your case you probably want to suppress both as (total)+(used) and (total+used)/2 dont make sense.

routers.cgi*Graph[192.168.1.1.mem_1]: All-Memory nototal noaverage

If you want to change the Total and Average legends, you can use LegendTI/TO/AI/AO[]

routers.cgi*LegendAI[All-Memory]: Average Incoming

When referring to the total traffic over the graph period (the value enabled with the 95th percentile) you can use the extended options nototal and nopercentile. This suppresses calculation of total, such as when your graphed value is not a rate. routers2 attempts to default this sensibly, but you can control it using the options 'nototal' or 'total' if it guesses wrong.

routers.cgi*Options[target]: nototal

You can also change the units used in the calculation - this again is attempted to be defaulted sensibly but sometimes cannot be done quite right.

ShortLegend[target]: foo/sec
routers.cgi*TotalLegend[target]: foo
routers.cgi*Options[target]: total

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
PostPosted: Sat Nov 05, 2011 2:41 am 
Offline
Silver User

Joined: Thu Oct 06, 2011 8:46 am
Posts: 18
Hey Steve, thanks for the reply...

Also, if you notice the image of the graph in my first post, it is showing the "Used Memory"(green) as being higher that the "Total Memory"(blue)... It seems as though the "Used Memory" is the sum of both the ("Used Memory"=144MB) and the ("Total Memory"=471MB) to give around-about 617 (which is where the green stack stops). Not sure why it would be adding them both together and saying that it is the "Used" target's values??


I added the options you suggested but it doesn't seem to want to get rid of those totals and averages of the "Total Memory" target... Which target was I supposed to add those directives to? I tried adding the nototal and noaverage options to the "Total" target and to the User-Defined "All-Memory" target, but not sure what's happening.
What's the difference in these two directives (below) with the options: How does the options differ from the "Options" directive and the "Graph" directive? Does adding the options in the "Graph" directive just make it so you can apply those options to the individual targets in the User-Defined Graph, instead of having to apply them over all the targets in the User-Defined Graph?
routers.cgi*Options[192.168.1.1.mem_1]: growright, gauge, noo, nototal, nomax
routers.cgi*Graph[192.168.1.1.mem_1]: All-Memory nototal noaverage


Sorry for the BIG post but I'm trying to be as specific as possible.
My end result I'm trying to achieve is to have the "Total Memory" value be displayed on the User-Defined Graph as a stacked bar with I guess just the first legend under the graph to show it's value (don't need max, avg, total, etc... for that one). Then I'm trying to have the "Used Memory" as a stacked bar which will always be <= the "Total Memory" so it should be displayed in front of the "Total" target, and under the graph have avg and max for just the "Used Memory".

Below is my edited cfg from the original post, with your suggestions added (and an updated graph with these new options added is attached).
Code:

# "Total Memory" is the sum of "ciscoMemoryPoolFree.1" and "ciscoMemoryPoolUsed.1" which gives the total amount of memory.
#------------------------------ TOTAL AVAILABLE MEMORY --------------------------------------#
Target[192.168.1.1.mem_1]: 1.3.6.1.4.1.9.9.48.1.1.1.6.1&1.3.6.1.4.1.9.9.48.1.1.1.6.1:jwpadmin!@192.168.1.1: + 1.3.6.1.4.1.9.9.48.1.1.1.5.1&1.3.6.1.4.1.9.9.48.1.1.1.5.1:jwpadmin!@192.168.1.1:
Title[192.168.1.1.mem_1]: 192.168.1.1 Total Memory
YLegend[192.168.1.1.mem_1]: Total Memory in Bytes
ShortLegend[192.168.1.1.mem_1]: Bytes
Legend1[192.168.1.1.mem_1]: Total Memory
LegendI[192.168.1.1.mem_1]: &nbsp;Total Memory:
WithPeak[192.168.1.1.mem_1]: dwmy
MaxBytes[192.168.1.1.mem_1]: 524288000
routers.cgi*Options[192.168.1.1.mem_1]: growright, gauge, noo, nototal, nomax
routers.cgi*GraphStyle[192.168.1.1.mem_1]: stack
routers.cgi*InSummary[192.168.1.1.mem_1]: yes
routers.cgi*InCompact[192.168.1.1.mem_1]: yes
routers.cgi*Graph[192.168.1.1.mem_1]: All-Memory nototal noaverage
PageTop[192.168.1.1.mem_1]: <h1>192.168.1.1 Free Memory</h1>
 <div><table>
 <tr><td>System:</td>     <td>192.168.1.1 in </td></tr>
 <tr><td>Maintainer:</td> <td></td></tr>
 <tr><td>Description:</td><td>Cisco IOS Software, Catalyst 4500 L3 Switch Software (cat4500-ENTSERVICESK9-M), Version 12.2(31)SGA9, RELEASE SOFTWARE (fc1)<BR>
 Technical Support: http://www.cisco.com/techsupport<BR>
 Copyright (c) 1986-2009 by Cisco Systems, Inc.<BR>
 Compiled Mon 12-Jan-09 13:53</td></tr> 
 <tr><td>Resource:</td>   <td>Free CPU Pool Memory (1.3.6.1.4.1.9.9.48.1.1.1.6.1)</td></tr>
 </table></div>


# "Memory Used" is the value from "ciscoMemoryPoolUsed.1".
#------------------------------ MEMORY USED --------------------------------------#
Target[192.168.1.1.mem_2]: 1.3.6.1.4.1.9.9.48.1.1.1.5.1&1.3.6.1.4.1.9.9.48.1.1.1.5.1:jwpadmin!@192.168.1.1:
Title[192.168.1.1.mem_2]: 192.168.1.1 Memory Used
YLegend[192.168.1.1.mem_2]: Memory Used
ShortLegend[192.168.1.1.mem_2]: Bytes
Legend1[192.168.1.1.mem_2]: Memory Used
Legend3[192.168.1.1.mem_2]: Max Used Memory
LegendI[192.168.1.1.mem_2]: &nbsp;Used-Memory:
WithPeak[192.168.1.1.mem_2]: dwmy
MaxBytes[192.168.1.1.mem_2]: 524288000
Options[192.168.1.1.mem_2]: growright, gauge, noo
routers.cgi*GraphStyle[192.168.1.1.mem_2]: stack
routers.cgi*InSummary[192.168.1.1.mem_2]: yes
routers.cgi*InCompact[192.168.1.1.mem_2]: yes
routers.cgi*Graph[192.168.1.1.mem_2]: All-Memory total average
PageTop[192.168.1.1.mem_2]: <h1>192.168.1.1 Memory Used</h1>
 <div><table>
 <tr><td>System:</td>     <td>192.168.1.1 in </td></tr>
 <tr><td>Maintainer:</td> <td></td></tr>
 <tr><td>Description:</td><td>Cisco IOS Software, Catalyst 4500 L3 Switch Software (cat4500-ENTSERVICESK9-M), Version 12.2(31)SGA9, RELEASE SOFTWARE (fc1)<BR>
 Technical Support: http://www.cisco.com/techsupport<BR>
 Copyright (c) 1986-2009 by Cisco Systems, Inc.<BR>
 Compiled Mon 12-Jan-09 13:53</td></tr>
 <tr><td>Resource:</td>   <td>Free CPU Pool Memory (1.3.6.1.4.1.9.9.48.1.1.1.6.1)</td></tr>
 </table></div>


#------------------------------ UserGraph Settings for Memory --------------------------------------#
Target[All-Memory]:
Title[All-Memory]: 192.168.1.1 Memory Usage
YLegend[All-Memory]: Memory in Bytes
ShortLegend[All-Memory]: Bytes
Legend1[All-Memory]: Total Memory
Legend2[All-Memory]: Memory Used
Legend3[All-Memory]: Max Used Memory
LegendO[All-Memory]: &nbsp;Used-Memory:
routers.cgi*MBLegend[All-Memory]: 100% usage
WithPeak[All-Memory]: dwmy
MaxBytes[All-Memory]: 524288000
routers.cgi*Options[All-Memory]: growright, gauge, nototal
routers.cgi*GraphStyle[All-Memory]: stack
routers.cgi*InSummary[All-Memory]: yes
routers.cgi*InCompact[All-Memory]: yes
PageTop[All-Memory]: <h1>192.168.1.1 Memory Used</h1>
 <div><table>
 <tr><td>System:</td>     <td>192.168.1.1 in </td></tr>
 <tr><td>Maintainer:</td> <td></td></tr>
 <tr><td>Description:</td><td>Cisco IOS Software, Catalyst 4500 L3 Switch Software (cat4500-ENTSERVICESK9-M), Version 12.2(31)SGA9, RELEASE SOFTWARE (fc1)<BR>
 Technical Support: http://www.cisco.com/techsupport<BR>
 Copyright (c) 1986-2009 by Cisco Systems, Inc.<BR>
 Compiled Mon 12-Jan-09 13:53</td></tr>
 </table></div>



The Graph below doesn't really look like anything changed at all between the first post and this one...

Any thoughts would be much appreciated.
Again sorry for the LONG post...

Thank You Again,
Matt


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Mon Nov 14, 2011 7:08 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 2921
Location: Auckland, New Zealand
If the used appears higher than the total, that's because you have the values stacked in the graph. Remove the GraphStyle definition that sets them stacked and youll get two lines again.

The options specified on the routers.cgi*Graph directive are specifically for the creation of the userdefined graph. On the whole, you'd only use 'nototal' and 'noaverage' there. The option on the routers.cgi*Options[] and Options[] are for the particular target.

When you put options on the routers.cgi*Graph line, they are cumulative over all component targets. So this one "routers.cgi*Graph[192.168.1.1.mem_2]: All-Memory total average" is specifying to add total and average, even if another one has 'nototal noaverage'!

When you are defining directives for the Userdefined graph, ALWAYS put routers.cgi* in front of them else it will think they refer to a specific target rather than the userdefined graph!

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile  
 
PostPosted: Tue Nov 15, 2011 5:23 am 
Offline
Silver User

Joined: Thu Oct 06, 2011 8:46 am
Posts: 18
Hey Steve thanks for the reply.

Ok... Thanks for the clarification.

Thanks Again,
Matt


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: Bing [Bot] 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:  
Powered by phpBB® Forum Software © phpBB Group