Network Switch Router Wizard Bug - related to CaSe

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Network Switch Router Wizard Bug - related to CaSe

Post by Box293 »

I've discovered a bug in the Network Switch / Router Wizard.

Basically, MRTG always creates files in /var/lib/mrtg/ as lower case. When running the wizard, if you used a DNS address name that had upper case letters, when the bandwidth services are created, the $ARG1$ value is populated as it is typed in the wizard, however the .rrd file will always be in lowercase.

The resulting error for the service will be "/var/lib/mrtg/iNS04_3.rrd does not exist.".

Let me explain in more detail.
  • I run the Network Switch / Router Wizard
    In the Switch/Router Address field I type in iNS04
    I complete the wizard, selecting the ports that I want to monitor bandwidth for
    The mrtg file is populated with the switch address iNS04 <--- notice the case is still the same
    The bandwidth service definition created for the ports populate the $ARG1$ field with iNS04_3.rrd <--- notice the case is still the same
    When I go and look in /var/lib/mrtg/ the file exists, but in lower case ins04_3.rrd <--- notice the case is all lower
    The resulting error for the service will be "/var/lib/mrtg/iNS04_3.rrd does not exist."
    If I go and update the $ARG1$ field in the service definitions to lower case, everything starts working OK
I have two possible solutions:
1) When the wizard creates the service definitions, the $ARG1$ field should be populated in lower case
2) Update the script check_rrdtraf so the value abtained from $ARG1$ is converted to lowercase (the -f argument)

I discovered this in version 1.3 of the Wizard.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Network Switch Router Wizard Bug - related to CaSe

Post by sreinhardt »

Nice catch, I will throw this up onto tracker and assign our maintainer of that wizard.

Edit: Here is a link to your bug submission. http://tracker.nagios.com/view.php?id=424
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Network Switch Router Wizard Bug - related to CaSe

Post by nscott »

I went the route of adjusting the lower case in the wizard rather than the plugin for maintenance reasons. I have attached it to this post. Please let me know if it solves the issue. Thanks for bringing it to our attention Box!
You do not have the required permissions to view the files attached to this post.
Nicholas Scott
Former Nagios employee
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Network Switch Router Wizard Bug - related to CaSe

Post by Box293 »

No problems :D

The updated wizard fixed the problem, works a treat.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Network Switch Router Wizard Bug - related to CaSe

Post by lmiltchev »

Thanks for the feedback, Troy!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked