Board index

Cheshire Cat Software

Steve Shipway's Discussion Groups
Locations of visitors to this page
It is currently Wed 08 Sep, 2010 11:55 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Host Template for Cisco Call Manager 5.x or later
PostPosted: Thu 21 Aug, 2008 6:59 am 
Offline
Silver User

Joined: Fri 03 Oct, 2003 11:47 am
Posts: 28
Location: Austin, TX
$head_lines .= <<ECHO
#.....................................................................
# Windows 2000 processor utilization. Based on MIBII Host MIB.
#
#Vendor Specific Auto-Disocery Entry:
# 1.3.6.1.2.1.25.3.3.1.2|1.3.6.1.2.1.25.3.3.1.2|microsoft_win2k_cpu|tree|CPU Utilization
#
# Example CFGNAME: [DEVICE NAME]-percent_processor_util
# (add instance number to the end of the name for multiple processors)

ECHO
;
my (@temp) = snmpwalk($router,$v3opt,'1.3.6.1.2.1.25.3.3.1.2');
foreach my $tempi(@temp) {
$tempi =~ /(\d+):\d/;
my $instance=$1;
my $target_name=$router_name.".cpu".$instance;
$target_lines .= <<CPU
Target[$target_name]: 1.3.6.1.2.1.25.3.3.1.2.$instance&1.3.6.1.2.1.25.3.3.1.2.$instance:$router
SnmpOptions[$target_name]: $v3options
MaxBytes[$target_name]: 100
routers.cgi*ShortDesc[$target_name]: CPU # $instance
bb*host[$target_name]: $router_name
bb*svc[$target_name]: cpu
bb*red[$target_name]: 90
bb*yellow[$target_name]: 80
Options[$target_name]: gauge, unknaszero, noo
Directory[$target_name]: $directory_name
WithPeak[$target_name]: wmy
YLegend[$target_name]: % Utilization
ShortLegend[$target_name]: %
Legend1[$target_name]: Proc Load in next minute
Legend3[$target_name]: Maximal 5 Minute Proc Load
LegendI[$target_name]: Load:
Title[$target_name]: $sysname
PageTop[$target_name]: <H1>$sysname Processor Load</H1>
<TABLE>
<TR><TD>System:</TD><TD>$sysname </TD></TR>
<TR><TD>Location:</TD><TD>$syslocation </TD></TR>
</TABLE>
CPU
;
}

snmpMIB_to_OID("/usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt");
my (@temp) = snmpwalk($router,$v3opt,'hrStorageAllocationUnits');
foreach my $tempi(@temp) {
$tempi =~ /(\d+):(\d+)/;
next if $2 == 0;
my $instance=$1;
my $blocksize=$2;
my ($diskname, $disksize) = snmpget($router,$v3opt,'hrStorageDescr.'.$instance, 'hrStorageSize.'.$instance);
my $shortdisk= $instance;
next if $diskname =~ /proc/;
next if $diskname =~ /dev/;
if ($diskname =~ /^(\w):/) { $shortdisk = $1; }
if ($diskname =~ /^\//) { $shortdisk = $diskname;
$shortdisk =~ s#/##;}
if ($diskname =~ /^\/$/) { $shortdisk = $instance; }
my $target_name=$router_name.".disk.".$shortdisk;
my $maxsize = $disksize * $blocksize;
$target_lines .= <<DISK
#--------------------------------------------------------------------------------------
# WIN2000 Disk Utilization. Based on MIB II Host MIB.

Target[$target_name]: 1.3.6.1.2.1.25.2.3.1.6.$instance&1.3.6.1.2.1.25.2.3.1.6.$instance:$router * $blocksize
SnmpOptions[$target_name]: $v3options
YLegend[$target_name]: KBytes Used
Options[$target_name]: gauge, unknaszero, noo
Directory[$target_name]: $directory_name
MaxBytes[$target_name]: $maxsize
ShortLegend[$target_name]: bytes
routers.cgi*ShortDesc[$target_name]: Drive $shortdisk:
bb*host[$target_name]: $router_name
bb*svc[$target_name]: disk
bb*red[$target_name]: 95%
bb*yellow[$target_name]: 92%
kilo[$target_name]: 1024
Legend1[$target_name]: Disk Used
Legend3[$target_name]: Max value per interval on graph
LegendI[$target_name]: Disk Used
WithPeak[$target_name]: ymw
Title[$target_name]: $sysname
PageTop[$target_name]: <H1>$diskname on $sysname/H1>
<TABLE>
<TR><TD>System:</TD><TD>$sysname </TD></TR>
<TR><TD>Location:</TD><TD>$syslocation </TD></TR>
</TABLE>
DISK
;
}

#--------------------------------------------------------------------------------------
# registered phones

my $target_name = $router_name.+".phones";
$target_lines .= <<PHONES
Target[$target_name]: ccmRegisteredPhones.0&ccmUnregisteredPhones.0:$router
SnmpOptions[$target_name]: $v3options
YLegend[$target_name]: Phones
Options[$target_name]: gauge
routers.cgi*Options[$target_name]: nototal
routers.cgi*GraphStyle[$target_name]: mirror
routers.cgi*Graph[$target_name]: ALL_PHONES
Directory[$target_name]: $directory_name
MaxBytes[$target_name]: 2000
ShortLegend[$target_name]: phones
Legend1[$target_name]: Phones Registered
Legend2[$target_name]: Phones UnRegistered
LegendI[$target_name]: Registered
LegendO[$target_name]: Un Registered

WithPeak[$target_name]: ymw
Title[$target_name]: $sysname
PageTop[$target_name]: <H1>Phones Registered on $sysname/H1>
<TABLE>
<TR><TD>System:</TD><TD>$sysname </TD></TR>
<TR><TD>Location:</TD><TD>$syslocation </TD></TR>
</TABLE>
PHONES
;

_________________
Daniel J McDonald, CCIE #2495, CISSP # 78281, CNX
Austin Energy


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group