I have customized the wizarddemo and uploaded to our Nagios XI and it works well. My question is how do I modify the wizarddemo a second time for a new custom wizard? I have changed the wizard name ($wizard_name) but my changes to the wizarddemo.inc.php only update the existing wizard, not create a new wizard.
What do I change in the code to make a new configuration wizard without overwriting the existing configuration wizard? Thanks
Custom Configuration Wizards
Custom Configuration Wizards
Last edited by dwhitfield on Tue Jan 03, 2017 1:22 pm, edited 1 time in total.
Reason: marking with green check mark
Reason: marking with green check mark
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Custom Configuration Wizards
Have you looked at https://assets.nagios.com/downloads/nag ... ios-XI.pdf ?
If so, is there a particular place that seems to be tripping you up?
What version of XI are you running? 5.4 was recently released with some important security fixes.
If so, is there a particular place that seems to be tripping you up?
What version of XI are you running? 5.4 was recently released with some important security fixes.
Re: Custom Configuration Wizards
The following section from the wizarddemo.inc.php file would have to be edited.
But, if you search the PHP file for the following string
Those would have to change as well.
If you are still having problems after the changes, can you post your php file so we can view it and see if we can replicate the issue?
Code: Select all
function wizarddemo_configwizard_init(){
//name / ID for config wizard
$name="wizarddemo";
//relevant info for wizard
$args=array(
CONFIGWIZARD_NAME => $name,
CONFIGWIZARD_TYPE => CONFIGWIZARD_TYPE_MONITORING,
CONFIGWIZARD_DESCRIPTION => "This is a developer demo wizard that creates checks for severe weather alerts",
CONFIGWIZARD_DISPLAYTITLE => "Weather Alerts",
CONFIGWIZARD_FUNCTION => "wizarddemo_configwizard_func",
CONFIGWIZARD_PREVIEWIMAGE => "wizarddemo.jpg",
CONFIGWIZARD_VERSION => "1.0",
CONFIGWIZARD_DATE => "2011-06-16",
CONFIGWIZARD_COPYRIGHT => "Copyright © 2008-2010 Nagios Enterprises, LLC.",
CONFIGWIZARD_AUTHOR => "Nagios Enterprises, LLC",
);
//register wizard with XI
register_configwizard($name,$args);
}Code: Select all
wizarddemoIf you are still having problems after the changes, can you post your php file so we can view it and see if we can replicate the issue?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Custom Configuration Wizards
Currently running version 5.3.3 I will upgrade and try it again. I get tripped up when I change the .php file reflecting a new custom script, but the upload does not create a new custom script instead it modifies the previous custom script I had uploaded. My first custom script works perfectly.dwhitfield wrote:Have you looked at https://assets.nagios.com/downloads/nag ... ios-XI.pdf ?
If so, is there a particular place that seems to be tripping you up?
What version of XI are you running? 5.4 was recently released with some important security fixes.
Re: Custom Configuration Wizards
I have attached screenshots in a word document, this is after upgrading to 5.4tgriep wrote:The following section from the wizarddemo.inc.php file would have to be edited.But, if you search the PHP file for the following stringCode: Select all
function wizarddemo_configwizard_init(){ //name / ID for config wizard $name="wizarddemo"; //relevant info for wizard $args=array( CONFIGWIZARD_NAME => $name, CONFIGWIZARD_TYPE => CONFIGWIZARD_TYPE_MONITORING, CONFIGWIZARD_DESCRIPTION => "This is a developer demo wizard that creates checks for severe weather alerts", CONFIGWIZARD_DISPLAYTITLE => "Weather Alerts", CONFIGWIZARD_FUNCTION => "wizarddemo_configwizard_func", CONFIGWIZARD_PREVIEWIMAGE => "wizarddemo.jpg", CONFIGWIZARD_VERSION => "1.0", CONFIGWIZARD_DATE => "2011-06-16", CONFIGWIZARD_COPYRIGHT => "Copyright © 2008-2010 Nagios Enterprises, LLC.", CONFIGWIZARD_AUTHOR => "Nagios Enterprises, LLC", ); //register wizard with XI register_configwizard($name,$args); }Those would have to change as well.Code: Select all
wizarddemo
If you are still having problems after the changes, can you post your php file so we can view it and see if we can replicate the issue?
You do not have the required permissions to view the files attached to this post.
Re: Custom Configuration Wizards
Did you rename the php file and the folder structure in the zip file to a different name?
It could be that the upload over writes the existing files unless those are changed.
It could be that the upload over writes the existing files unless those are changed.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Custom Configuration Wizards
Solved, Awesome, that did the trick. Renamed the containing folder->tempdemo and the .php ->tempdemo.inc.php. The .zip file then became tempdemo.zip Thanks alltgriep wrote:Did you rename the php file and the folder structure in the zip file to a different name?
It could be that the upload over writes the existing files unless those are changed.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Custom Configuration Wizards
Glad to hear it is resolved. I am going to lock the thread. Please feel free to post again if you have you another issue. Thank you for using the Nagios forums!