Page 1 of 1

Network Switch Router Wizard Bug - related to CaSe

Posted: Sun Jul 21, 2013 7:50 pm
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.

Re: Network Switch Router Wizard Bug - related to CaSe

Posted: Mon Jul 22, 2013 10:09 am
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

Re: Network Switch Router Wizard Bug - related to CaSe

Posted: Mon Jul 22, 2013 10:46 am
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!

Re: Network Switch Router Wizard Bug - related to CaSe

Posted: Mon Jul 22, 2013 9:51 pm
by Box293
No problems :D

The updated wizard fixed the problem, works a treat.

Re: Network Switch Router Wizard Bug - related to CaSe

Posted: Tue Jul 23, 2013 9:57 am
by lmiltchev
Thanks for the feedback, Troy!