Page 1 of 1
Adding another switch to IRF stack
Posted: Tue Dec 18, 2018 8:23 am
by CJIndustries
I just installed another switch to my existing IRF stack. Do I need to remove the old config and run the wizard again to add the new switch config or is there another way?
Thanks.
Re: Adding another switch to IRF stack
Posted: Tue Dec 18, 2018 3:17 pm
by lmiltchev
If this is the same switch (same IP), you could just run the Switch wizard against it, then delete the "old" rrd files for this switch in the /var/lib/mrtg directory - they will get recreated. If this is completely new switch (different IP), you run the Switch wizard against it, the delete the "old" switch host in the CCM (deleting services first).
Re: Adding another switch to IRF stack
Posted: Wed Dec 19, 2018 9:10 am
by CJIndustries
I tried to run the wizard again and it just created a duplicate of the device. So then I just deleted the device altogether and removed the mrtg files. Then I tried to re-add it. Now I'm getting "Status: Unknown" with error "/var/lib/mrtg/10.1.254.252_1.rrd does not exist."
Re: Adding another switch to IRF stack
Posted: Wed Dec 19, 2018 9:42 am
by lmiltchev
This is normal behavior for about 10 minutes, until the rrd is created. If after 20-30 min you are still getting the same message, you may need to take some additional steps, that are outlined in this document:
https://assets.nagios.com/downloads/nag ... Router.pdf
Re: Adding another switch to IRF stack
Posted: Wed Dec 19, 2018 1:51 pm
by CJIndustries
Tried the steps and there is still a problem with MRTG.
Re: Adding another switch to IRF stack
Posted: Wed Dec 19, 2018 3:54 pm
by tgriep
When a switch has a lot of ports, the Switch wizard has to gather so much data, that it overflows some of the default PHP settings on the system and they need to be increased.
To do that, edit the /etc/php.ini file and change the following from
Code: Select all
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
to
Code: Select all
max_execution_time = 120
max_input_time = 240
memory_limit = 1024M
If tha above has already be increased, do it again by doubling them.
add this to the bottom of that file
Save the file
Then edit this file
add this to the bottom of that file
Save the file and restart Apache for the changes to take affect.
Then re-run the wizard to add the new ports.
If after 15 minutes, the new ports are not created, run the following commands as root and post the the /tmp/mrtg.txt file to the post?
Code: Select all
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg -debug=cfg,base,log &> /tmp/mrtg.txt
LANG=C LC_ALL=C /usr/bin/mrtg &>> /tmp/mrtg.txt
ps -ef --cols=300 >>/tmp/mrtg.txt
Thanks
Re: Adding another switch to IRF stack
Posted: Thu Dec 20, 2018 8:00 am
by CJIndustries
Made the changes and re-added the switch back into Nagios. I got the same results. Uploaded the requested info.
Re: Adding another switch to IRF stack
Posted: Thu Dec 20, 2018 10:47 am
by tgriep
The configuration file /etc/mrtg/conf.d/10.1.254.252.cfg has an error in it which is preventing the MRTG application from running.
This is the error.
ERROR: Line 26 (3000 Hanover St) in CFG file (/etc/mrtg/conf.d/10.1.254.252.cfg) does not make sense
Take a look at that file and either fix the error if possible or move that file out of that folder and recreate it with the wizard.
If that does not work for you, can you post that file so we can view it?
Re: Adding another switch to IRF stack
Posted: Thu Dec 20, 2018 11:25 am
by CJIndustries
I fixed the problem by commenting out the address in the file. I ran the commands and put them in a text file like before. I have re-added this switch four time now. Every time I try to fix this, I end up going down a rabbit hole which breaks everything. I've restored this server from the last good backup four times.
I really don't know what to do next. Just about ready to open a support ticket.
Re: Adding another switch to IRF stack
Posted: Thu Dec 20, 2018 12:04 pm
by tgriep
Do you still have a copy of the bad MRTG config file so we can look at it?
It maybe a strange character that is returned when the switch is polled and that is causing the configuration error.
One thing, make sure you are running the latest version of the wizard.
To update it, login to the XI GUI and go to the Admin > Manage Config Wizards menu, Click on the Check for Updates button and update the Wizard if needed.
Also, post the version number of the Wizard as well as the version of XI that you are running.