Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Jun 17, 2019 8:27 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 79 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next
Author Message
 Post subject:
PostPosted: Thu Jan 12, 2006 11:40 am 
Offline
Cacti User

Joined: Fri Dec 09, 2005 3:42 pm
Posts: 246
Try this, same drill as last time, refresh data query and post output from verbose please


Last edited by ehall on Wed Feb 01, 2006 4:40 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 11:57 am 
Offline
Cacti User

Joined: Wed Sep 28, 2005 1:39 pm
Posts: 495
ehall wrote:
Try this, same drill as last time, refresh data query and post output from verbose please


Looking good so far - will let you know about the graphs in five minutes:
+ Running data query [14].
+ Found type = '4 '[script query].
+ Found data query XML file at '/usr/share/cacti/resource/script_queries/cisco_cpu.xml'
+ XML file parsed ok.
+ Executing script for list of indexes '/usr/bin/php5 -q /usr/share/cacti/scripts/cisco_cpu_usage.php _2r1..com, 02r, 1, , , 161, 500 index'
+ Executing script query '/usr/bin/php5 -q /usr/share/cacti/scripts/cisco_cpu_usage.php _2r1..com, 02r, 1, , , 161, 500 query cpuIndex'
+ Found item [cpuIndex='1'] index: 1
+ Found item [cpuIndex='3'] index: 3
+ Executing script query '/usr/bin/php5 -q /usr/share/cacti/scripts/cisco_cpu_usage.php _2r1..com, 02r, 1, , , 161, 500 query cpuName'
+ Found item [cpuName='CPU1'] index: 1
+ Found item [cpuName='CPU3'] index: 3
+ Executing script query '/usr/bin/php5 -q /usr/share/cacti/scripts/cisco_cpu_usage.php _2r1..com, 02r, 1, , , 161, 500 query cpuDesc'
+ Found item [cpuDesc='onboard CPU'] index: 1
+ Found item [cpuDesc='onboard CPU'] index: 3
+ Found data query XML file at '/usr/share/cacti/resource/script_queries/cisco_cpu.xml'
+ Found data query XML file at '/usr/share/cacti/resource/script_queries/cisco_cpu.xml'
+ Found data query XML file at '/usr/share/cacti/resource/script_queries/cisco_cpu.xml'
+ Found data query XML file at '/usr/share/cacti/resource/script_queries/cisco_cpu.xml'
+ Found data query XML file at '/usr/share/cacti/resource/script_queries/cisco_cpu.xml'


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 12:05 pm 
Offline
Cacti User

Joined: Fri Dec 09, 2005 3:42 pm
Posts: 246
remember you may need to use the older OIDs with that router too. You can test this with the following:

Code:
/usr/bin/php5 -q /usr/share/cacti/scripts/cisco_cpu_usage.php _2r1..com, 02r, 1, , , 161, 500 query oneMin

/usr/bin/php5 -q /usr/share/cacti/scripts/cisco_cpu_usage.php _2r1..com, 02r, 1, , , 161, 500 query fiveMin


Results like "1:nn" (where nn is the 1min cpu load) means it worked, while something other than nn means it didn't

I should probably put a test into the code for that actually


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 12:19 pm 
Offline
Cacti User

Joined: Wed Sep 28, 2005 1:39 pm
Posts: 495
ehall wrote:
I should probably put a test into the code for that actually


That seemed to work - AFTER I changed the OIDs...not sure why I forgot that!

Code:
php5 -q /usr/share/cacti/scripts/cisco_cpu_usage.php _2r1.com, 02r, 1, , , 161, 500 query oneMin
1:6
3:1


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 12:26 pm 
Offline
Cacti User

Joined: Fri Dec 09, 2005 3:42 pm
Posts: 246
What is the result when the newer OIDs are used? (I need to know what the error looks like to trap it).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 1:19 pm 
Offline
Cacti User

Joined: Wed Sep 28, 2005 1:39 pm
Posts: 495
ehall wrote:
What is the result when the newer OIDs are used? (I need to know what the error looks like to trap it).


well... can I change them back, to run this test from the CLI, without recreating all of my graphs and data sources (which are all now working for all devices)?

Also, I was going to ask if there's a way to configure the graph template to show 100% rather than just the max?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 1:33 pm 
Offline
Cacti User

Joined: Fri Dec 09, 2005 3:42 pm
Posts: 246
You can just copy the script to a temp name and run that copy and you won't have to worry about it.

You can change the graph to always show 100% by open the graph template and disabling the auto-scale option. Note that the upper limit on the graph is set to 200% since it stacks the 1min and 5min avgs, which could both hit 100% (stacked together that would total 200%).


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 1:56 pm 
Offline
Cacti User

Joined: Wed Sep 28, 2005 1:39 pm
Posts: 495
ehall wrote:
You can just copy the script to a temp name and run that copy and you won't have to worry about it.


Doh! That should have been obvious... but this newest script, even with the newer OIDs gives me a response - and it looks like the correct one. If that's the case, I'm really confused as to why the graphs weren't working before changing the OID. Perhaps I should change them back?

Code:
02n:/usr/share/cacti/scripts # php5 -q /usr/share/cacti/scripts/cisco_cpu_usage_test.php _2r16, 02r, 1, , , 161, 500 index
1
02n:/usr/share/cacti/scripts # php5 -q /usr/share/cacti/scripts/cisco_cpu_usage_test.php _2r16, 02r, 1, , , 161, 500 query cpuName
1:CPU1
02n:/usr/share/cacti/scripts # php5 -q /usr/share/cacti/scripts/cisco_cpu_usage_test.php _2r16, 02r, 1, , , 161, 500 query cpuIndex
1:1




Quote:
You can change the graph to always show 100% by open the graph template and disabling the auto-scale option. Note that the upper limit on the graph is set to 200% since it stacks the 1min and 5min avgs, which could both hit 100% (stacked together that would total 200%).


well, that explains what I was just going to ask you about. Is there a different way to report it rather than stack them? As it is I have one CPU that appears to be running at 150%! :) Perhaps a block color for 1 minute and a line for 5?

I do appreciate your working on this - anything more I can do to help, just let me know.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 2:27 pm 
Offline
Cacti User

Joined: Fri Dec 09, 2005 3:42 pm
Posts: 246
knobdy wrote:
but this newest script, even with the newer OIDs gives me a response - and it looks like the correct one. If that's the case, I'm really confused as to why the graphs weren't working before changing the OID. Perhaps I should change them back?


Code:
02n:/usr/share/cacti/scripts # php5 -q /usr/share/cacti/scripts/cisco_cpu_usage_test.php _2r16, 02r, 1, , , 161, 500 index
1

02n:/usr/share/cacti/scripts # php5 -q /usr/share/cacti/scripts/cisco_cpu_usage_test.php _2r16, 02r, 1, , , 161, 500 query cpuName
1:CPU1

That's only returning one CPU. Is it the same router?

Quote:
Is there a different way to report it rather than stack them? As it is I have one CPU that appears to be running at 150%! :) Perhaps a block color for 1 minute and a line for 5?

You can make whatever changes to the graph template you like :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 3:01 pm 
Offline
Cacti User

Joined: Wed Sep 28, 2005 1:39 pm
Posts: 495
ehall wrote:
That's only returning one CPU. Is it the same router?


No, but it's the same for the other router - meaning, it works...?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 3:11 pm 
Offline
Cacti User

Joined: Fri Dec 09, 2005 3:42 pm
Posts: 246
This version checks to see if the returned perf counter is defined and numeric, and switches to the old OID values if not.


Last edited by ehall on Wed Feb 01, 2006 4:40 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 3:15 pm 
Offline
Cacti User

Joined: Wed Sep 28, 2005 1:39 pm
Posts: 495
Might as well try the latest on the two I still don't have working. They are (C7200-JK8S-M), Version 12.2(15)T5 - and while it does display the graph without error, running it the script returns nothing.

UPDATE: This script appears to work for the other routers - I didn't have to edit it manually, obviously. Still didn't work on the two 7200s though. The 7200s also give "No more variables left in this MIB View (It is past the end of the MIB tree)" back for the memory walks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 3:38 pm 
Offline
Cacti User

Joined: Fri Dec 09, 2005 3:42 pm
Posts: 246
Do any of the working routers show a description other than "onboard CPU"?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 3:56 pm 
Offline
Cacti User

Joined: Wed Sep 28, 2005 1:39 pm
Posts: 495
ehall wrote:
Do any of the working routers show a description other than "onboard CPU"?


No, all that work use that description - these two routers don't return anything...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 3:57 pm 
Offline
Cacti User

Joined: Wed Sep 28, 2005 1:39 pm
Posts: 495
ehall wrote:
You can make whatever changes to the graph template you like :)


Why wouldn't changing the average to a "max" work? In other words it would simply draw a line along the max of either 1min or 5min - depending on which is higher:

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="argus_kc2r3 - CPU Usage - |query_cpuName| (|query_cpuDesc|)" \
--rigid \
--base=1000 \
--height=120 \
--width=600 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Percent" \
--slope-mode \
DEF:a="/usr/share/cacti/rra/argus_kc2r3_fivemin_1568.rrd":oneMin:AVERAGE \
DEF:b="/usr/share/cacti/rra/argus_kc2r3_fivemin_1568.rrd":fiveMin:AVERAGE \
AREA:a#FFC73B:"1 Min Avg" \
GPRINT:a:LAST:"Current\:%8.2lf" \
GPRINT:a:AVERAGE:"Average\:%8.2lf" \
GPRINT:a:MAX:"Maximum\:%8.2lf\n" \
LINE1:b#FF0000:"5 Min Avg" \
GPRINT:b:LAST:"Current\:%8.2lf" \
GPRINT:b:AVERAGE:"Average\:%8.2lf" \
GPRINT:b:MAX:"Maximum\:%8.2lf\n" \
LINE2:#000000:""

RRDTool Says:

ERROR: Not a valid vname: #000000 in line LINE2:#000000:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 79 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot] and 4 guests


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