Page 1 of 1

Nagios XI Network Wizard and Apache URI too long

Posted: Mon Dec 22, 2014 10:51 am
by brdr
Hi,

We have Nagios XI 20214R2.0.

Using the Monitoring Wizard for Network Switch / Router against a Cisco NX-OS(tm) m9500. This device has about 150 ports.

Apache Log File /var/log/httpd show these errors. The last error stops the wizard in its tracks.

Use of uninitialized value $dir in concatenation (.) or string at /usr/bin/mrtg line 2692.
ERROR: "WorkDir" not specified in mrtg config file
[Mon Dec 22 10:15:25 2014] [error] [client 10.21.82.141] request failed: URI too long (longer than 8190)

Looking at apache it appears the setting refers to directive LimitRequestLine. Is there a simple way to alter this so that the Wizard doesn't fail?

Thanks

Re: Nagios XI Network Wizard and Apache URI too long

Posted: Mon Dec 22, 2014 11:10 am
by tmcdonald
Which step of the wizard is failing? If it is the apply step, you might be able to get by with doing half of the ports in one run of the wizard, and half in another.

As far as I know, that setting is configurable in the configs for httpd, but also set as a hard limit in the source itself, which would require a recompile of Apache to fix.

I can talk to the developers about changing the wizard to use a POST instead of a GET when submitting the data.

Re: Nagios XI Network Wizard and Apache URI too long

Posted: Mon Dec 22, 2014 11:38 am
by brdr
Yes, it is the APPLY step.

I'm selecting to scan by Port Name in the wizard. Following your advice I've broken the scan up in couple of different ways.

First scan for 66 ports failed as desribed below. rolled back the configuration snapshot the last good one.
Second scan for 48 ports failed. Same thing.....
Third scan for 18 ports failed. Same thing....
...

Question, when I uncheck the left column in wizard for a Port I'm assuming the other check boxes for that port (bandwidth and status) are ignored. Correct?

We have dozens of devices that have a large number of ports. Doing this in pieces will take a while.

Re: Nagios XI Network Wizard and Apache URI too long

Posted: Mon Dec 22, 2014 1:41 pm
by mikew
I have seen this in the past and the problem was with PHP memory running out. Check your /var/log/httpd/error.log to see if this may be the issue.

Re: Nagios XI Network Wizard and Apache URI too long

Posted: Mon Dec 22, 2014 3:15 pm
by scottwilkerson
brdr wrote:ERROR: "WorkDir" not specified in mrtg config file
This makes me believe there is an error in your /etc/mrtg/mrtg.cfg
Lets run

Code: Select all

head -40 /etc/mrtg/mrtg.cfg|grep -v '#'

Re: Nagios XI Network Wizard and Apache URI too long

Posted: Tue Dec 23, 2014 10:40 am
by mikew
So looking at this exact problem on a system today here are a couple thoughts:

1. Scott is right it is not a PHP problem per reference to mrtg

But the system I looked at today had metacharacters in the descriptions of the ports and through the same error. So take at look there first. You may have to delete the bad cfg file created in /etc/mrtg/conf.d for the host you are working with before you try again.

2. If it was PHP here are the settings to look at:
/etc/php.ini
max_execution_time = 120
max_input_time = 300
memory_limit = 2048M

PHP is usually an issue when there are a lot of ports not a small number of ports. Your settings are determined by the number fo hosts/services you are using.

Re: Nagios XI Network Wizard and Apache URI too long

Posted: Tue Dec 23, 2014 12:04 pm
by mikew
Just and update:
All metacharacters removed and switch wizard fails still.

* removed switch that was installed previously with older switch wizard
* now the same that worked before will not install

Looks like an issue with the switch wizard as looking at the mrtg.cfg and the individual files in conf.d they do not show any difference.

Wizard which was failing was 2.1.2 on an 2014R2.0 XI. So the latest is 2.1.5 so you may want to upgrade...I will confirm once we get this fixed.

Just confirmed 2.1.5 fixes the problem.

Re: Nagios XI Network Wizard and Apache URI too long

Posted: Tue Dec 23, 2014 3:02 pm
by cmerchant
Would you like us to close the thread?

Re: Nagios XI Network Wizard and Apache URI too long

Posted: Wed Dec 24, 2014 8:49 am
by brdr
Yes please close. Thanks.

Thanks mikew!