Menu

#327 Remove offline IP Hosts automatically

Next_Release
closed
nobody
None
1
2016-09-30
2015-08-21
Ryan Lewis
No

I am wondering if there is a script or if there is going to be a script that basically checks if a host that is using an IP address is no longer online by ICMP pings for a certain abmount of time (24hrs, 12hrs, etc) then automatically remove it from the list and mark that IP address free to use.

Is there any examples? I would not mind in learning it just don't know where to start.

Ryan.

Discussion

  • Anonymous

    Anonymous - 2015-09-03

    I don't agree, since you could have an server in maintenance mode for a couple of days / weeks.
    I have created a widget which displays the offline servers older then 10 days. That way I'm in control and able to remove an IP.

     
  • Passie

    Passie - 2015-09-07

    i don't agree, Since you could have an server which is in downtime for maintenance.
    I have created an widget which shows me the offline servers, which are offline for 10 days.
    this way I have the ability to delete them manually.

     
  • Anonymous

    Anonymous - 2015-11-25

    Hi,
    Could someone share the widget to display the offline servers ?
    Thanks :)

     
  • Miha Petkovsek

    Miha Petkovsek - 2016-02-02
    • status: open --> closed
     
  • Miha Petkovsek

    Miha Petkovsek - 2016-02-02

    Inactive hosts widget added to 1.3 roadmap.

     
  • Anonymous

    Anonymous - 2016-07-13

    I know this is now closed, but I still think there should be an option to automatically delete what is offline.
    Perhaps there should be an 'aging' setting, so we can set a timeframe after which we would consider the offline IP to really be dead.
    Another option could be, a report (or witdget) of offline addresses with a 'delete' button, and the option to unselect addresses that we want to keep.

     
  • Miha Petkovsek

    Miha Petkovsek - 2016-07-14

    There is a widget + tool subpage available that shows offline IP addresses in development release for upcoming 1.3.

    Deleting is 1 simple sql query,so you can prepare a script.

     
  • Anonymous

    Anonymous - 2016-09-28
    Post awaiting moderation.
  • Milen Yovkov

    Milen Yovkov - 2016-09-30

    If lastSeen colum under the ipaddresses table is what the name suggest automatically removing not seen host for the past 120 days should be as simle as this. Please correct me if I'm wrong and note that this is not tested.

    SET GLOBAL event_scheduler = ON;
    SET @@global.event_scheduler = ON;
    SET GLOBAL event_scheduler = 1;
    SET @@global.event_scheduler = 1;

    CREATE EVENT AutoDeleteOldUnseenIpAddresses
    ON SCHEDULE
    EVERY 1 DAY
    STARTS '2016-09-30 05:30:00' ON COMPLETION PRESERVE ENABLE
    DO
    DELETE FROM ipaddresses WHERE lastSeen < DATE_SUB(NOW(), INTERVAL 120 DAY)

     

Anonymous
Anonymous

Add attachments
Cancel