Send Netdot-devel mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://osl.uoregon.edu/mailman/listinfo/netdot-devel
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Netdot-devel digest..."


Today's Topics:

   1. [SCM] Netdot branch netdot-1.0 updated.
      netdot-1.0.4-148-g8bc4cc8 ([email protected])
   2. [SCM] Netdot branch netdot-1.0 updated.
      netdot-1.0.4-149-g611e62f ([email protected])
   3. [SCM] Netdot branch netdot-1.0 updated.
      netdot-1.0.4-150-gff78497 ([email protected])
   4. [Netdot - Feature #1767] (Resolved) Include Entity        name (from
      WHOIS query) in BGP Peer Nagios check service definition
      ([email protected])
   5. [SCM] Netdot branch netdot-1.0 updated.
      netdot-1.0.4-151-g12928cf ([email protected])
   6. [SCM] Netdot branch netdot-1.0 updated.
      netdot-1.0.4-152-g25447a9 ([email protected])
   7. [Netdot - Bug #1770] (Resolved) Error while deleting      device
      attribute ([email protected])
   8. [Netdot - Bug #1685] interface description is added       in wrong
      column ([email protected])
   9. [SCM] Netdot branch master updated.       netdot-1.0.4-152-g25447a9
      ([email protected])
  10. [SCM] Netdot branch netdot-1.0 updated.
      netdot-1.0.4-154-g7815806 ([email protected])


----------------------------------------------------------------------

Message: 1
Date: Wed, 18 Dec 2013 12:03:48 -0800
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
        netdot-1.0.4-148-g8bc4cc8
To: [email protected]
Message-ID: <[email protected]>

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Netdot".

The branch, netdot-1.0 has been updated
       via  8bc4cc8cfc8c033b1cf43d95a8a7a50ed1dedb9d (commit)
      from  dedc890f0427411a6aa8bb727b7e561b2aa240c8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8bc4cc8cfc8c033b1cf43d95a8a7a50ed1dedb9d
Author: Carlos Vicente <[email protected]>
Date:   Wed Dec 18 15:03:42 2013 -0500

    Corrections

diff --git a/lib/Netdot/Exporter/Nagios.pm b/lib/Netdot/Exporter/Nagios.pm
index 970603c..30ae4cf 100644
--- a/lib/Netdot/Exporter/Nagios.pm
+++ b/lib/Netdot/Exporter/Nagios.pm
@@ -262,9 +262,10 @@ sub generate_configs {
            foreach my $peer_addr ( keys %{$devh->{peering}} ){
                my $peering = $devh->{peering}->{$peer_addr};
                my $srvname = 'BGPPEER_'.$peer_addr;
-               $srvname .= '_'.$peering->{asname} if $peering->{asname};
-               $srvname .= '_('.$peering->{asn}.')' if $peering->{asn};
-               $srvname = $self->_rem_illegal_chars($srvname);
+               my $displayname = $peer_addr;
+               $displayname .= ' '. $peering->{asname}  if $peering->{asname};
+               $displayname .= ' ('.$peering->{asn}.')' if $peering->{asn};
+               $hosts{$ip}{service}{$srvname}{displayname}  = $displayname;
                $hosts{$ip}{service}{$srvname}{type}         = 'BGPPEER';
                $hosts{$ip}{service}{$srvname}{hostname}     = 
$hosts{$ip}{name};
                $hosts{$ip}{service}{$srvname}{peer_addr}    = $peer_addr;

-----------------------------------------------------------------------

Summary of changes:
 lib/Netdot/Exporter/Nagios.pm |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Netdot


------------------------------

Message: 2
Date: Wed, 18 Dec 2013 12:59:42 -0800
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
        netdot-1.0.4-149-g611e62f
To: [email protected]
Message-ID: <[email protected]>

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Netdot".

The branch, netdot-1.0 has been updated
       via  611e62fc45894e28d37c300857b8c78d65b06b58 (commit)
      from  8bc4cc8cfc8c033b1cf43d95a8a7a50ed1dedb9d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 611e62fc45894e28d37c300857b8c78d65b06b58
Author: Carlos Vicente <[email protected]>
Date:   Wed Dec 18 15:59:25 2013 -0500

    Reverted previous changes to this file

diff --git a/bin/check_bgppeer.pl b/bin/check_bgppeer.pl
index bfd4d1a..58797da 100755
--- a/bin/check_bgppeer.pl
+++ b/bin/check_bgppeer.pl
@@ -19,11 +19,21 @@
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #
 #
+#
+# Report bugs to: cvicente(at)ns.uoregon.edu
+#
+# 08/05/2009 Version 1.1
+# 09/29/2011 Version 1.2 - Fixed incorrect return values
+# 09/29/2011 Version 1.3 - Use radb.net as whois server
 
 use SNMP;
 use strict;
 use Getopt::Long qw(:config no_ignore_case bundling);
 
+# whois program for Registry database queries
+my $whois      = '/usr/bin/whois';
+my $whoissrv   = 'whois.radb.net';
+my $whoisfield = "as-name";
 my $TIMEOUT    = 30;
 my %self;
 
@@ -64,6 +74,7 @@ my $usage = <<EOF;
     -a, --address      BGP Peer remote address (NOT peer ID)
     -c, --comm         SNMP community (default: public)
     -v, --version      SNMP version (default: 1)
+    -w, --whois        Query WHOIS for AS name
     -d, --debug        Print debugging output
     -h, --help         Show this message
 
@@ -82,6 +93,7 @@ my $result = GetOptions(
     "H|hostname=s"   => \$self{HOSTNAME},
     "a|address=s"    => \$self{PEER},
     "c|comm=s"       => \$self{COMMUNITY},
+    "w|whois"        => \$self{WHOIS},
     "v|version=s"    => \$self{VERSION},
     "d|debug"        => \$self{DEBUG},
     "h|help"         => \$self{HELP},
@@ -148,7 +160,23 @@ if ( $bgp_state eq 'established' || $bgp_state eq 'idle' ) 
{
     print "$state\n";
 }else { 
     $state = 'CRITICAL';
-    print ("$state: $self{PEER} ($as) is $bgp_state\n");
+    my $asname = "n/a";
+    if ( $self{WHOIS} ){
+       &debug("Quering WHOIS server $whoissrv");
+       
+       my @output = `$whois -h $whoissrv AS$as`;
+       my ($name, $value);
+       foreach (@output) {
+           if (/No entries found/i){
+               last;
+           }
+           if (/$whoisfield:/){
+               (undef, $asname) = split /\s+/, $_;
+               last;
+           }
+       }
+    }
+    print ("$state: $as ($asname) is $bgp_state\n");
 }
 
 exit $ERRORS{$state};

-----------------------------------------------------------------------

Summary of changes:
 bin/check_bgppeer.pl |   30 +++++++++++++++++++++++++++++-
 1 files changed, 29 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Netdot


------------------------------

Message: 3
Date: Wed, 18 Dec 2013 13:32:33 -0800
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
        netdot-1.0.4-150-gff78497
To: [email protected]
Message-ID: <[email protected]>

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Netdot".

The branch, netdot-1.0 has been updated
       via  ff78497ef5186c3faf926cee07b31623226d44f2 (commit)
      from  611e62fc45894e28d37c300857b8c78d65b06b58 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ff78497ef5186c3faf926cee07b31623226d44f2
Author: Carlos Vicente <[email protected]>
Date:   Wed Dec 18 16:32:28 2013 -0500

    One more correction

diff --git a/lib/Netdot/Exporter/Nagios.pm b/lib/Netdot/Exporter/Nagios.pm
index 30ae4cf..67784d0 100644
--- a/lib/Netdot/Exporter/Nagios.pm
+++ b/lib/Netdot/Exporter/Nagios.pm
@@ -262,6 +262,8 @@ sub generate_configs {
            foreach my $peer_addr ( keys %{$devh->{peering}} ){
                my $peering = $devh->{peering}->{$peer_addr};
                my $srvname = 'BGPPEER_'.$peer_addr;
+               $srvname .= '_'. $peering->{asname} if $peering->{asname};
+               $srvname = $self->_rem_illegal_chars($srvname);
                my $displayname = $peer_addr;
                $displayname .= ' '. $peering->{asname}  if $peering->{asname};
                $displayname .= ' ('.$peering->{asn}.')' if $peering->{asn};

-----------------------------------------------------------------------

Summary of changes:
 lib/Netdot/Exporter/Nagios.pm |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Netdot


------------------------------

Message: 4
Date: Wed, 18 Dec 2013 13:35:44 -0800
From: [email protected]
Subject: [Netdot-devel] [Netdot - Feature #1767] (Resolved) Include
        Entity  name (from WHOIS query) in BGP Peer Nagios check service
        definition
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1767 has been updated by Carlos Vicente.

Status changed from New to Resolved
Resolution set to fixed


----------------------------------------
Feature #1767: Include Entity name (from WHOIS query) in BGP Peer Nagios check 
service definition
https://osl.uoregon.edu/redmine/issues/1767#change-3143

Author: Carlos Vicente
Status: Resolved
Priority: High
Assignee: Carlos Vicente
Category: DeviceManagement
Target version: 1.0.5
Resolution: fixed


The information is already in the DB. Right now, the provided plugin queries 
WHOIS when the state becomes critical, which wouldn't be necessary after this 
change.



-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://osl.uoregon.edu/redmine/my/account


------------------------------

Message: 5
Date: Wed, 18 Dec 2013 13:51:25 -0800
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
        netdot-1.0.4-151-g12928cf
To: [email protected]
Message-ID: <[email protected]>

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Netdot".

The branch, netdot-1.0 has been updated
       via  12928cf8ae4b42d67c3c18f85e48e349c808f041 (commit)
      from  ff78497ef5186c3faf926cee07b31623226d44f2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 12928cf8ae4b42d67c3c18f85e48e349c808f041
Author: Carlos Vicente <[email protected]>
Date:   Wed Dec 18 16:51:15 2013 -0500

    Typo

diff --git a/upgrade/updatedb b/upgrade/updatedb
index 0f3ef2d..06aa13f 100644
--- a/upgrade/updatedb
+++ b/upgrade/updatedb
@@ -227,7 +227,7 @@ sub upg_104_105 {
        push @statements, "ALTER TABLE device ADD COLUMN host_device bigint;";
        push @statements, "ALTER TABLE device ADD CONSTRAINT `fk_host_device` 
FOREIGN KEY (`host_device`) ".
            "REFERENCES `device` (`id`);";
-       push @statements, "CREATE INDEX host_device ON device (host_device)";
+       push @statements, "CREATE INDEX host_device ON device (host_device);";
 
        push @statements, "DROP TABLE backbonecable_history;";
        push @statements, "DROP TABLE cablestrand_history;";

-----------------------------------------------------------------------

Summary of changes:
 upgrade/updatedb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Netdot


------------------------------

Message: 6
Date: Wed, 18 Dec 2013 14:00:30 -0800
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
        netdot-1.0.4-152-g25447a9
To: [email protected]
Message-ID: <[email protected]>

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Netdot".

The branch, netdot-1.0 has been updated
       via  25447a9192976cb311ced74d121cc72e4229b3bd (commit)
      from  12928cf8ae4b42d67c3c18f85e48e349c808f041 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 25447a9192976cb311ced74d121cc72e4229b3bd
Author: Carlos Vicente <[email protected]>
Date:   Wed Dec 18 17:00:21 2013 -0500

    Fix for #1770 (Error while deleting device attribute)

diff --git a/htdocs/generic/delete.html b/htdocs/generic/delete.html
index 28b6792..5bad027 100644
--- a/htdocs/generic/delete.html
+++ b/htdocs/generic/delete.html
@@ -148,7 +148,8 @@ if ( $table && $id ){
     my @objs;
     foreach my $l ( @records ){
        my ($table, $id) = @$l;
-       push @objs, $table->retrieve($id);
+       my $obj = $table->retrieve($id);
+       push @objs, $obj if $obj;
     }
     my @lbls = map { "$table " . $_->get_label } @objs;
     eval {

-----------------------------------------------------------------------

Summary of changes:
 htdocs/generic/delete.html |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Netdot


------------------------------

Message: 7
Date: Wed, 18 Dec 2013 14:01:34 -0800
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1770] (Resolved) Error while
        deleting        device attribute
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1770 has been updated by Carlos Vicente.

Status changed from New to Resolved
Resolution set to fixed

Added extra checks to make sure that the object was valid before calling a 
method on it
----------------------------------------
Bug #1770: Error while deleting device attribute
https://osl.uoregon.edu/redmine/issues/1770#change-3144

Author: Carlos Vicente
Status: Resolved
Priority: High
Assignee: Carlos Vicente
Category: UserInterface
Target version: 1.0.5
Resolution: fixed


<pre>
error:  Can't call method "get_label" on an undefined value at 
/usr/local/netdot/htdocs/generic/delete.html line 154, <GEN490> line 5.
context:        
...     
150:     foreach my $l ( @records ){
151:     my ($table, $id) = @$l;
152:     push @objs, $table->retrieve($id);
153:     }
154:     my @lbls = map { "$table " . $_->get_label } @objs;
155:     eval {
156:     Netdot::Model->do_transaction(sub{
157:     foreach my $obj ( @objs ){
158:     unless ( $manager && $manager->can($user, "delete", $obj) ){
...     
code stack:      /usr/local/netdot/htdocs/generic/delete.html:154
/usr/local/netdot/htdocs/autohandler:110
/usr/local/netdot/htdocs/management/dhandler:1
/usr/local/netdot/htdocs/management/autohandler:81
/usr/share/perl5/HTML/Mason/Request.pm:948
/usr/local/netdot/htdocs/masondata/obj/1249759374/management/autohandler.obj:21
/usr/local/netdot/htdocs/autohandler:76


</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://osl.uoregon.edu/redmine/my/account


------------------------------

Message: 8
Date: Wed, 18 Dec 2013 18:03:50 -0800
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1685] interface description is
        added   in wrong column
To: [email protected], [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1685 has been updated by Robert Drake.


For some switch vendors this is still an issue.  Catalyst 2924XL being an 
example of one.

The problem seems to be in SNMP::Info instead of Netdot.  I updated to the 
latest version and still see the same thing.  orig_i_name is returning ifAlias 
instead of ifName.

It does work on newer Cisco devices (3750 for example).  I'm switching to 
IFNAME_SHORT => 0 for now.

----------------------------------------
Bug #1685: interface description is added in wrong column
https://osl.uoregon.edu/redmine/issues/1685#change-3145

Author: Erik Wenzel
Status: Resolved
Priority: High
Assignee: Carlos Vicente
Category: DeviceManagement
Target version: 1.0.2
Resolution: fixed


In [management][devices][interfaces] in column "Name" is the port description
set if an entry is available in snmp variable ifAlias. If an interface does not
have a description the interface name is correctly displayed(content from snmp
variable ifDescr). The column "Descr." is set correctly.
This is indepentent from the imported hardware. Software Version is
netdot-1.0.1 from git branch netdot-1.0.1 with HEAD at
f467c71cae7a527aeb8a0d7153b4303c9898d628. I also testet master branch with head
at 0e6ffd9c38bc30e73880e5c2c5ba3bfafc111d17 which also has this bug.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://osl.uoregon.edu/redmine/my/account


------------------------------

Message: 9
Date: Thu, 19 Dec 2013 06:30:03 -0800
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch master updated.
        netdot-1.0.4-152-g25447a9
To: [email protected]
Message-ID: <[email protected]>

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Netdot".

The branch, master has been updated
       via  25447a9192976cb311ced74d121cc72e4229b3bd (commit)
       via  12928cf8ae4b42d67c3c18f85e48e349c808f041 (commit)
       via  ff78497ef5186c3faf926cee07b31623226d44f2 (commit)
       via  611e62fc45894e28d37c300857b8c78d65b06b58 (commit)
       via  8bc4cc8cfc8c033b1cf43d95a8a7a50ed1dedb9d (commit)
       via  dedc890f0427411a6aa8bb727b7e561b2aa240c8 (commit)
       via  e025e01407384c22b0a601c0340b64b34be98448 (commit)
       via  8fd7747326cb2c60218b79a9354bbd1b2676a411 (commit)
       via  4ba45bda3a12652738dba50f62e270fe005e69ea (commit)
       via  7789098cc52639993a2291e685446502f0f7c931 (commit)
       via  413bdd905e7e14674caca689dd042022705b29bb (commit)
       via  33bc568385d41fd48386b4af93e5be9f464abece (commit)
       via  8eee27687fe6ed9798d85f99dd8e0e96cf9d6960 (commit)
      from  3b5852e316e060e18783d7f636860eb33721cde6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 htdocs/generic/delete.html                     |    3 ++-
 htdocs/reports/device_inventory.html           |    2 +-
 lib/Netdot/Exporter.pm                         |   15 ++++++++++-----
 lib/Netdot/Exporter/Nagios.pm                  |   23 ++++++++++++++---------
 lib/Netdot/Model/Plugins/DeviceIpNamesByInt.pm |    3 ---
 upgrade/updatedb                               |    2 +-
 6 files changed, 28 insertions(+), 20 deletions(-)


hooks/post-receive
-- 
Netdot


------------------------------

Message: 10
Date: Thu, 19 Dec 2013 06:38:57 -0800
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
        netdot-1.0.4-154-g7815806
To: [email protected]
Message-ID: <[email protected]>

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Netdot".

The branch, netdot-1.0 has been updated
       via  7815806c183c167008db9dcc0d4d0ef66b272faf (commit)
       via  1da07377910b2823aad554d09d4699520f91eebe (commit)
      from  25447a9192976cb311ced74d121cc72e4229b3bd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7815806c183c167008db9dcc0d4d0ef66b272faf
Author: Carlos Vicente <[email protected]>
Date:   Thu Dec 19 09:38:41 2013 -0500

    Fix permission problem after updating Pg to 1.0.5 (rfdrake)

diff --git a/upgrade/updatedb b/upgrade/updatedb
index 06aa13f..0724b16 100644
--- a/upgrade/updatedb
+++ b/upgrade/updatedb
@@ -263,6 +263,8 @@ sub upg_104_105 {
                               );
                            CREATE INDEX "ASN2" on "asn" ("rir");';
 
+       push @statements, "GRANT SELECT,INSERT,UPDATE,DELETE ON asn TO 
netdot_user;";
+
        push @statements, "ALTER TABLE ipblock ADD COLUMN asn bigint;";
        push @statements, "ALTER TABLE ipblock ADD CONSTRAINT \"fk_asn\" 
FOREIGN KEY (\"asn\") ".
            "REFERENCES \"asn\" (\"id\") DEFERRABLE;";

commit 1da07377910b2823aad554d09d4699520f91eebe
Author: Carlos Vicente <[email protected]>
Date:   Thu Dec 19 09:34:55 2013 -0500

    Fix for Pg installdb error (rfdrake)

diff --git a/lib/DBUTIL.pm b/lib/DBUTIL.pm
index 3fab6ff..38dd184 100644
--- a/lib/DBUTIL.pm
+++ b/lib/DBUTIL.pm
@@ -358,7 +358,7 @@ sub create_db {
         my $dbh = 
DBI->connect("dbi:Pg:dbname=postgres;host=$CONFIG{DB_HOST};port=$CONFIG{DB_PORT}",
 
             $CONFIG{DB_DBA}, $CONFIG{DB_DBA_PASSWORD})
                 or die $DBI::errstr;
-        $dbh->do("CREATE DATABASE $CONFIG{DB_DATABASE} WITH ENCODING = 
'UTF8';")
+        $dbh->do("CREATE DATABASE $CONFIG{DB_DATABASE} WITH ENCODING = 'UTF8' 
TEMPLATE template0;")
             or die $DBI::errstr;
     }
 }

-----------------------------------------------------------------------

Summary of changes:
 lib/DBUTIL.pm    |    2 +-
 upgrade/updatedb |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Netdot


------------------------------

_______________________________________________
Netdot-devel mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-devel


End of Netdot-devel Digest, Vol 81, Issue 9
*******************************************

Reply via email to