Welcome, Guest. Please login or register.

Poll

Do you want to monitor nodes?

No, I only care about devices. Nodes come and go...
7 (53.8%)
Not yet, but I may use it in the future!
2 (15.4%)
Yes, I love adding multiple nodes to monitoring at once.
4 (30.8%)

Total Members Voted: 13

Voting closed: August 11, 2013, 05:24:21 PM

Author Topic: NeDi 1.0.9 Progress  (Read 25241 times)

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2552
    • View Profile
    • NeDi
Re: NeDi 1.0.9 Progress
« Reply #30 on: July 30, 2013, 06:10:19 PM »
Thanks for the feedback, guys. Well, the exact query is...drumroll....:

SELECT count(ifname) FROM interfaces  WHERE device = "switch" AND iftype regexp "^6|7|117$" AND linktype = "" AND ifstat < "3" AND lastchg < "1372608010"

The iftype limits to Ethernet (happy 40th!) empty linktype means not an uplink and ifstat < 3 is down. Last change is retire days ago (but I'll try to make it customizable)....

So, "Unused" relies on lastchg, which is updated, when a change of the if status or inbound traffic is detected on the interface. The latter catches interfaces, that or up only briefly...
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

pc_sg

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: NeDi 1.0.9 Progress
« Reply #31 on: July 31, 2013, 10:19:10 AM »

My try:
Quote
SELECT count(ifname) FROM interfaces  WHERE device = "switch" AND iftype regexp "^6|7|117$" AND linktype = "" AND ifstat < "3" AND lastchg < "1372608010";
+---------------+
| count(ifname) |
+---------------+
|             0 |
+---------------+
1 row in set (0.00 sec)


I'm sure we have many unused ports.


But I'm not skilled in MYSQL queries...


Paolo

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2552
    • View Profile
    • NeDi
Re: NeDi 1.0.9 Progress
« Reply #32 on: July 31, 2013, 05:44:51 PM »
Remove:

 device = "switch" AND

Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

sergrok

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: NeDi 1.0.9 Progress
« Reply #33 on: August 01, 2013, 05:17:48 AM »
Hello.

rickli, you wrote "I replaced some old map features (no one was really using anyway)".  Did you mean Topology Map ?

pc_sg

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: NeDi 1.0.9 Progress
« Reply #34 on: August 01, 2013, 01:19:54 PM »
Remove:

 device = "switch" AND


So this seems the right query:
Code: [Select]
SELECT device, ifname FROM interfaces  WHERE iftype regexp "^6|7|117$" AND linktype = "" AND ifstat < "3" AND lastchg < "1372608010";
The only thing that I like to understand is how to choose the right number after "lastchg" to have the wanted "since days".
Remo, could you explain how to calculate it?

TIA!

Paolo

krueger

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: NeDi 1.0.9 Progress
« Reply #35 on: August 01, 2013, 02:07:27 PM »

Code: [Select]
SELECT device, ifname FROM interfaces  WHERE iftype regexp "^6|7|117$" AND linktype = "" AND ifstat < "3" AND lastchg < "1372608010";
The only thing that I like to understand is how to choose the right number after "lastchg" to have the wanted "since days".
Remo, could you explain how to calculate it?

TIA!

Paolo

@pc_sg: the number 1372608010 looks to me like an unix-timestamp (i.e. seconds since 01.01.1970 00:00H)

To calculate "since days", you have to subtract 86400 (24h * 60min *60sec) from the current timestamp for every day.
The resulting sql statement for mysql may look like:
Code: [Select]
SELECT device, ifname FROM interfaces  WHERE iftype regexp "^6|7|117$" AND linktype = "" AND ifstat < "3" AND lastchg < (UNIX_TIMESTAMP() - (days * 86400));substitute days in the above example by the number of days you want to check.

hth Uwe


raider82

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Re: NeDi 1.0.9 Progress
« Reply #36 on: August 01, 2013, 02:48:35 PM »
  • Population per device
  • Free access ports (not used for 30 (or whatever is set as retire) days)
  • Whether a config was written after changes and it's backed up (including size and changes). Note that in the list below, I'm filtering on devices which actually support reading config status (write not equal change timestamp)
These are very nice ones. If we could set a threshold for "less ports available than desired" and log this in events, it would be awesome.

One more suggestion to recognize root causes of not discovered devices. Can we differentiate:
- not available devices (no reply on ping)
- SNMP access broken (currently says "No response from IP" which is misleading)
- SSH access broken (is that logged at all?)
This would make housekeeping a good bit easier without using additional scripts.

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2552
    • View Profile
    • NeDi
Re: NeDi 1.0.9 Progress
« Reply #37 on: August 01, 2013, 04:55:57 PM »
Yes sergrok topo map. Thejit stuff was ok as a demo, but the upcoming 3djs maps allow dynamic maps, where bigger blobs can mean higher cpu or tempereatures for example. This brings a whole new (fun) aspect into network monitoring ;)
All other map features got even better!

Good ideas guys, added to todolist...even though it'll delay the first beta ;)

And yepp, it's unix timestamps for easy storing and sorting...
« Last Edit: August 01, 2013, 05:03:15 PM by rickli »
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

sergrok

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: NeDi 1.0.9 Progress
« Reply #38 on: August 02, 2013, 05:42:17 AM »
rickli We use the topology map every day in due to a move of our telecom equipment in the new offices. We have installed a large LCD TV and it always displays the map. It is very convenient to see the actual map of the network topology. I really hope that in the new version of nedi the map will be even better. Thank you.
« Last Edit: August 02, 2013, 11:25:46 AM by rickli »

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2552
    • View Profile
    • NeDi
Re: NeDi 1.0.9 Progress
« Reply #39 on: August 02, 2013, 11:28:59 AM »
(I removed your link, due to the pictures popping up next to the map. You can upload a small jpeg version instead, if you want)

Looks good and with some tweaking could be optimized today already. I'll create a tutorial, once oh9 is finished...
« Last Edit: August 02, 2013, 01:13:36 PM by rickli »
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

sjobergh

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: NeDi 1.0.9 Progress
« Reply #40 on: August 03, 2013, 01:37:14 AM »
First of all,    tnx for a great software. 
For next version I have some suggestions

-  Put a device in "maintenence mode",  if we are doing some re-config, new Lan structure, customer is doing something that makes the device "not reachable" for some time I would love to put the device in "maintenence mode",  this is ofcourse only if I know it will be unreachable for some time and I know why its unreachable.   
By putting the device in "maintenence mode" it shouldnt show up as device with problems
And if we could add some info about why its put in "maintenence mode" it would be great

Other requests :)

- A field  where I can put in what SLA I have on the device,  like 24/7/365,,  Businessdays 8-17 and so on )based on the device name

- A feild where I can  where I can put in "onsite subcontractor" for the device,  the company who is doing onsite repairs (based on the device name)

-  A feild  where I can put in what Cisco Service contract number I have for the device (based on the serial number)
 
-  Allow SSH and backup even if dont have the right SNMP community

In our "own version" of Nedi 1.07 we have added SLA, Cisco Service  and "Onsite Subcontractor" but it would be nice to have in the official version :)
 
Since I not a techncian (I am the manager for our LAN deliverance to customers) I sometimes dont know all the "techie" stuff, but I have been heard from my technicians that they would like to have some eaiser why to import new Cisco devices.
By "import new" Cisco device they mean def-files,  We buy new cisco devices every day,  and to often there isnt any def-file that matches the latest device,   is there any solution to this,   using Cisco MIBS and import them, convert them to OID def-files

/swepart

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2552
    • View Profile
    • NeDi
Re: NeDi 1.0.9 Progress
« Reply #41 on: August 06, 2013, 11:02:44 PM »
Maybe someone can try this at home, but I think ccmHistoryRunningLastSaved is of no use! It changes, when you do a "sh run". LastSaved should be LastBuilt. My tests showed ccmHistoryStartupLastChanged is the one updated, when the config is actually written to flash!

sjobergh, the .def file stuff is a community effort and we're working on it :) You can help too and I've even made a youtube tutorial to get it done easily. Here's to your other items:

- SLA or info in general sounds interesting...could be added to the monitoring section...
- Contractor could be leveraged with the SNMP contact field
- Click on the serial number in Devices-Status to add the device to the inventory and use the source or comment fields
- oh9 will allow you to manually add devices. What kind of devices would you need to backup?


Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo

pc_sg

  • Sr. Member
  • ****
  • Posts: 253
    • View Profile
Re: NeDi 1.0.9 Progress
« Reply #42 on: August 07, 2013, 07:54:10 AM »
Maybe someone can try this at home, but I think ccmHistoryRunningLastSaved is of no use! It changes, when you do a "sh run". LastSaved should be LastBuilt. My tests showed ccmHistoryStartupLastChanged is the one updated, when the config is actually written to flash!
Hi Remo, I totally agree with you.
A good rule of thumb is to try a new configuration (even a single mod) without saving it, in case activating a delayed reload to recover a wrong configured switch, so you can access it again remotely (else you may need to connect to it via serial, not always easy or feasible...
So the right way is to save only the saved configuration, not the running one.

raider82

  • Jr. Member
  • **
  • Posts: 91
    • View Profile
Re: NeDi 1.0.9 Progress
« Reply #43 on: August 07, 2013, 02:50:43 PM »
So the right way is to save only the saved configuration, not the running one.
Another "crazy" idea: what about a section for additional commands that will be run against the switches and stored in the database like the config?
One could save startup and running configs then and even compare them over a huge amount of devices via SQL. "Which config has not been saved yet and how does the diff look like".

Similar things would be possible for any command.

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2552
    • View Profile
    • NeDi
Re: NeDi 1.0.9 Progress
« Reply #44 on: August 07, 2013, 06:08:47 PM »
pc_sg I'm still saving the running config. I'm referring to those OIDs, which allow to checke, whether the saved one is older than the running one. I'll allow to detect reboots (without monitoring uptime) as well, since the returned value are timeticks. So if it's smaller than previously, the device rebooted. Additionally you can of course detect if the config was changed since last discovery to indicate whether the one in the DB is still active on the device or has become obsolete.

raider, I've been thinking about comparing saved and running as well and it still could be implemented as special option (e.g. to be run once a week). Comparing those OIDs is way more efficient though...if and only if they're 100% reliable. Unfortunately my 2940 seems to not update ccmHistoryStartupLastChanged upon snmpsets :-(

News flash  :P targets can be monitored using dns or http queries with a match. Also you could monitor an ntp server and match on the stratum! And now to something completely different! I've also improved CLI error handling to create events on failed commands...
« Last Edit: August 07, 2013, 11:37:11 PM by rickli »
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo