Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

DFM notification limitations and PERL

I have recently installed DFM with the intention of using it to handle

the sending of pages. During this process a few limitations have

become evident;

1) No direct option for out-of-band paging. DFM only supports paging

via e-mail messages to SMS gateways (e.g. xxx@skymail.com). If the

Ciscoworks box has lost connection to the mail server or the mail

server has lost connection to the internet the page does not occur.

2) No differentiation of which messages should go to which recipients.

3) No editing of messages for necessary content. Could be important

where SMS systems charge by character count or receiving devices

have limited display space.

I reaction to these limitations was to try implementing a PERL script

to do paging. My Ciscoworks system runs on Win2k and so comes with a

port of PERL installed.

I started by enabling the File Notifier Adapter. Next I installed a

copy of the "tail" utility ported to Win32. By opening up a file

handle to "tail -n 1 -f" on the DFM-Alarms.log file, I had a

mechanism to review incoming alerts as they enter the log file and

evaluate them;

open(DFM, "tail -n 1 -f

c:/PROGRA~1/CSCOpx/objects/smarts/logs/DFM-AL~1.LOG | ");

The process is maintained by using a while loop on the file handle;

while(<DFM>) {

I then obtained a simple SMS server application (SMS Centre) and

installed a modem on the Ciscoworks server. Through the use of

regular expression tests on the log file entries and parsing the

contents of each entry, I should be able to provide the functions not

currently supported by DFM. The script is run as a service by

creating an Autontex.bat file calling PERL and the script, then

configuring the Autoexnt service to start automatically.

I am left with the exercise of selecting the regular expressions.

Below is the complete script;

***********************************************************************

open(DFM, "tail -n 1 -f

c:/PROGRA~1/CSCOpx/objects/smarts/logs/DFM-AL~1.LOG | ");

while(<DFM>) {

if( $_ =~ /NOTIFY/ &&

$_ =~ /[Router]|[Switch]/ && $_ =~ /Unresponsive 100%/ ) {

system(qq(c:/progra~1/SMSCEN~1/SMSCEN~1.EXE jon DFM $_));

sleep 60;

system(qq(c:/progra~1/SMSCEN~1/SMSCEN~1.EXE steve DFM $_"));

sleep 60;

} elsif( $_ =~ /NOTIFY/ && $_ =~ /MSFC/ && $_ =~ /Unresponsive/ ) {

system(qq(c:/progra~1/SMSCEN~1/SMSCEN~1.EXE jon DFM $_));

sleep 60;

system(qq(c:/progra~1/SMSCEN~1/SMSCEN~1.EXE steve DFM $_"));

sleep 60;

}

}

***********************************************************************

In this rudimentary implementation, I send the complete contents of the

alert to the SMS server with the string "DFM" pre-appended if;

1) the string contains "Notify" and ("Router" or "Switch") and

"Unresponsive 100%"

or

2) the string contains "Notify" and "Router" or "MSFC") and

"Unresponsive"

My network is made up of;

2 Cat 6509s with MSFCs

11 Cat 4006s (4 w/ 4232 L3 cards)

4 3620s (access routers)

My intention is to send pages only if a system (switch, router, MSFC or layer 3 card) is completely unavailable to the Ciscoworks polling process.

Any comments? Does this solution look correct? Usable?

  • Other Network Infrastructure Subjects
1 REPLY
New Member

Re: DFM notification limitations and PERL

We had a similar requirement for the forwarding of DFM alerts to pagers. Admittedly, we were somewhat disappointed when we were found out that we had to write our own PERL scripts to accomplish this. The solution you have proposed is a testament to some serious skill you appear to have in that area !

We came up with a solution where we run Outlook on the CW server and have DFM send email based alerts to it. An Outlook Inbox Assistant Rule was running that would forward only the alerts that contained the text we specified to the email address assigned to our pagers. Our pager provider had an email-to-pager service. The limitations here are that, as you stated, our infrastructure required to send email to the Internet must be functioning for all this to occur.

Another alternative that would remove the dependency on other email infrastructure is to purchase a 3rd party package like What's Up Gold ( http://www.uptimedevices.com/software/ ) and use your modem that's directly attached to your CW Server. However, if you're like us you may be trying to avoid yet another product to manage and are instead trying to squeeze the most out of CiscoWorks.

Hope this helps,

Craig Doyle

140
Views
0
Helpful
1
Replies