Jarle Teigen | 22 Aug 11:20 2014
Picon

NAV API

Hi,

 

A couple of short questions about NAV API:

 

I want to search NAV for a mac address in arp, and only get back last seen.

 

Is that possible ? An how do I do that ?

 

Is there a feature for sorting of the results ?

 

 

--

Jarle Teigen

 

 

Morten Brekkevold | 14 Aug 13:47 2014
Picon
Picon

Announcement: NAV 4.1.1 released

The first maintenance release of the NAV 4.1 series is now available,
version 4.1.1.

The source code is available for download at Launchpad [1]. A new
package for Debian Wheezy has been published in our APT repository [2].

Changes
=======

The following reported issues have been fixed in the new release:

  * LP#1052804 (NoReverseMatch error on multiple pages when adding IPv6 host
                with no DNS name)
  * LP#1316599 (NoReverseMatch exception when trying to load netmap)
  * LP#1333170 (Disused prefixes aren't properly deleted from the database)
  * LP#1338548 (Searching for an apparently "invalid" hostname crashes
                ipdevinfo)
  * LP#1339575 (Room and organization data keys cannot be added using SQL
                without first checking for NULL values)
  * LP#1340193 (NAV gets confused when re-using VLAN tags for multiple broadcast
                domains)
  * LP#1340576 (Virtual status of router addresses cycles back and forth,
                causing net type to swing back and forth between lan and link)
  * LP#1355693 (Interface names not present in linkState alert messages)
  * LP#1355923 (dump.py -t room crash)

Please refer to the release notes [3] for further information on
upgrading from versions prior to 4.1.

Happy NAVing everyone!

Links
=====

[1] https://launchpad.net/nav/4.1/4.1.1
[2] https://nav.uninett.no/wiki/nav_on_debian
[3] https://nav.uninett.no/doc/4.1/release-notes.html

--

-- 
Morten Brekkevold
UNINETT AS
Morten Brekkevold | 12 Aug 15:11 2014
Picon
Picon

GnuPG key transition


This is to certify that I have transitioned from my old 1024 bit GnuPG
key to a new 4096 bit one (for those of you who actually care to verify
my signatures on tarballs, Debian packages and e-mails).

My old key will continue to be valid until I publish a revocation
certificate for it at a later date, but I will only be using the new key
for signatures from now on.

My old key was:

pub   1024D/4A5C3A44 2003-03-31
      Key fingerprint = 4321 140D DC2A 7789 32A2  371D 5F12 25D2 4A5C 3A44

My new key is:

pub   4096R/04D271B4 2014-07-24
      Key fingerprint = 38C0 CC84 CEE3 E55E 2A07  3298 61D9 2617 04D2 71B4

To fetch my new key from a public key server, you can simply do:

gpg --keyserver subkeys.pgp.net --recv-key 04D271B4

If you already know my old key, you can now verify that the new key is
signed by the old one:

gpg --check-sigs 04D271B4

--

-- 
Best regards,
Morten Brekkevold
UNINETT
Jan Sigurd Refvik | 8 Aug 09:13 2014
Picon
Picon

RE: Sysname () is already in database

>Hello,
>
>I am demoing out the NAV appliance and we have a number of physical and
>virtual hosts that do not have reverse DNS entries available, resolution of the
>IPs belonging to the hosts results in unknown.domainname.tld.
>
>When attempting to add multiple hosts to the NAV seed database, I receive
>errors when NAV attempts to resolve the DNS name of the host, claiming that
>the host already exists, despite all unique information with the exception of
>the failed resolution of the fqdn.
>
>Is there a work-around so that NAV does not lookup the DNS name of said
>devices?

Maybe a list in /etc/hosts could work?

http://en.wikipedia.org/wiki/Hosts_(file)

Morten Brekkevold | 13 Aug 08:30 2014
Picon
Picon

Re: Sysname () is already in database

On Thu,  7 Aug 2014 23:58:12 +0200 (CEST) <jorr@...> wrote:

> I am demoing out the NAV appliance and we have a number of physical and
> virtual hosts that do not have reverse DNS entries available, resolution of
> the IPs belonging to the hosts results in unknown.domainname.tld.

It sounds like your DNS server is responding to queries for non-existant
PTR records with a default name of "unknown.domainname.tld", instead of
properly responding with an error.

I'm no DNS expert, but I fail to see how that is a sound strategy, if
that is the case.

> When attempting to add multiple hosts to the NAV seed database, I receive
> errors when NAV attempts to resolve the DNS name of the host, claiming that
> the host already exists, despite all unique information with the exception of
> the failed resolution of the fqdn.

If the DNS server is indeed not responding with failure, but returning
the same hostname for all unknown addresses, then yes, you will have
problems.

NAV is perfectly fine with a failed DNS lookup; It will keep the host's
IP address as its system name.

> Is there a work-around so that NAV does not lookup the DNS name of said
> devices?

No and yes. SeedDB will look up names as you enter single IP devices.
IIRC, it leaves that job to ipdevpoll if you bulk import a bunch of
devices. ipdevpoll will also regularly check for DNS names and changes
to those. This lookup can, however, be disabled, by removing the dnsname
plugin from any job configurations it is present in (ipdevpoll.conf).

I would still have a look at your DNS policy, though...

--

-- 
Morten Brekkevold
UNINETT

Morten Brekkevold | 12 Aug 16:28 2014
Picon
Picon

Re: dump.py -t room error

On Tue, 05 Aug 2014 14:06:50 +0200 Sigurd Mytting <sigurd@...> wrote:

> Trying to dump rooms I get this:
>
> # /usr/lib/nav/dump.py -t room
[snip]
>   File "/usr/lib/nav/dump.py", line 102, in room
>     line.extend(['%s=%s' % x for x in room.data.items()])
> AttributeError: 'str' object has no attribute 'items'
>
>
> Can anyone verify the same problem with Debian and UNINETT 4.1 packages?

Yes, I can. It's a bug. Not sure how it slipped through the cracks, but
the dump.py program is pretty archaic. If you could please report it at
https://bugs.launchpad.net/nav/+filebug I'll have a look at it.

It seems like Django hstore extension isn't doing its job here.

--

-- 
Morten Brekkevold
UNINETT

Morten Brekkevold | 12 Aug 16:20 2014
Picon
Picon

Re: nav installation, error 500

On Thu, 31 Jul 2014 23:07:36 +0400 Alexander Zubkov <green@...> wrote:

> Hello.
> I have installed NAV on Ubuntu 14.04 using this manual:
> https://nav.uninett.no/wiki/nav_on_debian
> But when I try to connect to server with my browser, I receive "500 Internal
> Server Error". This is what I see in apache's error.log:
[snip]
> [remote 192.168.0.0:8082]   File
> "/usr/lib/python2.7/dist-packages/nav/django/urls.py", line 22, in <module>
> [Thu Jul 31 20:59:00.542313 2014] [:error] [pid 938:tid 127863399364352]
> [remote 192.168.0.0:8082]     from django.conf.urls.defaults import patterns,
> include, url
> [Thu Jul 31 20:59:00.542357 2014] [:error] [pid 938:tid 127863399364352]
> [remote 192.168.0.0:8082] ImportError: No module named defaults
>
> What is wrong with my installation?

Hi there,

Ubuntu 14.04 provides Django 1.6; NAV has not been tested on anything
newer than Django 1.4. This errors appears to be due to one of many
changes between Django 1.4 and 1.6.

The nav Debian package itself is probably wrong to assert the dependency
to 'python-django >= 1.4'.

You seem to have three options:

1. Downgrade to Django 1.4 by finding or building a package compatible
   with Ubuntu 14.04.

2. Forcibly uninstall Django 1.4 and use 
   "pip install 'django>=1.4,<1.5'" to install a compatible version
   outside of the APT system.

3. Hack /usr/lib/python2.7/dist-packages/nav/django/urls.py by replacing 

     from django.conf.urls.defaults import patterns, include, url

   with 

     from django.conf.urls import patterns, include, url

   and then pray everything will otherwise work fine on Django 1.6.
   There is a high chance, however, that there will be further errors.

We are generally tracking Debian stable for development dependencies,
with a few exceptions, which we are packaging ourselves. Debian are
planning to freeze their next stable release around the 5th of November,
which means we may start looking at making NAV work with whatever
version of Django they freeze on around that time.

--

-- 
Morten Brekkevold
UNINETT

Morten Brekkevold | 12 Aug 16:03 2014
Picon
Picon

Re: Graphite update frequency

On Wed, 30 Jul 2014 19:41:03 -0300 Bruno Galindro da Costa
<bruno.galindro@...> wrote:

> How many times NAV input data into graphite per day for a given switch
> port? 

For port counters, the update frequency is every 5 minutes.

--

-- 
Morten Brekkevold
UNINETT

Morten Brekkevold | 12 Aug 16:01 2014
Picon
Picon

Re: Switch inventory isn't updated

On Tue, 22 Jul 2014 10:36:31 -0300 Bruno Galindro da Costa
<bruno.galindro@...> wrote:

> At http://nav.setic.ufsc.br/report/swport, I can view my interfaces with
> VLANs assignments. The problem is: the information for a given netbox isn't
> updated. All of the jobs are running fine for that netbox (green lights in
> jobs list).
>
> For example: I've a set of tagged VLANs in a trunk port on that switch that
> isn't reported by NAV.

I got the logs you sent me, but they look fine to me. Can you at least
describe the actual discrepancies so I can compare what's reported in
the web ui with what the debug logs say?

--

-- 
Morten Brekkevold
UNINETT

Morten Brekkevold | 12 Aug 15:19 2014
Picon
Picon

Re: Mobile routers in NAV

On Mon, 14 Jul 2014 10:21:54 +0200 Sigurd Mytting <sigurd@...> wrote:

> I will be deploying about 100 mobile routers in cars the next six
> months, they will be offline whenever the car is moving and out of
> cellular coverage and when the car is not in use by our roadside
> people. These routers will be in a closed VPN/APN from our teleprovider
> so I have full access and controll whenever they are online.
>
> I'm wondering how to add these to NAV; I really don't care if they are
> down and preferably they should not show up as such under "Status".  I
> would like statistics whenever they are online (not to mention the
> mac-adresses connected, possibly also a few other more specialized
> metrics like cell signal and so on).

> Anyone having any pointers to how I should manage them in NAV?

NAV was never designed with such a scenario in mind. Uptime is king :)

Currently, I think your best option may be to place your mobile routers
on maintenance in NAV until the next millennia or so.

NAV will hold back alerts from these routers while they are on
maintenance, but will still try to poll them. You will, however, find an
excess of active alerts on the status page, whenver you look at it. All
the routers will be reported as "on maintenance". They may also be
reported as not responding to SNMP while they are offline, but the
alerts will only show in the status page - no e-mails, SMS-es or instant
messages will be sent.

The active maintenance task may also clutter your maintenance schedule
calendar.

--

-- 
Morten Brekkevold
UNINETT

Morten Brekkevold | 13 Aug 08:21 2014
Picon
Picon

Re: Netmap showing gray traffic

On Wed, 06 Aug 2014 07:23:18 +0200 Sigurd Mytting <sigurd@...> wrote:

> |  https://bugs.launchpad.net/nav/+bug/1316599
>
> Looks like the same thing yes.
>
> Any hints on when the next release will be?

I'm ambitiously hoping to release tomorrow, amidst all the vacation
backlog ,)

--

-- 
Morten Brekkevold
UNINETT


Gmane