Welcome, Guest. Please login or register.

Author Topic: Add option to retire devices after not being seen for a period of time  (Read 1691 times)

tristanbob

  • Full Member
  • ***
  • Posts: 146
    • View Profile
We currently have the ability to decide how long to keep node entries in Nedi.  We use 730 days (2-years).

# Remove nodes (force IP, DNS and IF update) if inactive longer than this many days
retire          730

However, we don't have this ability with devices.  I have 1,400 devices in Nedi, and over 100 of them are from old devices, or temporary devices.  If I wasn't lazy, I could write a custom SQL query to delete these, but most users would love to simply have these auto-expire out of the database.  You could keep the existing functionality of never retiring devices by default by commenting this option in nedi.conf.

# Remove devices if inactive longer than this many days
device_retire         730

Thanks Remo!

Tristan
Please visit "Other"->"Invoices" on your NeDi installation to make an annual contribution and support Nedi!

rickli

  • Administrator
  • Hero Member
  • *****
  • Posts: 2619
    • View Profile
    • NeDi
Re: Add option to retire devices after not being seen for a period of time
« Reply #1 on: January 09, 2013, 09:05:30 PM »
You can resort to a simple SQL script deleting those entries via cron for now (Delete a device in Devices-Status and then click on the lock to get the debug info to reveal the required queries).

Batch deleting devices is on the todo-list :)
Please consider Other-Invoices on your NeDi installation for an annual contribution, tx!
-Remo