<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
</head>
<body>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
Hi OzaR,</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
Here$B!G(Bs a quick guide on how to recover a deleted switch in IXP Manager.</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
If a switch was deleted (instead of just being set inactive), the infra-aggregate graphs may break because MRTG aggregates still reference its ports.</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
Steps to recover:</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
Re-create the switch in IXP Manager</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
On the CLI:</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
cd /path/to/ixp-manager</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
php artisan ixp:create-switch</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
(or via the web GUI: Infrastructure $B"*(B Switches $B"*(B Add Switch)</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
Use the same name / shortname / hostname as the old device.</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
After creation, edit the switch and set:</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
Active = off</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
Poll = off</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
This way MRTG won$B!G(Bt poll it, but it will still exist so aggregates don$B!G(Bt break.</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
Re-generate MRTG configuration</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
Run the generator and reload MRTG:</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
php artisan mrtg:generate</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
service mrtg restart   # or wait for cron</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
Check aggregates</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
Open the aggregate block (e.g. location-aggregate-00002-bits) in the new mrtg.cfg and confirm that all referenced targets exist. The $B!H(BUse of uninitialized value$B!I(B error should now be gone.</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
Re-attach historical data (optional)</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
The old RRD files are still in MRTG$B!G(Bs WorkDir (e.g. /var/lib/mrtg/rrd/).</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
As long as the switch shortname/ifIndex match the old ones, MRTG will reuse the existing RRDs and the historical graphs will reappear.</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
Alternative: DB restore</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
If the switch was only soft-deleted in the DB (check the deleted_at field in the switch table), you can clear it:</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
UPDATE switch SET deleted_at = NULL, active = 0, poll = 0 WHERE id = <ID>;</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
Then regenerate MRTG as above.</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
If it was hard-deleted, re-creating it (step 1) is the only option unless you restore from a DB backup.</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
Note from CRIX practice:</div>
<div style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
At CRIX we recently migrated data from two switches we were about to remove into a new switch first, so all historical graphs were preserved. Once migration was complete, we set the old switches to inactive (poll off) and only later deleted them. This approach
 avoids broken aggregates and keeps continuity of historical data.</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
CarlosP.</div>
<div dir="ltr" style="font-family: Garamond, Arial, Helvetica, sans-serif; font-size: 14pt; color: rgb(51, 51, 51);">
<br>
</div>
<div id="ms-outlook-mobile-signature" dir="ltr"></div>
<div id="mail-editor-reference-message-container">
<div class="ms-outlook-mobile-reference-message skipProofing">
<meta name="Generator" content="Microsoft Exchange Server">
</div>
<div class="ms-outlook-mobile-reference-message skipProofing" style="text-align: left; padding: 3pt 0in 0in; border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) currentcolor currentcolor; font-family: Aptos; font-size: 12pt; color: black;">
<b>From: </b>ixpmanager <ixpmanager-bounces@inex.ie> on behalf of ozikat via ixpmanager <ixpmanager@inex.ie><br>
<b>Date: </b>Thursday, 18 September 2025 at 10:07<br>
<b>To: </b>Barry O'Donovan (INEX) <barry.odonovan@inex.ie>, INEX IXP Manager Users Mailing List <ixpmanager@inex.ie><br>
<b>Cc: </b>ozikat <ozikat12@gmail.com><br>
<b>Subject: </b>Re: [ixpmanager] Infra Aggregate Graph not Working After Removing a Switch<br>
<br>
</div>
<div class="PlainText" style="font-size: 11pt;">One more thing, the deleted/removed Swtich on IXP Manager portal, it's<br>
not appear on mrtg.cfg config file though. Hence the stats should be<br>
working i assume.<br>
<br>
<br>
<br>
On 19/09/2025 00:00, Barry O'Donovan (INEX) wrote:<br>
><br>
><br>
>> The switch has been removed from IXP manager, will try add it back and<br>
>> uncheck poll and active<br>
>><br>
><br>
> If it$B!G(Bs been removed fully, then do no re-add it if the objective is to<br>
> remove it.<br>
><br>
> I asked you to uncheck those boxes because you told me you had made no<br>
> changes to IXP Manager.<br>
><br>
> I$B!G(Bm now unclear as to whether you always had the switch removed from IXP<br>
> Manager, or just recently deleted it? If it was just recently, please<br>
> see if it resolved the issue.<br>
><br>
><br>
<br>
_______________________________________________<br>
INEX IXP Manager mailing list<br>
ixpmanager@inex.ie<br>
Unsubscribe or change options here: <a href="https://www.inex.ie/mailman/listinfo/ixpmanager" data-outlook-id="1210bff7-2409-47e7-bae9-e68d8b01104f">
https://www.inex.ie/mailman/listinfo/ixpmanager</a><br>
</div>
</div>
</body>
</html>