Welcome, Guest. Please login or register.

Author Topic: NeDi 1.0.4  (Read 14048 times)

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2643
    • View Profile
    • NeDi
NeDi 1.0.4
« on: April 11, 2009, 09:41:38 PM »
  • Instant removal of devices and related data upon deleting from Devices Status.
  • Updating IF and modules of a device immediately after its discovery (no more empty tables, if it's been missing). This is also an important step towards parallel discovery!
  • Enhanced Stock Management (no removal, but change of state upon discovery, editable items, non admins can edit stock! Enhanced to deal with big stocks and additional warranty field).
  • Fix Devsend.pl to be compliant with Net::Appliance::Session (probably need ank's help).
  • Patch Topology Routes as contributed and improve route discovery
  • Fixed ProCurve .defs to represent proper models and minor improvements for DefGen.
  • Detect module changes based on their SN
  • Traps and Syslog message can generate mails now. Enhanced trigger tests in moni.pl
  • Takes RFC2233 into account when more than 1 HC counter is missing
  • leaf- and webdevs replaced by nosnmpdev along with improved discovery code for IP phones etc.
  • Support for (former Colubris) HP-MSM Wlan controllers and APs with wireless client tracking.
  • Total PoE Delivery in Monitoring-Health and per Device totals in Report-Devices
  • New discovery options -a (add single dev) -A (use DB as seedlist), enhanced per user GUI settings
  • Top graphs (PoE, Messages Availability and more), improved Devices-Graph to pick intervall.
  • Track print supplies (toner). It's a start and I'll pursue if someone is sponsoring more development in this direction.
  • Custom RRD per device possible. E.g. # Clients on APs
  • Defgen reads existing .defs via softlink in html/log
« Last Edit: April 11, 2009, 11:41:10 PM by rickli »
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

rauchi

  • Guest
Re: NeDi 1.0.4
« Reply #1 on: April 13, 2009, 11:48:30 AM »
Hello Remo

Thank you for the new release! Today I had a bit more time to look at the new features and I especially like the updated monitoring part with the graphes. It's also a nice feature to be able to switch easily between Byte/s and Bit/s for the graphs over the Web GUI.

regards
Marco

gumba

  • Guest
User table in new NeDi
« Reply #2 on: April 14, 2009, 03:04:04 PM »
I stumbled across the new user table structure while installing 1.0.4. Is there any option in the new NeDi to transform user tables from older version to the current structure that I've overseen? If not, I could provide the SQL script I made to patch our NeDi servers.

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2643
    • View Profile
    • NeDi
Re: NeDi 1.0.4
« Reply #3 on: April 14, 2009, 07:26:54 PM »
Oh you're right I completely forgot to mention this...I'll update the download section! Lots of changes in RRDs, DB structure & nedi.conf! Please edit included config and initialize (-i [user pass]) the database.

The RRDs don't need to be erased, but new ones will be more granular. 2000 samples and 10*2000 for long-term graphs. This stores 2000h (83 days) with details and 833 days with 10 times less resolution (based on hourly discovery).

Oh and of course, I'm sure people would be happy, if you share that script ;)
« Last Edit: April 14, 2009, 10:36:38 PM by rickli »
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

gumba

  • Guest
Re: NeDi 1.0.4
« Reply #4 on: April 15, 2009, 12:07:33 PM »
Used this MySQL script to take the users table to NeDi 1.0.4:
Code: [Select]
/* tidy up current users table */
UPDATE user SET adm = 0 WHERE adm IS NULL;
UPDATE user SET net = 0 WHERE net IS NULL;
UPDATE user SET dsk = 0 WHERE dsk IS NULL;
UPDATE user SET mon = 0 WHERE mon IS NULL;
UPDATE user SET mgr = 0 WHERE mgr IS NULL;
UPDATE user SET oth = 0 WHERE oth IS NULL;
UPDATE user SET language = 'deutsch' WHERE language = 'german';
UPDATE user SET language = 'deutsch' WHERE language = 'ger';
UPDATE user SET language = 'english' WHERE language = 'eng';
/* rename old users table */
RENAME TABLE user TO user_old;
/* create new users table */
CREATE TABLE user (
        name VARCHAR(32) NOT NULL UNIQUE,
        password VARCHAR(32) NOT NULL default '',
        groups TINYINT unsigned NOT NULL default 0,
        email VARCHAR(64),
        phone VARCHAR(32),
        time INT unsigned,
        lastseen INT unsigned,
        comment VARCHAR(255),
        language VARCHAR(16) NOT NULL default 'english',
        theme VARCHAR(16) NOT NULL default 'default',
        volume TINYINT unsigned NOT NULL default 10,
        columns TINYINT unsigned NOT NULL default 5,
        msglimit TINYINT unsigned NOT NULL default 5,
        graphs TINYINT unsigned NOT NULL default 2,
        PRIMARY KEY (name)
);
/* transfer user information */
INSERT INTO user ( name, password, groups, email, phone, time, lastseen, comment, language, theme )
SELECT name, password, ( adm * 1 + net * 2 + dsk * 4 + mon * 8 + mgr * 16 + oth * 32 ) AS groups, email, phone, time, lastseen, comment, language, theme FROM user_old;
/* delete old user table */
DROP TABLE user_old;

Using the MySQL command line client, just run this script with:
Code: [Select]
mysql -u *nedi-dbuser* -p nedi < transferUsers.sql

duanew

  • Guest
Re: NeDi 1.0.4
« Reply #5 on: April 22, 2009, 05:56:44 AM »
I had to change line 427 in inc/libmisc.pl as follows:

Code: [Select]
if($getfwd eq 'cli'){
to

Code: [Select]
if($getfwd =~ /(cli|sec)/){
This is because we have quite a few switches with port security so I set getfwd in nedi.conf to "sec".  By default Discover only tries to telnet to a device if getfwd is set to "cli".  I added "sec" as well.

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2643
    • View Profile
    • NeDi
Re: NeDi 1.0.4
« Reply #6 on: April 22, 2009, 08:52:18 PM »
That's a bug indeed, thanks
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

ldkikm

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: NeDi 1.0.4
« Reply #7 on: April 23, 2009, 07:25:52 AM »
Hello. I confused. How update Nedi 1.0 to 1.0.4? Can someone create a howto?

Thanks.

regards, ldkikm

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2643
    • View Profile
    • NeDi
Re: NeDi 1.0.4
« Reply #8 on: April 23, 2009, 06:08:59 PM »
Sorry for not being very clear on that topic. I did not spend any time on a migration path (simply don't have any left for that). The key information a user might want to preserve is stock and users. The latter is taken care of and stock would require a similar script to adjust the table accordingly. All other data will be phased out over time. Definitely a bonus if you leave your existing NeDi installation running (but not discovering) for reference...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

gumba

  • Guest
Re: NeDi 1.0.4
« Reply #9 on: April 24, 2009, 10:21:09 AM »
stock would require a similar script to adjust the table accordingly.

... which comes here.

Code: [Select]
/* rename old users table */
RENAME TABLE stock TO stock_old;
/* create new users table */
CREATE TABLE stock (
serial VARCHAR(32) UNIQUE,
type VARCHAR(32),
user VARCHAR(32),
time INT unsigned,
location VARCHAR(255),
state TINYINT unsigned,
comment VARCHAR(255),
lastseen INT unsigned,
index(serial)
);
/* transfer user information */
INSERT INTO stock ( serial, type, user, time, location, state, comment, lastseen )
SELECT serial, type, user, time, location, state, NULL as coment, UNIX_TIMESTAMP() as lastseen FROM stock_old;
/* delete old user table */
DROP TABLE stock_old;

Updating NeDi 1.0 to 1.0.4 is not very difficult. Before re-initializing your database, simply extract the adjusted users and stock tables using my scripts:
Code: [Select]
mysql -u *nedi-user* -p nedi < transferUsers.sql
mysqldump -i *nedi-user* -p nedi user > user.sql
mysql -u *nedi-user* -p nedi < transferStock.sql
mysqldump -i *nedi-user* -p nedi stock > stock.sql
(replace *nedi-user* with your mysql nedi user).

After installing NeDi 1.0.4 and re-initializing the database just import the extracted user and stock info:
Code: [Select]
mysql -u *nedi-user* -p nedi < stock.sql
mysql -u *nedi-user* -p nedi < user.sql

The rest of the installation works like described somewhere... :) For me, keeping your NeDi 1.0 installation like Remo suggests has indeed turned out to be an excellent idea.

OMFan

  • Guest
Re: NeDi 1.0.4
« Reply #10 on: April 24, 2009, 04:17:54 PM »
Hello,

Thanks for your script, but i have one question.

Since I have run Nedi for a long time, i would like to keep all data like IFTRACK, IFChanges.

Is it possible ?

I would be enjoyed to upgrade NeDi but only if i don't loose all data.

Thanks for your answer and thanks a lot rickli for your update.

Your product is so fantastic !!


PS : I have found 2 errors.

* When I want to execute one command on a switch, and after consult logs, i have one error (see the attached jpg file).

I don't understand why because the save configuration of switches works well.

* When I want to export configuration of a switch, i have one error (see the attached jpg file).


Thanks a lot for your help.

Bye.
« Last Edit: April 24, 2009, 04:28:48 PM by OMFan »

gumba

  • Guest
Re: NeDi 1.0.4
« Reply #11 on: April 24, 2009, 04:37:33 PM »
The errors you receive may be related to permission issues on your file system. Check if the directory /opt/nedi/html/log/ is writable for the user owning the web server process (usually www-data or www, you may check with e.g. ps aux | grep apache )

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2643
    • View Profile
    • NeDi
Re: NeDi 1.0.4
« Reply #12 on: April 24, 2009, 09:21:23 PM »
Gumba is right and iftrack and iptrack have not changed since 1.0, so you should be fine...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

folke

  • Guest
Re: NeDi 1.0.4
« Reply #13 on: April 28, 2009, 11:15:03 AM »
Hi,

Really nice to see a new release, thanx!!

A little question about the rrd graphs. Is it possible to do a 5min average now, or have I misunderstood the info?

--
Regards Folke
Sweden

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2643
    • View Profile
    • NeDi
Re: NeDi 1.0.4
« Reply #14 on: April 28, 2009, 06:17:22 PM »
I only improved overall resolution of the RRDs. If your network is very small, you might get away with 5 minute graphs, but I don't recommend it. Rather keep using Cacti integration for those IFs you want to monitor closely. However this contribution might be of help http://forum.nedi.ch/index.php?topic=433.0
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo