| Cheshire Cat Computing http://www.steveshipway.org/forum/ |
|
| Creating CPU Graph for Nortel Routers http://www.steveshipway.org/forum/viewtopic.php?f=15&t=1160 |
Page 1 of 1 |
| Author: | KGaudineer [ Wed Jul 04, 2007 5:22 am ] |
| Post subject: | Creating CPU Graph for Nortel Routers |
| Author: | stevesh [ Wed Jul 04, 2007 12:05 pm ] |
| Post subject: | |
The cisco OID returns the CPU usage as a percentage, and so can be directly graphed with a 100 maximum. Your Nortel values, however, are relative to each other. But don't worry! routers2 has special support for this situation (it also applies when your counters return disk space used and disk space total, but you want a percentage used). The special option is 'dorelpercent'. Target[xxxx]: 1.3.6.1.4.1.18.3.3.2.5.7.1.2.1&1.3.6.1.4.1.18.3.3.2.5.7.1.4.1:comm@dev routers2.cgi*Options[xxx]: dorelpercent MaxBytes[xxxx]: 999999 LegendI[xxxx]: usage: Legend1[xxxx]: CPU percentage used Legend3[xxxx]: Peak CPU percentage used Also, read the doc/MRTG_INFO and the doc/HOWTO for more details on the dorelpercent option. This option will graph a single line, showing OID1 as a percentage of OID2. It automatically sets several other parameters as well. |
|
| Author: | KGaudineer [ Fri Jul 06, 2007 4:19 am ] |
| Post subject: | Still having troubles graphing Nortel CPU utilization |
I must not understand the layout of the cfg file. I am still having trouble graphing the CPU utilization for our Nortel routers. I read through your answer to my first post and what I did was opened an existing cfg file and added the lines you discussed. But now I can not get anything to display for this one target, including the serial line utilization. The error message I keep getting is can't read the rrd file in \mrtg\wwrorrt\ This is what my cfg file looks like now...... my procedure for adding the lines was, first I added the lines and then I ran the newcfg.bat file with the update cfg file. after that everything stopped for this target. One other question I have come across is with the OID's I a m using. 1.3.6.1.4.1.18.3.3.2.5.7.1.2.1 1.3.6.1.4.1.18.3.3.2.5.7.1.4.1 The .1 at the end of the OID's was added by me because I thought I needed to add the instance ID at the end. Could this be what is causing the graph to stop? ### Interface 2 >> Descr: 'Frame Relay' | Name: 'DHEC.598300' | Ip: '10.23.1.42' | Eth: '' ### Target[10.31.52.253_2]: 2:public@10.31.52.253: SetEnv[10.31.52.253_2]: MRTG_INT_IP="10.23.1.42" MRTG_INT_DESCR="FR DHEC.598300" MaxBytes[10.31.52.253_2]: 96000 Title[10.31.52.253_2]: Traffic Analysis West Des Moines FR Circuit DHEC.598300 PageTop[10.31.52.253_2]: <H1>Traffic Analysis West Des Moines Circuit DHEC.598300 </H1> <TABLE> <TR><TD>System:</TD> <TD>West Des Moines Family Practice</TD></TR> <TR><TD>Maintainer:</TD> <TD>IHS Networking</TD></TR> <TR><TD>Description:</TD><TD>FR Circuit DHEC.598300</TD></TR> <TR><TD>ifType:</TD> <TD>frame-relay (32)</TD></TR> <TR><TD>ifName:</TD> <TD></TD>West Des Moines Relay FR Circuit DHEC.598300</TR> <TR><TD>Max Speed:</TD> <TD>768.0 kbits/s</TD></TR> <TR><TD>Ip:</TD> <TD>10.23.1.42</TD></TR> </TABLE> ###### This section was added to try and graph CPU utilization #### Target[10.31.52.253]: 1.3.6.1.4.1.18.3.3.2.5.7.1.2.1&1.3.6.1.4.1.18.3.3.2.5.7.1.4.1:public@10.31.52.253 routers2.cgi*Options[10.31.52.253]: dorelpercent MaxBytes[10.31.52.253]: 999999999999 Legand[10.31.52.253]: usage: Legend1:[10.31.52.253]: CPU percent used Legend3[10.31.52.253]: Peak CPU percentage Used Any insight as to where I have made mistakes would be greatly appreciated. |
|
| Author: | stevesh [ Fri Jul 06, 2007 10:53 am ] |
| Post subject: | |
routers2 cannot display anything becuase the .rrd file does not yet exist. The .rrd file does not exist because MRTG has not created it. MRTG has not created it because it has not yet had a successful run on that target. It has not run successfully because the .cfg file definition for that target is incomplete and has syntax errors. If you look at the MRTG output you will probably see a more detailed error message. You MUST include a PageTop[] and Title[] definition for each Target[]. Also you have 'Legand' where it should be 'LegendI'. Finally, you may want to have a routers.cgi*ShortDesc[] definition (this defines how it appears in the side menu). |
|
| Author: | KGaudineer [ Sat Jul 07, 2007 10:22 am ] |
| Post subject: | Still can not graph the CPU for Nortel Roouter |
Thanks for all of the good info. Unfortunately I am still having a lot of trouble trying to graph the CPU utilization for a Nortel Router. I have spent several hours today and I am simply having no luck. I can graph anything else errors, Interface traffic ect..... i had to step back an go back through some of the documentation online and also the documentation that was left behind during my instalation. When i was reading the documentation from c:\mrtg\mrtg\doc\reference.html there was a warning for those who want to use the 'dorelpercent' option I have copied and pasted the warning below...... =========== Beginning of copy /paste ============== dorelpercent The relative percentage of IN-traffic to OUT-traffic is calculated and displayed in the graph as an additional line. Note: Only a fixed scale is available (from 0 to 100%). Therefore if IN-traffic is greater than OUT-traffic then 100% is displayed. If you suspect that your IN-traffic is not always less than or equal to your OUT-traffic you are urged to not use this options. =============== end of copy/paste =================== I am curios if this is what may be giving me the headache. Because if i manually do a get for the 2 OID's that I need to use for calculating the CPU utilization These are the values that are returned.... OID_1 = 1.3.6.1.4.1.18.3.3.2.5.7.1.2.1 = 11796177 (wfResourceTotalEntry.wfResourceTotalCpuUsed.1) OID_2 = 1.3.6.1.4.1.18.3.3.2.5.7.1.4.1 = 210970840 (wfResourceTotalEntry.wfResourceTotalCpuMax.1) Is it possible that the 2 numbers are being intrepreted as being over 100% ? I have checked my mrtg log file several times after manually running it and ther eare no errors being displayed in log file. and example of what is in the log file is below. 2007-07-06 16:07:00 -- Started mrtg 2007-07-06 16:07:00 -- Started mrtg 2007-07-06 16:07:00 -- Started mrtg 2007-07-06 16:07:00 -- Started mrtg 2007-07-06 16:07:00 -- Started mrtg 2007-07-06 16:07:00 -- Started mrtg 2007-07-06 16:07:00 -- Started mrtg 2007-07-06 16:07:59 -- Started mrtg 2007-07-06 16:07:59 -- Started mrtg 2007-07-06 16:07:59 -- Started mrtg 2007-07-06 16:08:00 -- Started mrtg 2007-07-06 16:08:00 -- Started mrtg 2007-07-06 16:08:00 -- Started mrtg 2007-07-06 16:08:00 -- Started mrtg 2007-07-06 16:08:00 -- Started mrtg 2007-07-06 16:08:59 -- Started mrtg 2007-07-06 16:09:00 -- Started mrtg 2007-07-06 16:09:00 -- Started mrtg 2007-07-06 16:09:00 -- Started mrtg 2007-07-06 16:09:00 -- Started mrtg 2007-07-06 16:09:00 -- Started mrtg 2007-07-06 16:09:00 -- Started mrtg 2007-07-06 16:09:00 -- Started mrtg 2007-07-06 16:10:00 -- Started mrtg 2007-07-06 16:10:00 -- Started mrtg 2007-07-06 16:10:00 -- Started mrtg 2007-07-06 16:10:00 -- Started mrtg 2007-07-06 16:10:00 -- Started mrtg 2007-07-06 16:10:00 -- Started mrtg 2007-07-06 16:10:00 -- Started mrtg 2007-07-06 16:10:00 -- Started mrtg 2007-07-06 16:11:00 -- Started mrtg 2007-07-06 16:11:00 -- Started mrtg 2007-07-06 16:11:00 -- Started mrtg 2007-07-06 16:11:00 -- Started mrtg 2007-07-06 16:11:00 -- Started mrtg 2007-07-06 16:11:00 -- Started mrtg 2007-07-06 16:11:00 -- Started mrtg 2007-07-06 16:11:00 -- Started mrtg 2007-07-06 16:12:00 -- Started mrtg 2007-07-06 16:12:00 -- Started mrtg 2007-07-06 16:12:00 -- Started mrtg 2007-07-06 16:12:00 -- Started mrtg 2007-07-06 16:12:00 -- Started mrtg 2007-07-06 16:12:00 -- Started mrtg 2007-07-06 16:12:00 -- Started mrtg 2007-07-06 16:12:00 -- Started mrtg 2007-07-06 16:13:00 -- Started mrtg 2007-07-06 16:13:00 -- Started mrtg 2007-07-06 16:13:00 -- Started mrtg 2007-07-06 16:13:00 -- Started mrtg 2007-07-06 16:13:00 -- Started mrtg 2007-07-06 16:13:00 -- Started mrtg 2007-07-06 16:13:00 -- Started mrtg 2007-07-06 16:13:00 -- Started mrtg 2007-07-06 16:13:59 -- Started mrtg 2007-07-06 16:14:00 -- Started mrtg 2007-07-06 16:14:00 -- Started mrtg 2007-07-06 16:14:00 -- Started mrtg 2007-07-06 16:14:00 -- Started mrtg 2007-07-06 16:14:00 -- Started mrtg 2007-07-06 16:14:00 -- Started mrtg 2007-07-06 16:14:00 -- Started mrtg 2007-07-06 16:15:00 -- Started mrtg 2007-07-06 16:15:00 -- Started mrtg 2007-07-06 16:15:00 -- Started mrtg 2007-07-06 16:15:00 -- Started mrtg 2007-07-06 16:15:00 -- Started mrtg 2007-07-06 16:15:00 -- Started mrtg 2007-07-06 16:15:00 -- Started mrtg 2007-07-06 16:15:00 -- Started mrtg 2007-07-06 16:16:00 -- Started mrtg 2007-07-06 16:16:00 -- Started mrtg 2007-07-06 16:16:00 -- Started mrtg 2007-07-06 16:16:00 -- Started mrtg 2007-07-06 16:16:00 -- Started mrtg 2007-07-06 16:16:00 -- Started mrtg 2007-07-06 16:16:00 -- Started mrtg 2007-07-06 16:16:00 -- Started mrtg 2007-07-06 16:17:00 -- Started mrtg 2007-07-06 16:17:00 -- Started mrtg 2007-07-06 16:17:00 -- Started mrtg 2007-07-06 16:17:00 -- Started mrtg 2007-07-06 16:17:00 -- Started mrtg 2007-07-06 16:17:00 -- Started mrtg 2007-07-06 16:17:00 -- Started mrtg 2007-07-06 16:17:00 -- Started mrtg 2007-07-06 16:18:00 -- Started mrtg 2007-07-06 16:18:00 -- Started mrtg 2007-07-06 16:18:00 -- Started mrtg 2007-07-06 16:18:00 -- Started mrtg 2007-07-06 16:18:00 -- Started mrtg 2007-07-06 16:18:00 -- Started mrtg Any thought are greatly appreciated...... |
|
| Author: | stevesh [ Mon Jul 09, 2007 12:03 pm ] |
| Post subject: | |
It doesnt matter what the values are, as long as OUT > IN. The value graphed is in fact (( IN / OUT ) * 100% ). When using routers2 as the frontend, it also does not limit things to 100% and you can get over 100%, although it doesnt make sense. In this case, you would have (for example) OUT representing your hard disk capacity, and IN representing the free space. Then the dorelpercent would result in a 'percent free' graph. We use this here for disk usage graphs. In your case, if you have OUT (the second OID) as the max CPU capacity, and IN (the first OID) as the resource used, it should work. |
|
| Author: | KGaudineer [ Wed Jul 11, 2007 8:59 am ] |
| Post subject: | |
I finally go it to work (kinda). The percentages are still off. I can get the graph to start drawing but the YAxis is showing a graph from 0 to 800 even though I only need a graph from 0 to 100 and my MaxBytes is set to 100. I tried to add a line to the cfg file like this Options[rtr-name_cpu] gauge I put that line above the routers2.cgi*Options[rtr-name_cpu]: dorelpercent and also below. Each time I added that line the display cleaned up nicely and the percentages were OK but then the graph would stop creating the green bar after each poll and the graph would turn grey. I then tried tried to put the word gauge on the same line as dorelpercent but this had no affect at all. I tried the word gauge in front and behind of dorelpercent but there was no change. Is it possible to use the Options[ rtr-name_cpu]: options line with the routers2.cgi dorelpercent ? |
|
| Author: | stevesh [ Wed Jul 11, 2007 11:24 am ] |
| Post subject: | |
Dont forget to add the colon in the Options line (maybe you just forgot to type it above). Options[xxxxx]: gauge This tells MRTG that the retrieved values are to be stored exactly as-is (which is what you want). Otherwise, it will do a differential like you'd do with network total traffic counters. You can use the dorelpercent and gauge together, and the routers.cgi*Options with Options, no problem. If you add the 'rigid' option to the routers.cgi*Options line then it will force the graph to be from 0-maxbytes, no matter what the data is. |
|
| Author: | KGaudineer [ Thu Jul 12, 2007 9:04 am ] |
| Post subject: | |
thanks for all of the replies to my post.... all of the assistance has been very helpful. I finally have the CPU utilization graphing normally. The weird part is that I needed to use the 'dorelpercent with the keyword Options[x.x.x.x]: dorelpercent instead of routers2.cgi*Options[x.x.x.x]: dorelpercent. When I used the routers2.cgi*Options the Y axis would always scale from 0 to 800%. If I used just Options[x.x.x.x]: the Y axis would show as 0 to 100%. I haven't been able to track down what caused that to happen but my suspicion is that I made a tweak to a file like the routers2.conf file that is causing this. I also can not use gauge with dorelpercent. My assumption is that since I am not graphing one OID I do not need to treat it like a literal value. Routers.cgi front end must be doing the calculation for percentage for when I use the dorelpercent and as a result all I need to have happen is the resulting value be graphed. My graphs are now showing with the green fill bar growng from right to left with the proper utilization being graphed. Thanks again for the assistance it was a big help. |
|
| Author: | stevesh [ Thu Jul 12, 2007 3:40 pm ] |
| Post subject: | |
Since 'dorelpercent' is a MRTG option, rather than a routers2 extended option, it needs to go into the Options[]: directive rather than into routers.cgi*Options[]:. This is in the documentation, but it doesn't exactly shout out and make itself noticed. Really, the two Options directives should work equally (and they do for *some* directives) so I'll work at getting the routers2 script to be more consistent. Glad its working now... |
|
| Page 1 of 1 | All times are UTC + 12 hours [ DST ] |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|