Well shoot.  Who would have thought the answer would have been that easy.  The housekeeping script worked like a charm.  Thanks

 

From: observium [mailto:observium-bounces@observium.org] On Behalf Of Adam Armstrong
Sent: Tuesday, October 6, 2015 1:13 PM
To: observium@observium.org
Subject: Re: [Observium] Orphaned ports

 

Check out the housekeeping documentation on the website :)

 

adam.

 

Sent from Mailbird

On 06/10/2015 17:29:57, Aaron Mayfield <amayfield@artisaninfrastructure.com> wrote:

I’ve been digging around in my database, trying to figure out why I have a large number of ports listed in my observium interface, compared to the number of devices I have.  I have discovered several devices that were removed (via delete_device.php) a while back, but it seems that the ports table wasn’t completely cleaned up.  These devices were removed from the devices table:

 

mysql> select * from devices where device_id in(45,66,67,68,69,70,71,72,73);

Empty set (0.00 sec)

 

mysql>

 

But the ports for these devices weren’t entirely removed:

 

mysql> select device_id,count(*) as "number of ports" from ports where device_id IN(45,66,67,68,69,70,71,72,73) group by device_id;

+-----------+-----------------+

| device_id | number of ports |

+-----------+-----------------+

|        45 |            4153 |

|        66 |            4153 |

|        67 |            4153 |

|        68 |            4153 |

|        69 |            4153 |

|        70 |            1569 |

|        71 |            4153 |

|        72 |            4153 |

|        73 |            4153 |

+-----------+-----------------+

9 rows in set (0.01 sec)

 

mysql>

 

These devices were probably F10/Dell M1000e cards, which I removed from observium because of the large number of l2vlan interfaces on each was causing a processor burden when polled.  Rather than fight with them, I just removed them.

 

My question is this, how can I clean up the remnants?  Can I just delete these orphaned ports from the table?  Or will I break anything if I do that?

 

Thanks

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.  If you have received this email in error, please notify the system manager.  Please note that any views or opinions present in this email are solely those of the author and do not necessarily represent those of the company.  Finally the recipient should check this email and any attachment for the presence of viruses.  The company accepts no liability for any damage caused by any virus transmitted by this email.   (Proprietary & Confidential – Artisan Infrastructure, Inc. et all.)

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.  If you have received this email in error, please notify the system manager.  Please note that any views or opinions present in this email are solely those of the author and do not necessarily represent those of the company.  Finally the recipient should check this email and any attachment for the presence of viruses.  The company accepts no liability for any damage caused by any virus transmitted by this email.   (Proprietary & Confidential – Artisan Infrastructure, Inc. et all.)