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.5-rc1-2-gea497c6 ([email protected])
   2. [SCM] Netdot branch master updated.
      netdot-1.0.5-rc1-2-gea497c6 ([email protected])


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

Message: 1
Date: Fri, 3 Jan 2014 08:18:11 -0800
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
        netdot-1.0.5-rc1-2-gea497c6
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  ea497c63eb9208e2adaf54f2fe250872d79fd130 (commit)
       via  ee806814bb023201fa59f732d5dd5ed8faa49c32 (commit)
       via  fe97b7354aec11df10df6449df660079841ad9ca (commit)
      from  7815806c183c167008db9dcc0d4d0ef66b272faf (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 ea497c63eb9208e2adaf54f2fe250872d79fd130
Author: Carlos Vicente <[email protected]>
Date:   Fri Jan 3 11:17:58 2014 -0500

    When monitoring multiple IPs in a single host, make the host with the 
target_ip the parent in Nagios

diff --git a/lib/Netdot/Exporter/Nagios.pm b/lib/Netdot/Exporter/Nagios.pm
index 67784d0..b7740ce 100644
--- a/lib/Netdot/Exporter/Nagios.pm
+++ b/lib/Netdot/Exporter/Nagios.pm
@@ -182,7 +182,7 @@ sub generate_configs {
        my $devh = $device_info->{$devid};
        next unless $devh->{target_addr} && $devh->{target_version};
        my $ip = Ipblock->int2ip($devh->{target_addr}, $devh->{target_version});
-
+       my $target_ip = $ip;
        $hosts{$ip}{ip} = $ip;
 
        # This is the device name in Netdot. 
@@ -355,11 +355,19 @@ sub generate_configs {
                next unless $iph->{addr} && $iph->{version};
                my $ip = Ipblock->int2ip($iph->{addr}, $iph->{version});
 
-               unless ( $devh->{target_id} == $ip_id ){
+               if ( $devh->{target_id} == $ip_id ){
+                   # This is the target IP
+                   if ( @parent_names && defined $parent_names[0] ){
+                       $hosts{$ip}{parents} = join ',', @parent_names;    
+                   }
+               }else{
                    # IP is not target IP. We only care about it if it's marked 
as monitored
                    next unless $iph->{monitored};
                    $hosts{$ip}{ip} = $ip;
 
+                   # Parent is the host with the target IP
+                   $hosts{$ip}{parents} = $hosts{$target_ip}{name};
+                   
                    # Figure out a unique name for this IP
                    if ( my $name = Netdot->dns->resolve_ip($ip) ){
                        $hosts{$ip}{alias} = $name; # fqdn
@@ -377,10 +385,6 @@ sub generate_configs {
                $hosts{$ip}{group} = $group_name;
                push @{ $groups{$group_name}{members} }, $hosts{$ip}{name};
                push @{$hosts{$ip}{contactlists}}, @clids;
-               if ( @parent_names && defined $parent_names[0] ){
-                   $hosts{$ip}{parents} = join ',', @parent_names;    
-               }
-
 
                # Add monitored services on this IP
                foreach my $servid ( keys %{$iph->{srv}} ){

commit ee806814bb023201fa59f732d5dd5ed8faa49c32
Author: Carlos Vicente <[email protected]>
Date:   Fri Jan 3 11:06:55 2014 -0500

    Lower log level for WHOIS query failures

diff --git a/lib/Netdot/Model/Device.pm b/lib/Netdot/Model/Device.pm
index 465a781..5db947c 100644
--- a/lib/Netdot/Model/Device.pm
+++ b/lib/Netdot/Model/Device.pm
@@ -5424,7 +5424,7 @@ sub _get_as_info{
     }
     my $obj = $i->match("aut-num","as$asn");
     unless ( $obj ){
-       $logger->warn("Device::_get_as_info: Can't find AS $asn in $server");
+       $logger->debug("Device::_get_as_info: Can't find AS $asn in $server");
        return;
     }
     $i->disconnect();

commit fe97b7354aec11df10df6449df660079841ad9ca
Author: Carlos Vicente <[email protected]>
Date:   Thu Dec 19 10:04:10 2013 -0500

    Correction

diff --git a/htdocs/management/device.html b/htdocs/management/device.html
index 4001c6b..91474f2 100644
--- a/htdocs/management/device.html
+++ b/htdocs/management/device.html
@@ -581,7 +581,7 @@ if ( $o->snmp_managed ){
            defaults=>['', \@auth_protocols, '', \@priv_protocols, 
\@sec_levels, ''],
            );
     }else{
-       $ui->add_to_fields(o=>$o, edit=>0, fields=>['community'], 
field_headers=>\@field_headers, 
+       $ui->add_to_fields(o=>$o, edit=>$editmgmt, fields=>['community'], 
field_headers=>\@field_headers, 
                           cell_data=>\@cell_data);
     }
 }

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

Summary of changes:
 htdocs/management/device.html |  2 +-
 lib/Netdot/Exporter/Nagios.pm | 16 ++++++++++------
 lib/Netdot/Model/Device.pm    |  2 +-
 3 files changed, 12 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
Netdot


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

Message: 2
Date: Fri, 3 Jan 2014 08:18:48 -0800
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch master updated.
        netdot-1.0.5-rc1-2-gea497c6
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  ea497c63eb9208e2adaf54f2fe250872d79fd130 (commit)
       via  ee806814bb023201fa59f732d5dd5ed8faa49c32 (commit)
       via  fe97b7354aec11df10df6449df660079841ad9ca (commit)
      from  7815806c183c167008db9dcc0d4d0ef66b272faf (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/management/device.html |  2 +-
 lib/Netdot/Exporter/Nagios.pm | 16 ++++++++++------
 lib/Netdot/Model/Device.pm    |  2 +-
 3 files changed, 12 insertions(+), 8 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 82, Issue 1
*******************************************

Reply via email to