Page 2 of 2
Re: Config Wizard issue
Posted: Mon Apr 14, 2014 10:53 am
by kyle.parker
I have narrowed it down to the fact that I am not passing the array correctly. Maybe I just don't understand the serialize() and unserialize() commands.
Re: Config Wizard issue
Posted: Mon Apr 14, 2014 4:21 pm
by abrist
Has the code changed? Should we be testing/commenting on the previous code post, or do you want to post your newest version?
Re: Config Wizard issue
Posted: Mon Apr 14, 2014 7:48 pm
by kyle.parker
I have changed my code quite a bit, I took the network switch/router config wizard and modified it. It is still using MRTG to scan a card, as I couldn't really figure out the SNMP walk aspect, but not using MRTG to monitor or add rrd files to the MRTG config file. Of course this completely removes any BW history on a port so you can really only look back 24 hours, will be my next task.
I however at the end of my shift, with much frustration, got the array passing to my service check section. Which makes my custom wizard almost complete. I just have to clean up the code and debug.
I gave up on the serialize/unserialize idea as I couldn't get it to pass between variables. I started looking into other methods and used the following code for passing the array:
Code: Select all
$_SESSION['calix]['linespeeds'] = $linespeeds;
and once I got to the my last step where it starts checking for services to add I used
Code: Select all
$linespeeds = $_SESSON['calix']['linespeeds'];
at least I think that is what I did, I spent almost my entire 8 hour shift attempting this. I do get the feeling that passing a variable this way will cause it to potentially get over written if you go back and forth between the steps, but I will have to verify with some testing tomorrow.
I also think our company pays for a support contract, I will have to double check as I suppose if we have a contract number I am supposed to be posting in the customer support thread.
Re: Config Wizard issue
Posted: Tue Apr 15, 2014 9:49 am
by abrist
kyle.parker wrote:
I also think our company pays for a support contract, I will have to double check as I suppose if we have a contract number I am supposed to be posting in the customer support thread.
"supposed" is a strong word

You are welcome to post in either general or customer. Also, if you have a support contract, you could pursue this through the ticket system which will most likely get you quicker responses more frequently than the forums.
Re: Config Wizard issue
Posted: Wed Apr 16, 2014 1:05 am
by Box293
Hi Kyle,
I suggest looking at the Box293 Demonstration Wizard.
http://exchange.nagios.org/directory/Ad ... rd/details
This is a wizard I specifically wrote that demonstrates how wizards work including how to pass values back and forth between the different steps. It should make some stuff clearer.
FYI the $_SESSION method is much easier than the serialization stuff.
Re: Config Wizard issue
Posted: Wed Apr 16, 2014 12:19 pm
by lmiltchev
@Box293
Thanks, Troy!
Re: Config Wizard issue
Posted: Wed Apr 23, 2014 2:01 pm
by kyle.parker
If anybody was curious on an update from this I essentially re-wrote my config wizard again. This time scrapping any reminents of MRTG for scanning or monitoring, only the performance graphs use MRTG, and I am now using SNMP walks to obtain the data I want. It seems to run smoother, works without bugs (as my first version seemed to fail if there were more than 10 ports it had to read) and over all I am happy. Thanks everybody for your help. You guys can go ahead and lock this thread if you like.