Greg Cooper wrote, On 12-03-2007 18:31:

> I have some netboxes with IP/Hostnames in my /etc/hosts file.  Not all my
> boxes are in there, but some are.  When I browse a netbox and click on a
> port to view the statistics, I get an error message like this:
[...]
>    a = rrdtool.info(rrd_filename)
> error: opening
> '/usr/local/nav/cricket/cricket-config/../cricket-data/switch-ports/10.8.250.3/9_16.rrd':
> 
> No such file or directory
> 
> 
> The actual path is .../switch-ports/DNS_NAME/9_16.rrd.  When I go through
> Cricket and browse to that box, I see the stats and it works fine. 

> Is there something I can do to fix this?

I have a theory about what's going on.  If you add an IP Device to NAV, and
NAV is unable to do a reverse lookup of its IP address, it will use the
device's IP address as its sysname (NAV always uses DNS names in the sysname
column, for some old, obscure reason).

So when makecricketconfig.pl generates cricket configuration, it sees that the
name of the box is 10.8.250.3, and creates config based on that.  It also
registers in the rrd_file table that
/usr/local/nav/cricket/cricket-config/../cricket-data/switch-ports/10.8.250.3/9_16.rrd
belongs to this box.

Then, later, NAV is able to perform a reverse lookup on 10.8.250.3 and sets
the sysname of the box to DNS_NAME.  Next time makecricketconfig.pl runs, it
creates a cricket config entry for DNS_NAME, and ignores/discards the old
10.8.250.3 config.  It also registers that
/usr/local/nav/cricket/cricket-config/../cricket-data/switch-ports/DNS_NAME/9_16.rrd
belongs to this box.

So now, the rrd_file table says that there are two RRD files for the 9_16
interface of DNS_NAME.  One of them might no longer exist, but it might sort
first in the table, making the IP device browser attempt to use this file
instead of the real one.

I think you can fix it by running "cleanrrds.pl -r", which removes any entry
from rrd_file that doesn't correspond to an existing file in the file system.
 This is just my best guess, though.

I don't know why
/usr/local/nav/cricket/cricket-config/../cricket-data/switch-ports/10.8.250.3/9_16.rrd
 disappears, though, as nothing in NAV deletes that.  It might never have been
created (e.g. makecricketconfig was run, but Cricket was never run until the
DNS name had been resolved and makecricketconfig ran again).

-- 
mvh
Morten Brekkevold
UNINETT
_______________________________________________
nav-users mailing list
nav-users@itea.ntnu.no
http://mailman.itea.ntnu.no/mailman/listinfo/nav-users

Reply via email to