Cheshire Cat Computing

Software support and information
It is currently Mon Oct 15, 2018 10:48 pm

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 28 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Host template for Cisco
PostPosted: Wed Aug 20, 2008 12:39 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
This host template for cfgmaker will add CPU monitoring for CISCO routers and switches. It has been taken from the cfgmaker manual pages and slightly modified.
Since this checks to make sure the device in question really is a Cisco, then you could use this for all devices if you want to.
Code:
# cisco.htp
# This host template is for Cisco devices
# cfgmaker --host-template=cisco.htp
# Cisco CPU OID is 1.3.6.1.4.1.9.2.1.58.0

if( $sysdescr =~ /cisco/i ) {
$head_lines .= "#---------------------------------------------------------------------\n";
my $target_name = $router_name . ".cpu";
$target_lines .= <<ECHO;
routers.cgi*Icon: cisco-sm.gif
routers.cgi*Description: $sysname
routers.cgi*ShortDesc: $router_name
#-------------------------------------------------
Target[$target_name]: 1.3.6.1.4.1.9.2.1.58.0&1.3.6.1.4.1.9.2.1.58.0:$router_connect
Title[$target_name]: $router_name CPU load
YLegend[$target_name]: Percentage
ShortLegend[$target_name]: %
Legend1[$target_name]: CPU load in %
Legend3[$target_name]: Max Observed CPU load
LegendI[$target_name]: &nbsp;CPU Load:
MaxBytes[$target_name]: 100
UnScaled[$target_name]: dwmy
Options[$target_name]: growright, gauge, nopercent, noo
PageTop[$target_name]: <h1>$router_name CPU load</h1>
     <div><table><tr>
          <td>System:</td>
          <td>$router_name in $html_syslocation</td>
     </tr><tr>
          <td>Maintainer:</td>
          <td>$html_syscontact</td>
     </tr><tr>
          <td>Description:</td>
          <td>$html_sysdescr</td>
     </tr><tr>
          <td>Resource:</td><td>CPU.</td>
     </tr></table></div>
routers.cgi*Icon[$target_name]: chip-sm.gif
routers.cgi*InOut[$target_name]: no
routers.cgi*InSummary[$target_name]: yes
routers.cgi*ShortDesc[$target_name]: CPU
routers.cgi*InCompact[$target_name]: yes
routers.cgi*Mode[$target_name]: cpu
routers.cgi*Options[$target_name]: nototal fixunit
ECHO
}


Note that there are several other Cisco templates posted below; one of these may suit your requirements better.

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


Top
 Profile Send private message  
 
PostPosted: Mon Aug 25, 2008 11:01 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
(I've edited your posts to highlight the code only)

These are really cood - much more comprehensive than mine, which ony does CPU.

It's worth noting, though, that these load the Cisco MIB from the standard Linux location in order to get symbolic names, so if you are not using Linux with the Cisco MIB installed they will need modification. The first one, although limited, uses numeric OIDs to avoid this problem.

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


Top
 Profile Send private message  
 
PostPosted: Mon Aug 25, 2008 11:53 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
This is Tobi's host template for Cisco. It adds Memory and CPU graphs, but does not have any Routers2-specific directives.

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


Top
 Profile Send private message  
 
PostPosted: Wed Dec 03, 2008 12:29 am 
Offline
User

Joined: Tue Nov 25, 2008 8:17 pm
Posts: 6
Dear sir ,

Thank for the reply

I am not from software background , So i dont know the coding part

Kindly let me know in which file this code has to be added ,

The routers2 application has installed in windows machine , c:\mrtg


Regards
Lalit


Top
 Profile Send private message  
 
PostPosted: Wed Dec 03, 2008 10:07 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
These files are host templates for cfgmaker, which means that you need to save them into a file (eg, cisco.htp) and then reference them when you call cfgmaker by using the cfgmaker option --host-template=cisco.htp

How and where you call cfgmaker depends on your installation, and if you are using the MRTG Bundle install it may not be possible to fully automate this.

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


Top
 Profile Send private message  
 
PostPosted: Tue Oct 20, 2009 6:36 pm 
Offline
User

Joined: Tue Oct 20, 2009 6:22 pm
Posts: 3
Dear Sir ,

I am suing followin script wrote by you , but it is working on,y for Cisco 2950 switch. it is not woring for Cisco 2811 router , cisco 1841 router. I am unable to write cfgmaker for the same

you are requested to please provide the cfgmaker file for cisco Router [ 2811 , 1841 , 1721 Etc ]

Thanx in advance

Mayur Shah

======================================================================
your script

# cisco.htp
# This host template is for Cisco devices
# cfgmaker --host-template=cisco.htp
# Cisco CPU OID is 1.3.6.1.4.1.9.2.1.58.0

if( $sysdescr =~ /cisco/i ) {
$head_lines .= "#---------------------------------------------------------------------\n";
my $target_name = $router_name . ".cpu";
$target_lines .= <<ECHO;
routers.cgi*Icon: cisco-sm.gif
routers.cgi*Description: $sysname
routers.cgi*ShortDesc: $router_name
#-------------------------------------------------
Target[$target_name]: 1.3.6.1.4.1.9.2.1.58.0&1.3.6.1.4.1.9.2.1.58.0:$router_connect
Title[$target_name]: $router_name CPU load
YLegend[$target_name]: Percentage
ShortLegend[$target_name]: %
Legend1[$target_name]: CPU load in %
Legend3[$target_name]: Max Observed CPU load
LegendI[$target_name]: &nbsp;CPU Load:
MaxBytes[$target_name]: 100
UnScaled[$target_name]: dwmy
Options[$target_name]: growright, gauge, nopercent, noo
PageTop[$target_name]: <h1>$router_name CPU load</h1>
<div><table><tr>
<td>System:</td>
<td>$router_name in $html_syslocation</td>
</tr><tr>
<td>Maintainer:</td>
<td>$html_syscontact</td>
</tr><tr>
<td>Description:</td>
<td>$html_sysdescr</td>
</tr><tr>
<td>Resource:</td><td>CPU.</td>
</tr></table></div>
routers.cgi*Icon[$target_name]: chip-sm.gif
routers.cgi*InOut[$target_name]: no
routers.cgi*InSummary[$target_name]: yes
routers.cgi*ShortDesc[$target_name]: CPU
routers.cgi*InCompact[$target_name]: yes
routers.cgi*Mode[$target_name]: cpu
routers.cgi*Options[$target_name]: nototal fixunit
ECHO
}


Top
 Profile Send private message  
 
PostPosted: Tue Oct 27, 2009 7:58 pm 
Offline
User

Joined: Tue Oct 20, 2009 6:22 pm
Posts: 3
Dear Sir,

I want to use rrdtools for host CPU monitoring , it is working well for monitoring interfaces of Cisco Routers and cisco switches , when i am using rrdtools for monitoring Host CPU followin error is appearing on screen
==================================================================
Error reading RRD database c:\mrtg/wwwroot\cpu1.rrd
opening 'c:\mrtg/wwwroot\cpu1.rrd': No such file or directory

You can visit the configuration verification page here.

File: [localhost.cfg] localhost
Target: CPU1
Target list: localhost.memoryUsed, storageUsed-C, CPU1

==================================================================

please help me in this regard

Thank you in advance

Mayur shah

India


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

All times are UTC + 12 hours [ DST ]


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

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group