[ixpmanager] Infra Aggregate Graph not Working After Removing a Switch
Carlos Perez
cperez at nic.cr
Sat Sep 27 01:02:36 IST 2025
Hi OzaR,
Here’s a quick guide on how to recover a deleted switch in IXP Manager.
If a switch was deleted (instead of just being set inactive), the infra-aggregate graphs may break because MRTG aggregates still reference its ports.
Steps to recover:
Re-create the switch in IXP Manager
On the CLI:
cd /path/to/ixp-manager
php artisan ixp:create-switch
(or via the web GUI: Infrastructure → Switches → Add Switch)
Use the same name / shortname / hostname as the old device.
After creation, edit the switch and set:
Active = off
Poll = off
This way MRTG won’t poll it, but it will still exist so aggregates don’t break.
Re-generate MRTG configuration
Run the generator and reload MRTG:
php artisan mrtg:generate
service mrtg restart # or wait for cron
Check aggregates
Open the aggregate block (e.g. location-aggregate-00002-bits) in the new mrtg.cfg and confirm that all referenced targets exist. The “Use of uninitialized value” error should now be gone.
Re-attach historical data (optional)
The old RRD files are still in MRTG’s WorkDir (e.g. /var/lib/mrtg/rrd/).
As long as the switch shortname/ifIndex match the old ones, MRTG will reuse the existing RRDs and the historical graphs will reappear.
Alternative: DB restore
If the switch was only soft-deleted in the DB (check the deleted_at field in the switch table), you can clear it:
UPDATE switch SET deleted_at = NULL, active = 0, poll = 0 WHERE id = <ID>;
Then regenerate MRTG as above.
If it was hard-deleted, re-creating it (step 1) is the only option unless you restore from a DB backup.
Note from CRIX practice:
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.
CarlosP.
From: ixpmanager <ixpmanager-bounces at inex.ie> on behalf of ozikat via ixpmanager <ixpmanager at inex.ie>
Date: Thursday, 18 September 2025 at 10:07
To: Barry O'Donovan (INEX) <barry.odonovan at inex.ie>, INEX IXP Manager Users Mailing List <ixpmanager at inex.ie>
Cc: ozikat <ozikat12 at gmail.com>
Subject: Re: [ixpmanager] Infra Aggregate Graph not Working After Removing a Switch
One more thing, the deleted/removed Swtich on IXP Manager portal, it's
not appear on mrtg.cfg config file though. Hence the stats should be
working i assume.
On 19/09/2025 00:00, Barry O'Donovan (INEX) wrote:
>
>
>> The switch has been removed from IXP manager, will try add it back and
>> uncheck poll and active
>>
>
> If it’s been removed fully, then do no re-add it if the objective is to
> remove it.
>
> I asked you to uncheck those boxes because you told me you had made no
> changes to IXP Manager.
>
> I’m now unclear as to whether you always had the switch removed from IXP
> Manager, or just recently deleted it? If it was just recently, please
> see if it resolved the issue.
>
>
_______________________________________________
INEX IXP Manager mailing list
ixpmanager at inex.ie
Unsubscribe or change options here: https://www.inex.ie/mailman/listinfo/ixpmanager
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.inex.ie/pipermail/ixpmanager/attachments/20250927/8b11eacb/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Firma Carlos.jpg
Type: image/jpeg
Size: 226360 bytes
Desc: Firma Carlos.jpg
URL: <https://www.inex.ie/pipermail/ixpmanager/attachments/20250927/8b11eacb/attachment-0001.jpg>
More information about the ixpmanager
mailing list