NeDi Community

NeDi Software Specific => Discovery => Topic started by: raider82 on February 13, 2012, 05:01:15 PM

Title: Re: NeDi 1.0.7 bug
Post by: raider82 on February 13, 2012, 05:01:15 PM
Since the 1.0.7. thread is closed, do you want bugs in here?
Use of uninitialized value in concatenation (.) or string at ./inc/libcli-iopty.pm line 479.

The log says:
SSH :user:22 Tout:2s OS:IOS EN:(.+?)#\s?$
PTY :Forking ssh -o 'StrictHostKeyChecking no' -l user switch
CLI2:Matched Password:, sending password
CLI3:Password sent
CLI4:Matched switch> (or gen. prompt with enpass &  cmd), enabling
ERR :pattern match timed-out
DISC:Cli bridge fwd = login error

I can login with these credentials and the prompts are switch> and switch# as one would expect ... Occurs for a bunch of switches.
Title: Re: NeDi 1.0.7 bug
Post by: rickli on February 13, 2012, 08:10:30 PM
Rather here, the I want to use the 1.0.x topics in the news board to announce progress of current development. Of course people can respond there as well...

I've made the actual enable command more flexible (for Comware devices), but forgot to include the command on other devices. This should fix it:


162a163
> $cmd{'IOS-old'}{'enab'} = 'enable';
170a172
> $cmd{'IOS'}{'enab'} = 'enable';
178a181
> $cmd{'IOS-wl'}{'enab'} = 'enable';
224a228
> $cmd{'EOS'}{'enab'} = 'enable';
231a236
> $cmd{'Xware'}{'enab'} = 'enable';
237a243
> $cmd{'XOS'}{'enab'} = 'enable';
246a253
> $cmd{'JunOS'}{'enab'} = 'enable';
Title: Re: NeDi 1.0.7 bug
Post by: eviltrooper on February 14, 2012, 08:06:46 AM
thanks,

it works for me ^^  :)
Title: Re: NeDi 1.0.7 bug
Post by: raider82 on February 14, 2012, 08:55:56 AM
I've made the actual enable command more flexible (for Comware devices), but forgot to include the command on other devices. This should fix it:
Just found out the same by debugging. Thanks once again for your really quick reply!

Another thing: all the SNMP lights are red now. However it seems that updates are still posted in the database.
Title: Re: NeDi 1.0.7 bug
Post by: eviltrooper on February 14, 2012, 09:33:27 AM
mhh i have this with the SNMP lights too..

all are red..

what does this mean?

Last successful check on Thu Jan 1 01:00:00 1970, is moni running?
Title: Re: NeDi 1.0.7 bug
Post by: rickli on February 14, 2012, 06:47:29 PM
You guys are good :) Make sure you look at the next beta! Line 404 in Devices-Status should use $dev[15]...
Title: Re: NeDi 1.0.7 bug
Post by: eviltrooper on February 15, 2012, 08:08:20 AM
can we fix this in 1.0.7 ?
Title: Re: NeDi 1.0.7 bug
Post by: raider82 on February 15, 2012, 08:23:05 AM
can we fix this in 1.0.7 ?
Sure. Line 404 corrected (and confirmed to be working):
<?=($rver and $dev[15])?"<img src=\"img/bulbg.png\">":"<img src=\"img/bulbr.png\">"?>

Guys, do your graphs all appear white? That may be a packet issue on my productive box. Need to confirm that tomorrow.
Title: Re: NeDi 1.0.7 bug
Post by: eviltrooper on February 15, 2012, 08:52:37 AM
yes.. it works.. ^^ THX  :P
Title: Re: NeDi 1.0.7 bug
Post by: rickli on February 16, 2012, 11:21:04 PM
Pity, found another one. IF errors are always 0, because it should look like this around line 974 in libsnmp.pm:

         my $ic = &misc::Strip($ifie{"$ifineO.$i"},0);
         my $oc = &misc::Strip($ifoe{"$ifoteO.$i"},0);

Looks like a bugfix release will follow soon :)
Title: Re: NeDi 1.0.7 bug
Post by: raider82 on February 17, 2012, 11:54:46 AM
Hi Remo,

also my test system does not show any graphs. I only see white rectangles. The same happens with the php files from RC1, so I guess this is no bug, but some configuration issues.
Have you introduced any new packages, do I need to change the db structure, or something else?

Thanks.
Title: Re: NeDi 1.0.7 bug
Post by: rickli on February 17, 2012, 09:14:09 PM
You mean a canvas, but no actual graph?

To debug, open a graph in a new tab. Append &debug=1 to the drawrrd.php URL...
Title: Re: NeDi 1.0.7 bug
Post by: raider82 on February 20, 2012, 09:21:50 AM
You mean a canvas, but no actual graph?
Yes. It even shows the memory, CPU, etc. when my mouse pointer is over the canvas. But the graph is missing.

I assume it comes from the rrdstep. I changed the value in nedi.conf during discovery today and set it to 86400 seconds. Some devices now show the graphs, others don't. It seems strange however, since all were discoverd with the same rrdstep value (86400) in their individual config file. Only nedi.conf (that is not used for discovery) held the old value of one hour.  I am curious if all devices will show their graphs tomorrow ...
Title: Re: NeDi 1.0.7 bug
Post by: raider82 on February 21, 2012, 12:36:13 PM
I can now confirm that graphs:
Before todays discovery, some components did not show a graph, afterwards they did (again - like yesterday).
Title: Re: NeDi 1.0.7 bug
Post by: rickli on February 21, 2012, 09:51:08 PM
Make sure you use the same rrdstep for the discovery intervall, which were used upon creating the graphs. You can verify this with rrdtool dump graph.rrd or simply delete and have nedi recreate them.
Title: Re: NeDi 1.0.7 bug
Post by: raider82 on February 22, 2012, 02:36:35 PM
Make sure you use the same rrdstep for the discovery intervall, which were used upon creating the graphs. You can verify this with rrdtool dump graph.rrd or simply delete and have nedi recreate them.
All configs now have the same rrdstep value of 86400. After deleting the rrds and new discovery today, all graphs are missing again. However, I still see the figures when the mouse pointer is over the white canvas.
Title: Re: NeDi 1.0.7 bug
Post by: rickli on February 22, 2012, 07:27:42 PM
And you discover once a day? Can you post a screenshot of a graph?

To all, unfortunately there is also a bug in libmon.pm, which lets moni.pl get slower and slower, if dependencies are used. I've moved this function into this lib without making it explicitly global:

32,34c32,34
<       %srcna = ();
<       %mon   = ();
<       %usr   = ();
---
>       %srcna     = ();
>       %main::mon = ();
>       %main::usr = ();
Title: Re: NeDi 1.0.7 bug
Post by: raider82 on February 23, 2012, 10:05:34 AM
And you discover once a day? Can you post a screenshot of a graph?
Yes, I discover once a day.
Here is one example.
Title: Re: NeDi 1.0.7 bug
Post by: rickli on February 23, 2012, 08:31:33 PM
What do you see after a few days with:

rrdtool dump /var/nedi/rrd/charon/system.rrd 

Do you get any values like this?


                        <!-- 2012-02-24 17:30:00 CET / 1330101000 --> <row><v> 6.9993472333e-01 </v><v> 1.5679446455e+08 </v><v> 0.0000000000e+00 </v><v> 0.0000000000e+00 </v></row>
                        <!-- 2012-02-24 18:20:00 CET / 1330104000 --> <row><v> 2.0156523100e-01 </v><v> 1.5679488000e+08 </v><v> 0.0000000000e+00 </v><v> 0.0000000000e+00 </v></row>
                        <!-- 2012-02-24 19:10:00 CET / 1330107000 --> <row><v> 3.0007798367e-01 </v><v> 1.5679324725e+08 </v><v> 0.0000000000e+00 </v><v> 0.0000000000e+00 </v></row>
                        <!-- 2012-02-24 20:00:00 CET / 1330110000 --> <row><v> 6.9851405200e-01 </v><v> 1.5679282594e+08 </v><v> 0.0000000000e+00 </v><v> 0.0000000000e+00 </v></row>
Title: Re: NeDi 1.0.7 bug
Post by: rickli on February 23, 2012, 11:02:35 PM
FYI, I've added a patch to fix those bugs to the download section.
With this out of the way, I can focus on 1oh8 now...
Title: Re: NeDi 1.0.7 bug
Post by: piet on February 24, 2012, 06:18:58 PM
Have the same problem with graphs.

rrdtool dump /var/nedi/rrd(devicename/system.rrd shows the following values:
Quote
                        <!-- 2012-02-24 05:00:00 CET / 1330056000 --> <row><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>
                        <!-- 2012-02-24 10:00:00 CET / 1330074000 --> <row><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>
                        <!-- 2012-02-24 15:00:00 CET / 1330092000 --> <row><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>
Title: Re: NeDi 1.0.7 bug
Post by: rickli on February 24, 2012, 07:30:23 PM
Is there an actual number in the DB? I have several installations for testing and all seem to create graphs. BTW I forgot to fix the error counters in the patch. I've updated it and if you download and apply it again (answer any questions with n), it should work...
Title: Re: NeDi 1.0.7 bug
Post by: raider82 on February 27, 2012, 02:34:08 PM
I have several installations for testing and all seem to create graphs.
Mine does too, but:
I need to run your command before discovery tomorrow in order to deliver the required feedback. After discovery, it does not make sense for a certain time, since graphs are visible then.
Title: Re: NeDi 1.0.7 bug
Post by: raider82 on February 28, 2012, 09:14:34 AM
What do you see after a few days with:

rrdtool dump /var/nedi/rrd/charon/system.rrd 
I see:
                        <!-- 2005-02-16 01:00:00 CET / 1108512000 --> <row><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>
                        <!-- 2005-02-26 01:00:00 CET / 1109376000 --> <row><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>
...
                        <!-- 2012-01-21 01:00:00 CET / 1327104000 --> <row><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>
                        <!-- 2012-01-31 01:00:00 CET / 1327968000 --> <row><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>
                        <!-- 2012-02-10 01:00:00 CET / 1328832000 --> <row><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>
                        <!-- 2012-02-20 01:00:00 CET / 1329696000 --> <row><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>
This system has been installed in 2012. It does not make any difference when I run this comman.
Btw. Today at 8, all graphs were white again. The first locations are now discovered by the cron job and show their graphs.
Title: Re: NeDi 1.0.7 bug
Post by: rickli on February 28, 2012, 05:09:36 PM
Are the devices discovered in the same order? If the interval is irregular RRD won't accept the update as valid number (it's +- 50% though). If -v output shows actual numbers I'm a bit at a loss as to why RRDs are not updated correctly...
Title: Re: NeDi 1.0.7 bug
Post by: raider82 on February 29, 2012, 11:15:18 AM
Are the devices discovered in the same order?
Yes. The order within the seedlist is constant. And the order within the cron job is constant.

If -v output shows actual numbers I'm a bit at a loss as to why RRDs are not updated correctly...
The odd thing is that after the discovery, the graphs show and after some times they are lost again. And even if the graphic is lost, there is still the latest value in the mouse-over "popup". The output of the command  you mentioned however stays static.
Title: Re: NeDi 1.0.7 bug
Post by: rickli on February 29, 2012, 06:22:45 PM
Do you have several discoveries in parallel overwriting the same RRDs?
Title: Re: NeDi 1.0.7 bug
Post by: raider82 on March 12, 2012, 08:39:13 AM
Do you have several discoveries in parallel overwriting the same RRDs?
No, all jobs run in sequence except one for a special location that is running every hour. However, I set this up later - I already had this effect before.
Title: Re: NeDi 1.0.7 bug
Post by: rickli on March 12, 2012, 08:06:36 PM
Ah, this changes everything. Are you using the same nedi.conf for the one runnnig every hour?

However I suspect the hourly run to mess up your graphs. Try running it with -So to skip topgraphs...
Title: Re: NeDi 1.0.7 bug
Post by: raider82 on March 15, 2012, 01:34:58 PM
Ah, this changes everything. Are you using the same nedi.conf for the one runnnig every hour?
No. I got an individual nedi.<location>.conf for any job.

However I suspect the hourly run to mess up your graphs. Try running it with -So to skip topgraphs...
Thanks. I will try this and report about the results.
Title: Re: NeDi 1.0.7 bug
Post by: raider82 on April 02, 2012, 08:43:30 AM
However I suspect the hourly run to mess up your graphs. Try running it with -So to skip topgraphs...
I have stopped the hourly runs about two weeks ago. Nevertheless, the effect is still the same: in the morning, I do not see any graphs. After the discovery, they re-appear and show correct data.
Title: Re: NeDi 1.0.7 bug
Post by: rickli on April 03, 2012, 10:24:24 PM
Bummer, running out of ideas...  I'll try to reproduce a daily graph, maybe something I've overlooked!
Title: Re: NeDi 1.0.7 bug
Post by: raider82 on April 20, 2012, 09:25:45 AM
I thought it might help: attached a graph that shows the time since I began with the discovery. It seems all values are available. But before today's discovery, the same graph has been empty.
Title: Re: NeDi 1.0.7 bug
Post by: rickli on April 20, 2012, 06:26:57 PM
Maybe it's related to the aggregation, since your running it daily. you can zoom in, right?
Title: Re: NeDi 1.0.7 bug
Post by: raider82 on April 23, 2012, 09:51:21 AM
Yes, I can zoom in.
Title: Re: NeDi 1.0.7 bug
Post by: rickli on April 23, 2012, 07:27:42 PM
Glad you're not missing any data after all  :)
Title: Re: NeDi 1.0.7 bug
Post by: raider82 on April 24, 2012, 02:21:16 PM
Yes. Everything is there. I just do not see it 24x7 ;-)
Title: Re: NeDi 1.0.7 bug
Post by: guillaume on January 17, 2013, 12:07:51 PM
The problem has it been resolved because I encounter the same symptoms ??
Sometimes I have a graph which appears 1 hour, then it stops grapher ...

And when I pass my mouse on the canvas I have the last value of my CPU or Memory...

Edit : Small changes...

This morning, I realize that I have a graph that has appeared only between 1am on 01/17 and 1am on 01/18.
At 1am I have my crontab that starts the discovery (seedlist with the option-B). I have charts with 24 hours late ??

Second observation, I have a constant value, which is not normal ...

An idea?


Title: Re: NeDi 1.0.7 bug
Post by: rickli on January 19, 2013, 02:05:29 AM
Well Bordeaux should have constant memory, right? Ok, back to networking, what is it? Does the .def show the correct OID?
Title: Re: NeDi 1.0.7 bug
Post by: guillaume on January 21, 2013, 11:02:45 AM
Bordeaux is a Cisco 2921 Router. The .def file is good.

If we consider Bordeaux should have constant memory... If I take an other graph.. For example the WAN interface. The traffic shouldn't be constant ... Right ?

(Reminder : My crontab is schedule every day at 1:00 am)

So, look the attachments :


One has the impression that graph with a single value.
In addition, the graphs appear only after the schedule discovery network.

An idea?

Title: Re: NeDi 1.0.7 bug
Post by: pc_sg on January 21, 2013, 11:19:21 AM
Sorry, guillaume, are you doing only a daily scheduled discovery, not hourly?
Title: Re: NeDi 1.0.7 bug
Post by: guillaume on January 21, 2013, 01:34:28 PM
Hi PC_sg,

Yes I do a daily schedule discovery. (At 1:00 am).

It's a problem ?

I think this is enough for my network.
Title: Re: NeDi 1.0.7 bug
Post by: pc_sg on January 21, 2013, 01:46:03 PM
Absolutely not, but we can wait a Remo reply if this "sparse" schedule may causa any inconvenience...
Title: Re: NeDi 1.0.7 bug
Post by: rickli on January 21, 2013, 06:03:23 PM
You're correct Paolo, the resolution of your graphs will be the discovery intervall of nedi. That's why you still should use tools like Cacti for specific interfaces, if you want 5 min. intervalls. NeDi on the other hand will generate graphs for all interfaces (and device stats) on your network...
Title: Re: NeDi 1.0.7 bug
Post by: guillaume on January 22, 2013, 01:02:30 PM
Hum Ok,

So Nedi don't graph in real time. Thank you for your replies guys !

Rickli, please, can you tell me what's is the default password when I create a nedi user ?
Title: Re: NeDi 1.0.7 bug
Post by: rickli on January 22, 2013, 06:11:23 PM
the username  :)