Nagios XI Network Wizard and Apache URI too long

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

Nagios XI Network Wizard and Apache URI too long

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios XI Network Wizard and Apache URI too long

Post 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.
Former Nagios employee
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

Re: Nagios XI Network Wizard and Apache URI too long

Post 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.
User avatar
mikew
Posts: 243
Joined: Sun Feb 05, 2012 7:05 pm

Re: Nagios XI Network Wizard and Apache URI too long

Post 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.
Mike Weber

Nagios Training/Consulting
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios XI Network Wizard and Apache URI too long

Post 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 '#'
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
mikew
Posts: 243
Joined: Sun Feb 05, 2012 7:05 pm

Re: Nagios XI Network Wizard and Apache URI too long

Post 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.
Mike Weber

Nagios Training/Consulting
User avatar
mikew
Posts: 243
Joined: Sun Feb 05, 2012 7:05 pm

Re: Nagios XI Network Wizard and Apache URI too long

Post 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.
Mike Weber

Nagios Training/Consulting
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Nagios XI Network Wizard and Apache URI too long

Post by cmerchant »

Would you like us to close the thread?
brdr
Posts: 312
Joined: Mon Jun 02, 2014 12:49 pm

Re: Nagios XI Network Wizard and Apache URI too long

Post by brdr »

Yes please close. Thanks.

Thanks mikew!
Locked