Page 1 of 1

Apply configuration from tools

Posted: Thu Jul 30, 2020 6:21 am
by chrtap
Hello,

We use a "Common Tools" that run a script how modify SMS phone number for a special contact.
To avoid this modification to be removed by a snapshot rollback, I search a way to "Apply Configuration" from the "Common Tools".

I tried to add "reconfigure_nagios.sh" to my script but it doesn't work because the script is running as apache's user and don't have right to do that.

What can I do ?

Regards.

Re: Apply configuration from tools

Posted: Thu Jul 30, 2020 8:46 am
by scottwilkerson
You should be able to make a call to the following URL in the page that loads in the Common Tools and it will complete an Apply Configuration

Code: Select all

/nagiosxi/includes/components/nagioscorecfg/applyconfig.php?cmd=&continue=

Re: Apply configuration from tools

Posted: Thu Aug 06, 2020 9:28 am
by chrtap
Hello Scott,

Big thanks to you.

I have had some difficulties to find the correct syntax. The originals script is a shell script who generates an HTML page.

Finlay, I make an ifram :

Code: Select all

echo '<iframe title="Snapshot" width=500 height=200 src="/nagiosxi/includes/components/nagioscorecfg/applyconfig.php?cmd=confirm"></iframe>'
Regards
Christian

Re: Apply configuration from tools

Posted: Thu Aug 06, 2020 9:30 am
by scottwilkerson
chrtap wrote:Hello Scott,

Big thanks to you.

I have had some difficulties to find the correct syntax. The originals script is a shell script who generates an HTML page.

Finlay, I make an ifram :

Code: Select all

echo '<iframe title="Snapshot" width=500 height=200 src="/nagiosxi/includes/components/nagioscorecfg/applyconfig.php?cmd=confirm"></iframe>'
Regards
Christian
Great

May we mark this resolved?