Release Notes - New Features - DBI Modules - Correlation Expressions -
Previous: Perl 5.8.0     Next: SNMP Stack Upgrade

DBI Modules

Perl version 5.8.0 includes a Database Interface (DBI) module, enabling you to access databases. With the ability to use databases, you can expand the actions NerveCenter can perform, including:

NerveCenter 3.8 comes with the following DBD modules:

There will be a tools and utilities CD-ROM containing additional DBD modules.

This sample DBI code is from a poll condition that collects ifEntry statistics from an interface. These statistics may be written to a database for archiving and performance reporting.


   use DBI;
   
   use constant DBUSER => 'dbuser';
   use constant DBPASS => 'dbpass';
   
   #
   # Establish the collection
   #
   my $dsn = "dbi:mysqlPP:database=nervecenter:hostname=localhost";
   my $dbh = DBI->connect($dsn, DBUSER, DBPASS);
   
   if (defined( $dbh )) {
    my $ifIndex = ifEntry.ifIndex ;
    my $ifInOctets = delta( ifEntry.ifInOctets );
    my $ifOutOctets = delta( ifEntry.ifOutOctets );
    my $ifSpeed = ifEntry.ifSpeed ;
    my $timestamp = time();
   
    $dbh->do( 'insert into ifentry_table values ( ' .
    $dbh->quote( $NodeName ) . ',' .
    $dbh->quote( $ifIndex ) . ',' .
    $dbh->quote( $ifInOctets ) . ',' .
    $dbh->quote( $ifOutOctets ) . ',' .
    $dbh->quote( $ifSpeed ) . ',' .
    $dbh->quote( $timestamp ) . ')' );
   
    $dbh->disconnect;
   
    FireTrigger( "DBI_OK" );
   } else {
    FireTrigger( "DBI_NoConnect" );
   }

For details about using the DBI module, see your Perl documentation.

IfEntry_LogToDBI

NerveCenter 3.8 also ships with a new behavior model, IfEntry_LogToDBI, which utilizes the new DBI module. For details about the IfEntry_LogToDBI behavior model, see the Behavior Models Cookbook.

Correlation Expressions

NerveCenter 3.8 provides an additional method for Alarm Definition creation, the Correlation Expression window. Correlation expressions allow the definition of alarm diagrams based on Boolean expressions. The correlation expressions do not apply in every situation, but in cases where multiple combinations of events need to be detected and acted upon, the correlation expressions save tremendous amounts of time, both in alarm diagram designing and building.

For details about creating correlation expressions, see Chapter 11, Using Alarms in Designing and Managing Behavior Models.


Previous: Perl 5.8.0 Next: SNMP Stack Upgrade
This file was last updated on 20 February 2004