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. [Netdot - Bug #1727] (New) Nagios Exporter
      ([email protected])
   2. [Netdot - Bug #1728] (New) Comment field of ipblock       works
      only in FireFox ([email protected])
   3. [SCM] Netdot branch netdot-1.0 updated.
      netdot-1.0.4-30-g3ee86e8 ([email protected])
   4. [SCM] Netdot branch master updated.       netdot-1.0.4-30-g3ee86e8
      ([email protected])


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

Message: 1
Date: Tue, 5 Feb 2013 13:09:39 -0800
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1727] (New) Nagios Exporter
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1727 has been reported by Karl Putland.

----------------------------------------
Bug #1727: Nagios Exporter
https://osl.uoregon.edu/redmine/issues/1727

Author: Karl Putland
Status: New
Priority: Normal
Assignee: 
Category: Netdot
Target version: 1.0.4
Resolution: 


Nagios exporter doesn't work if contact lists are assigned to interfaces that 
are not already assigned to a device.
Moved the name assignment into the contact list resorting.
patch attached.

Also adds nice names to display_name for interfaces.


-- 
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: 2
Date: Wed, 6 Feb 2013 01:02:43 -0800
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1728] (New) Comment field of
        ipblock works only in FireFox
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1728 has been reported by moe kraus.

----------------------------------------
Bug #1728: Comment field of ipblock works only in FireFox
https://osl.uoregon.edu/redmine/issues/1728

Author: moe kraus
Status: New
Priority: Normal
Assignee: 
Category: IPManagement
Target version: 
Resolution: 


Hi,

I have a problem to save a comment of an ipblock with prefixes <32. This occurs 
in the latest versions of Internet Explorer and Opera. With FireFox or Chrome 
there are no problems.

Path: /management/ip.html?id=123&view=Comments&edit=comment

Kind Regards

Moe Kraus


-- 
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: 3
Date: Wed, 6 Feb 2013 09:15:37 -0800
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
        netdot-1.0.4-30-g3ee86e8
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  3ee86e8314919bd49415a958e72a0407b138eb46 (commit)
       via  8a68c23606d5f1bfdd04a3eaeac70dbce1f676b5 (commit)
       via  6a341310737677bff160ad28e14b4d4cb34c5064 (commit)
      from  a0fcb57a0f361a3ff501b1cb219d695122369c46 (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 3ee86e8314919bd49415a958e72a0407b138eb46
Author: Carlos Vicente <[email protected]>
Date:   Wed Feb 6 17:15:58 2013 +0000

    Allow user to set if BGP peerings should be monitored by default

diff --git a/etc/Default.conf b/etc/Default.conf
index 6f27e02..3efd393 100644
--- a/etc/Default.conf
+++ b/etc/Default.conf
@@ -405,6 +405,12 @@ DEV_NAME2TYPE => {'-ap'        => 'Access Point',
 
 ADD_BGP_PEERS => 1,
 
+# Whether to set the monitor flag when inserting new
+# peering objects. This in turn determines whether
+# we create service checks in Nagios for each peering.
+
+MONITOR_BGP_PEERINGS => 1,
+
 # 
 # Whois queries for information about BGP peers
 # Might want to disable to speed up router discovery
diff --git a/lib/Netdot/Model/Device.pm b/lib/Netdot/Model/Device.pm
index ba76391..0b0d138 100644
--- a/lib/Netdot/Model/Device.pm
+++ b/lib/Netdot/Model/Device.pm
@@ -2649,9 +2649,13 @@ sub update_bgp_peering {
        $logger->debug(sub{ sprintf("%s: Updated Peering with: %s. ", $host, 
$entity->name)}) if $r;
        
     }else{
-       # Peering Doesn't exist.  Create.
+       # Peering doesn't exist.  Create.
        # 
-       $pstate{monitored} = 1;
+       if ( $self->config->get('MONITOR_BGP_PEERINGS') ){
+           $pstate{monitored} = 1;
+       }else{
+           $pstate{monitored} = 0;
+       }
        $p = BGPPeering->insert(\%pstate);
        my $peer_label = $entity ? $entity->name : $peer->address;
        $logger->info(sprintf("%s: Inserted new Peering with: %s. ", $host, 
$peer_label));

commit 8a68c23606d5f1bfdd04a3eaeac70dbce1f676b5
Merge: a0fcb57 6a34131
Author: Carlos Vicente <[email protected]>
Date:   Wed Feb 6 16:56:53 2013 +0000

    Merge branch 'master' into netdot-1.0

diff --cc lib/Netdot/Exporter.pm
index 66ff7c4,566ccb2..3468655
--- a/lib/Netdot/Exporter.pm
+++ b/lib/Netdot/Exporter.pm
@@@ -84,9 -84,9 +84,9 @@@ sub get_device_info 
      $logger->debug("Netdot::Exporter::get_device_info: querying database");
      my $rows = $self->{_dbh}->selectall_arrayref("
                  SELECT    d.id, d.snmp_managed, d.community,
-                           d.down_from, d.down_until, entity.name, 
contactlist.id,
+                           d.down_from, d.down_until, entity.name, site.name, 
contactlist.id,
                            target.id, target.address, target.version, 
target.parent, rr.name, zone.name,
 -                          i.id, i.number, i.admin_status, i.monitored, 
i.contactlist,
 +                          i.id, i.number, i.name, i.admin_status, 
i.monitored, i.contactlist,
                            bgppeering.bgppeeraddr, bgppeering.monitored
                  FROM      rr, zone, interface i, device d
                  LEFT JOIN ipblock target ON d.snmp_target=target.id
@@@ -103,9 -104,9 +104,9 @@@
      $logger->debug("Netdot::Exporter::get_device_info: building data 
structure");
      foreach my $row ( @$rows ){
        my ($devid, $devsnmp, $community, 
-           $down_from, $down_until, $entity, $clid,
+           $down_from, $down_until, $entity, $site, $clid,
            $target_id, $target_addr, $target_version, $subnet, $name, $zone, 
 -          $intid, $intnumber, $intadmin, $intmon, $intcl,
 +          $intid, $intnumber, $intname, $intadmin, $intmon, $intcl,
            $peeraddr, $peermon) = @$row;
        my $hostname = ($name eq '@')? $zone : $name.'.'.$zone;
        $device_info{$devid}{ipid}         = $target_id;

commit 6a341310737677bff160ad28e14b4d4cb34c5064
Author: Carlos Vicente <[email protected]>
Date:   Wed Feb 6 16:55:53 2013 +0000

    Allow choice of host grouping in Nagios (by entity or by site)

diff --git a/etc/Default.conf b/etc/Default.conf
index 8f533dc..6f27e02 100644
--- a/etc/Default.conf
+++ b/etc/Default.conf
@@ -817,6 +817,13 @@ NAGIOS_TRAPS => 1,
 # (DEFAULT_DNSDOMAIN)
 NAGIOS_STRIP_DOMAIN => 1,
 
+# What to use for grouping hosts. Options:
+#   entity: The name of the "used_by" entity of the device, or the
+#           entity associated with the subnet where its main
+#           IP resides.
+#   site:   The name of the site where the device is located
+NAGIOS_GROUP_BY => 'entity',
+
 
 #####################################################################
 #  - SYSMON - www.sysmon.org
diff --git a/lib/Netdot/Exporter.pm b/lib/Netdot/Exporter.pm
index 0f05f61..566ccb2 100644
--- a/lib/Netdot/Exporter.pm
+++ b/lib/Netdot/Exporter.pm
@@ -84,13 +84,14 @@ sub get_device_info {
     $logger->debug("Netdot::Exporter::get_device_info: querying database");
     my $rows = $self->{_dbh}->selectall_arrayref("
                 SELECT    d.id, d.snmp_managed, d.community,
-                          d.down_from, d.down_until, entity.name, 
contactlist.id,
+                          d.down_from, d.down_until, entity.name, site.name, 
contactlist.id,
                           target.id, target.address, target.version, 
target.parent, rr.name, zone.name,
                           i.id, i.number, i.admin_status, i.monitored, 
i.contactlist,
                           bgppeering.bgppeeraddr, bgppeering.monitored
                 FROM      rr, zone, interface i, device d
                 LEFT JOIN ipblock target ON d.snmp_target=target.id
                 LEFT JOIN entity ON d.used_by=entity.id
+                LEFT JOIN site ON d.site=site.id
                 LEFT JOIN devicecontacts ON d.id=devicecontacts.device
                 LEFT JOIN contactlist ON 
contactlist.id=devicecontacts.contactlist
                 LEFT JOIN bgppeering ON d.id=bgppeering.device
@@ -103,7 +104,7 @@ sub get_device_info {
     $logger->debug("Netdot::Exporter::get_device_info: building data 
structure");
     foreach my $row ( @$rows ){
        my ($devid, $devsnmp, $community, 
-           $down_from, $down_until, $entity, $clid,
+           $down_from, $down_until, $entity, $site, $clid,
            $target_id, $target_addr, $target_version, $subnet, $name, $zone, 
            $intid, $intnumber, $intadmin, $intmon, $intcl,
            $peeraddr, $peermon) = @$row;
@@ -118,6 +119,7 @@ sub get_device_info {
        $device_info{$devid}{down_from}    = $down_from;
        $device_info{$devid}{down_until}   = $down_until;
        $device_info{$devid}{used_by}      = $entity if defined $entity;
+       $device_info{$devid}{site}         = $site if defined $site;
        $device_info{$devid}{contactlist}{$clid} = 1 if defined $clid;
        $device_info{$devid}{peering}{$peeraddr}{monitored}  = $peermon if 
defined $peeraddr;
        $device_info{$devid}{interface}{$intid}{number}      = $intnumber;
diff --git a/lib/Netdot/Exporter/Nagios.pm b/lib/Netdot/Exporter/Nagios.pm
index 4709c5d..570cf95 100644
--- a/lib/Netdot/Exporter/Nagios.pm
+++ b/lib/Netdot/Exporter/Nagios.pm
@@ -41,7 +41,8 @@ sub new{
 
     foreach my $key ( qw /NMS_DEVICE NAGIOS_CHECKS NAGIOS_TIMEPERIODS 
NAGIOS_DIR 
                           NAGIOS_FILE NAGIOS_NOTIF_FIRST NAGIOS_NOTIF_LAST 
-                          NAGIOS_NOTIF_INTERVAL NAGIOS_TRAPS 
NAGIOS_STRIP_DOMAIN/ ){
+                          NAGIOS_NOTIF_INTERVAL NAGIOS_TRAPS 
NAGIOS_STRIP_DOMAIN
+                          NAGIOS_GROUP_BY/ ){
        $self->{$key} = Netdot->config->get($key);
     }
      
@@ -204,15 +205,22 @@ sub generate_configs {
 
        # Determine the group name
        my $group;
-       if ( my $subnet = $device_info->{$devid}->{subnet} ){
-           $group = $subnet_info{$subnet}->{entity} || 
-               $subnet_info{$subnet}->{description};
-       }
-       unless ( $group ){ 
-           if ( my $entity = $device_info->{$devid}->{used_by} ){
-               $group = $entity;
+       if ( $self->{NAGIOS_GROUP_BY} eq 'entity' ){
+           if ( my $subnet = $device_info->{$devid}->{subnet} ){
+               $group = $subnet_info{$subnet}->{entity} || 
+                   $subnet_info{$subnet}->{description};
+           }
+           unless ( $group ){ 
+               if ( my $entity = $device_info->{$devid}->{used_by} ){
+                   $group = $entity;
+               }
+           }
+       }if ( $self->{NAGIOS_GROUP_BY} eq 'site' ){
+           if ( my $site = $device_info->{$devid}->{site} ){
+               $group = $site;
            }
        }
+
        unless ( $group ){
            $logger->warn("Device $hostname in unknown group");
            $group = "Unknown";

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

Summary of changes:
 etc/Default.conf              |   13 +++++++++++++
 lib/Netdot/Exporter.pm        |    6 ++++--
 lib/Netdot/Exporter/Nagios.pm |   24 ++++++++++++++++--------
 lib/Netdot/Model/Device.pm    |    8 ++++++--
 4 files changed, 39 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
Netdot


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

Message: 4
Date: Wed, 6 Feb 2013 09:16:16 -0800
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch master updated.
        netdot-1.0.4-30-g3ee86e8
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  3ee86e8314919bd49415a958e72a0407b138eb46 (commit)
       via  8a68c23606d5f1bfdd04a3eaeac70dbce1f676b5 (commit)
       via  6a341310737677bff160ad28e14b4d4cb34c5064 (commit)
       via  a0fcb57a0f361a3ff501b1cb219d695122369c46 (commit)
      from  efd14d2bd89745d9ec64b8ad73e659ac497ec796 (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:
 etc/Default.conf              |   13 +++++++++++++
 lib/Netdot/Exporter.pm        |   11 +++++++----
 lib/Netdot/Exporter/Nagios.pm |   39 ++++++++++++++++++++++++---------------
 lib/Netdot/Model/Device.pm    |    8 ++++++--
 4 files changed, 50 insertions(+), 21 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 71, Issue 4
*******************************************

Reply via email to