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-31-gc6a4654 ([email protected])
2. [SCM] Netdot branch master updated. netdot-1.0.4-31-gc6a4654
([email protected])
3. [Netdot - Bug #1729] (New) unable to import NAPTR from bind
format data ([email protected])
4. [Netdot - Feature #1645] Dynamic IPs in use
([email protected])
5. [Netdot - Feature #1730] (New) Entity search should search on
account number ([email protected])
6. [Netdot - Feature #1731] (New) Search for Owner and User by
fields ([email protected])
7. [Netdot - Bug #1732] (New) Unable to create new objects via
REST ([email protected])
----------------------------------------------------------------------
Message: 1
Date: Wed, 6 Feb 2013 12:56:00 -0800
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
netdot-1.0.4-31-gc6a4654
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 c6a46545611288ad58eba299faa3417efa04fc82 (commit)
from 3ee86e8314919bd49415a958e72a0407b138eb46 (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 c6a46545611288ad58eba299faa3417efa04fc82
Author: Carlos Vicente <[email protected]>
Date: Wed Feb 6 20:56:19 2013 +0000
Add option to change Nagios template names
diff --git a/etc/Default.conf b/etc/Default.conf
index 3efd393..0dc286d 100644
--- a/etc/Default.conf
+++ b/etc/Default.conf
@@ -1,4 +1,3 @@
-
######################################################################
# Do not modify anything here. Instead, create a file called
# Site.conf in this same dir and copy relevant sections there
@@ -769,6 +768,16 @@ NETDOT_PATH => "<<Make:PREFIX>>",
#
#####################################################################
+# Names of templates used by the Nagios exporter.
+# These values should match what you have in the hosts.include
+# file under export/nagios
+NAGIOS_TEMPLATES => {
+ generic_host => 'generic-host',
+ generic_service => 'generic-service',
+ generic_ping => 'generic-ping',
+ generic_trap => 'generic-trap',
+ generic_contact => 'generic-contact',
+},
# Map Netdot's service names to Nagios' plugin names
# Make sure you have all these checks defined in your Nagios config
diff --git a/export/nagios/hosts.include b/export/nagios/hosts.include
index 2e0a544..8f2124f 100644
--- a/export/nagios/hosts.include
+++ b/export/nagios/hosts.include
@@ -61,16 +61,6 @@ define service{
}
define service{
- name generic-RTT
- service_description RTT
- check_command apan!ping!2000.0,60%!5000.0,100%
- use generic-ping
- normal_check_interval 5
- contact_groups nobody
- register 0
-}
-
-define service{
name generic-trap
active_checks_enabled 0
service_description TRAP
diff --git a/lib/Netdot/Exporter/Nagios.pm b/lib/Netdot/Exporter/Nagios.pm
index 75a94ca..2362dd1 100644
--- a/lib/Netdot/Exporter/Nagios.pm
+++ b/lib/Netdot/Exporter/Nagios.pm
@@ -42,7 +42,7 @@ 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_GROUP_BY/ ){
+ NAGIOS_GROUP_BY NAGIOS_TEMPLATES/ ){
$self->{$key} = Netdot->config->get($key);
}
@@ -392,6 +392,10 @@ sub print_host {
my @cls = @{ $argv{contactlists} } if $argv{contactlists};
my $out = $self->{out};
+ my $generic_host = $self->{NAGIOS_TEMPLATES}->{generic_host};
+ my $generic_trap = $self->{NAGIOS_TEMPLATES}->{generic_trap};
+ my $generic_ping = $self->{NAGIOS_TEMPLATES}->{generic_ping};
+
my $contactlists = $self->{contactlists};
my %levels;
if ( @cls ) {
@@ -421,7 +425,7 @@ sub print_host {
if ( $first ){
print $out "define host{\n";
- print $out "\tuse generic-host\n";
+ print $out "\tuse $generic_host\n";
print $out "\thost_name $name\n";
print $out "\talias $group\n";
print $out "\taddress $ip\n";
@@ -430,7 +434,7 @@ sub print_host {
print $out "}\n\n";
if ( $self->{NAGIOS_TRAPS} ){
print $out "define service{\n";
- print $out "\tuse generic-trap\n";
+ print $out "\tuse $generic_trap\n";
print $out "\thost_name $name\n";
print $out "\tcontact_groups $contact_groups\n";
print $out "}\n\n";
@@ -464,7 +468,7 @@ sub print_host {
}
if ( !@cls || !keys %levels ){
print $out "define host{\n";
- print $out "\tuse generic-host\n";
+ print $out "\tuse $generic_host\n";
print $out "\thost_name $name\n";
print $out "\talias $group\n";
print $out "\taddress $ip\n";
@@ -475,7 +479,7 @@ sub print_host {
if ( $self->{NAGIOS_TRAPS} ){
# Define a TRAP service for every host
print $out "define service{\n";
- print $out "\tuse generic-trap\n";
+ print $out "\tuse $generic_trap\n";
print $out "\thost_name $name\n";
print $out "\tcontact_groups nobody\n";
print $out "}\n\n";
@@ -484,7 +488,7 @@ sub print_host {
# Add ping service for every host
print $out "define service{\n";
- print $out "\tuse generic-ping\n";
+ print $out "\tuse $generic_ping\n";
print $out "\thost_name $name\n";
print $out "}\n\n";
@@ -512,6 +516,7 @@ sub print_service {
my @cls = @{ $argv{contactlists} } if $argv{contactlists};
my $out = $self->{out};
my $contactlists = $self->{contactlists};
+ my $generic_service = $self->{NAGIOS_TEMPLATES}->{generic_service};
if ( $srvname eq "BGPPEER" || $srvname eq "IFSTATUS" ){
@@ -566,7 +571,7 @@ sub print_service {
if ( $first ){
print $out "define service{\n";
- print $out "\tuse generic-service\n";
+ print $out "\tuse $generic_service\n";
print $out "\thost_name $hostname\n";
print $out "\tservice_description $srvname\n";
print $out "\tcontact_groups $contact_groups\n";
@@ -591,7 +596,7 @@ sub print_service {
}
if ( ! @cls || ! keys %levels ){
print $out "define service{\n";
- print $out "\tuse generic-service\n";
+ print $out "\tuse $generic_service\n";
print $out "\thost_name $hostname\n";
print $out "\tservice_description $srvname\n";
print $out "\tcontact_groups nobody\n";
@@ -616,8 +621,9 @@ sub print_service {
sub print_contacts {
my($self) = @_;
my $out = $self->{out};
- my $contacts = $self->{contacts};
- my $contactlists = $self->{contactlists};
+ my $contacts = $self->{contacts};
+ my $contactlists = $self->{contactlists};
+ my $generic_contact = $self->{NAGIOS_TEMPLATES}->{generic_contact};
# Create the contact templates (with a person's common info)
# A person might be a contact for several groups/events
@@ -625,7 +631,7 @@ sub print_contacts {
foreach my $name ( keys %$contacts ){
print $out "define contact{\n";
print $out "\tname $name\n";
- print $out "\tuse generic-contact\n";
+ print $out "\tuse $generic_contact\n";
print $out "\talias $name\n";
print $out "\temail
".$contacts->{$name}->{email}."\n" if $contacts->{$name}->{email};
print $out "\tpager
".$contacts->{$name}->{pager}."\n" if $contacts->{$name}->{pager};
-----------------------------------------------------------------------
Summary of changes:
etc/Default.conf | 11 ++++++++++-
export/nagios/hosts.include | 10 ----------
lib/Netdot/Exporter/Nagios.pm | 28 +++++++++++++++++-----------
3 files changed, 27 insertions(+), 22 deletions(-)
hooks/post-receive
--
Netdot
------------------------------
Message: 2
Date: Wed, 6 Feb 2013 12:57:10 -0800
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch master updated.
netdot-1.0.4-31-gc6a4654
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 c6a46545611288ad58eba299faa3417efa04fc82 (commit)
from 3ee86e8314919bd49415a958e72a0407b138eb46 (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 | 11 ++++++++++-
export/nagios/hosts.include | 10 ----------
lib/Netdot/Exporter/Nagios.pm | 28 +++++++++++++++++-----------
3 files changed, 27 insertions(+), 22 deletions(-)
hooks/post-receive
--
Netdot
------------------------------
Message: 3
Date: Wed, 6 Feb 2013 16:31:10 -0800
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1729] (New) unable to import
NAPTR from bind format data
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1729 has been reported by Karl Putland.
----------------------------------------
Bug #1729: unable to import NAPTR from bind format data
https://osl.uoregon.edu/redmine/issues/1729
Author: Karl Putland
Status: New
Priority: Normal
Assignee:
Category: DNS
Target version: 1.0.5
Resolution:
Trying to import these
srv.myvtel.com. IN NAPTR 10 0 "s" "SIP+D2U" "" _sip._udp.myvtel.com.
srv.myvtel.com. IN NAPTR 20 0 "s" "SIP+D2T" "" _sip._tcp.myvtel.com.
results in
Transaction aborted: Error parsing Zone data: bad NAPTR data, line 4
Stack:
[/usr/local/share/perl/5.14.2/Net/DNS/ZoneFile/Fast.pm:240]
[/usr/local/share/perl/5.14.2/Net/DNS/ZoneFile/Fast.pm:1003]
[/usr/local/share/perl/5.14.2/Net/DNS/ZoneFile/Fast.pm:157]
[/usr/local/netdot/lib/Netdot/Model/Zone.pm:653]
[/usr/local/netdot/htdocs/management/zone.html:46]
[/usr/local/netdot/htdocs/management/zone.html:47]
[/usr/local/netdot/htdocs/management/autohandler:81]
[/usr/local/share/perl/5.14.2/HTML/Mason/Request.pm:951]
[/usr/local/netdot/htdocs/masondata/obj/1292882063/management/autohandler.obj:21]
[/usr/local/netdot/htdocs/autohandler:76]
--
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: 4
Date: Wed, 6 Feb 2013 23:45:41 -0800
From: [email protected]
Subject: [Netdot-devel] [Netdot - Feature #1645] Dynamic IPs in use
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1645 has been updated by Vadym Kalsin.
Carlos Vicente wrote:
>... What we do at the University is to graph the utilization of DHCP pools
>using SNMP. This process polls the DHCP servers every 5 minutes and determines
>more exactly how many addresses are used in the pool. This requires some
>special scripts and configurations, which I'd be glad to share outside this
>ticket.
Hello, Carlos!
I'm examing network documentation tool - Netdot, and I want to graph DHCP
utilization. Could you share this scripts and configurations for me?
----------------------------------------
Feature #1645: Dynamic IPs in use
https://osl.uoregon.edu/redmine/issues/1645#change-3036
Author: Emmanuel Togo
Status: Closed
Priority: Normal
Assignee:
Category:
Target version:
Resolution: wontfix
To be able to easily determine actual number of IPs in use from dhcp scope.
This I believe will help administrators know whether they are running out of IP
address space for a particular DHCP scope.
my suggestion is to color dynamic IPs in use just as is done for the discovered
IPs
--
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, 6 Feb 2013 23:46:34 -0800
From: [email protected]
Subject: [Netdot-devel] [Netdot - Feature #1730] (New) Entity search
should search on account number
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1730 has been reported by Matej Vadnjal.
----------------------------------------
Feature #1730: Entity search should search on account number
https://osl.uoregon.edu/redmine/issues/1730
Author: Matej Vadnjal
Status: New
Priority: Normal
Assignee:
Category:
Target version:
Resolution:
Entity search (at /netdot/contacts/entities.html) currently searches on entity
name and short name. Could this be expanded to search on account number also?
--
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: 6
Date: Wed, 6 Feb 2013 23:54:03 -0800
From: [email protected]
Subject: [Netdot-devel] [Netdot - Feature #1731] (New) Search for
Owner and User by fields
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1731 has been reported by Matej Vadnjal.
----------------------------------------
Feature #1731: Search for Owner and User by fields
https://osl.uoregon.edu/redmine/issues/1731
Author: Matej Vadnjal
Status: New
Priority: Normal
Assignee:
Category:
Target version:
Resolution:
Setting of owner and used by fields in edit pages is currently implemented as a
simple select HTML tag of all entities. This makes it a bit annoying if you
have hundreds or thousands of entities and need to find the right one.
Could this be changed to include a search field and a List button like some
other fields have? It would be very useful for us if this search would filter
on account number as well as entity name (see #1730).
--
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: 7
Date: Thu, 7 Feb 2013 05:13:18 -0800
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1732] (New) Unable to create
new objects via REST
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1732 has been reported by Matej Vadnjal.
----------------------------------------
Bug #1732: Unable to create new objects via REST
https://osl.uoregon.edu/redmine/issues/1732
Author: Matej Vadnjal
Status: New
Priority: Normal
Assignee:
Category:
Target version:
Resolution:
I'm using Netdot::Client::REST to create a new Ipblock:
<pre>
...
my $netdot = Netdot::Client::REST->new(
server => $location,
username => $user,
password => $pass,
);
my $r = $netdot->post("Ipblock", {
address => '10.1.1.1',
status => 'Static',
prefix => 32,
description => 'test'
});
</pre>
Calling post method results in this exception:
<pre>
File does not exist: Missing required arguments
Trace begun at /usr/local/netdot/lib/Netdot.pm line 105
Netdot::throw_fatal('Netdot::REST=HASH(0x7fe96bb09f30)', 'Missing required
arguments') called at /usr/local/netdot/lib/Netdot/REST.pm line 343
Netdot::REST::post('Netdot::REST=HASH(0x7fe96bb09f30)', 'table', 'Ipblock',
'status', 'Static', 'address', 10.1.1.1, 'description', 'test', 'prefix', 32)
called at /usr/local/netdot/lib/Netdot/REST.pm line 213
Netdot::REST::handle_resource('Netdot::REST=HASH(0x7fe96bb09f30)', 'resource',
'Ipblock', 'r', 'Apache2::Request=SCALAR(0x7fe968e6ae50)', 'status', 'Static',
'address', 10.1.1.1, 'description', 'test', 'prefix', 32) called at
/usr/local/netdot/htdocs/rest/dhandler line 35
eval {...} at /usr/local/netdot/htdocs/rest/dhandler line 34
...
</pre>
The problem is in sub post in netdot/lib/Netdot/REST.pm. The function expects
an id argument and searches for an object with this id
<pre>
unless ( $argv{obj} || ($argv{table} && $argv{id}) ){
$self->throw_fatal("Missing required arguments");
}
my $obj = $argv{obj} || $argv{table}->retrieve($argv{id});
unless ( $obj ) {
my $msg = sprintf("Netdot::REST::post: %s/%s not found", $argv{table},
$argv{id});
$self->throw(code=>Apache2::Const::NOT_FOUND, msg=>$msg);
}
</pre>
This makes it impossible to create new records via REST.
Tested with rev c6a4654561.
--
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
------------------------------
_______________________________________________
Netdot-devel mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-devel
End of Netdot-devel Digest, Vol 71, Issue 5
*******************************************