Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Commit

Permalink
Default command is restart and not reload ...
Browse files Browse the repository at this point in the history
  • Loading branch information
mohierf committed Dec 10, 2015
1 parent 3bf5816 commit 74754f6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion front/restartshinken.form.php
Expand Up @@ -47,7 +47,7 @@
$pmShinkenwebservice = new PluginMonitoringShinkenwebservice();
if (isset($_GET["tag"])) {
Toolbox::logInFile("pm-restart", "call sendRestartArbiter, tag: " . $_GET["tag"] . "\n");
$pmShinkenwebservice->sendRestartArbiter(1, $_GET["tag"], isset($_GET["action"]) ? $_GET["action"] : 'reload');
$pmShinkenwebservice->sendRestartArbiter(1, $_GET["tag"], isset($_GET["action"]) ? $_GET["action"] : 'restart');
} else {
Toolbox::logInFile("pm-restart", "call sendRestartArbiter, no tag\n");
$pmShinkenwebservice->sendRestartArbiter(1);
Expand Down
1 change: 0 additions & 1 deletion inc/message.class.php
Expand Up @@ -220,7 +220,6 @@ class='msgboxmonit msgboxmonit-grey' id='updated_elements'>";
// Try to restart Shinken via webservice
$pmShinkenwebservice = new PluginMonitoringShinkenwebservice();
$pmShinkenwebservice->sendRestartArbiter();
Toolbox::logInFile("pm-restart", "sendRestartArbiter, command : $command, tag: $tag, force: $force\n");
$input .= __('Shinken is restarted automatically', 'monitoring');
//$input .= __('Restart Shinken to reload this new configuration', 'monitoring');
}
Expand Down
4 changes: 3 additions & 1 deletion inc/shinkenwebservice.class.php
Expand Up @@ -142,12 +142,14 @@ function sendDowntime($host_id=-1, $service_id=-1, $author= '', $comment='', $fl
}


function sendRestartArbiter($force=0, $tag=0, $command='reload') {
function sendRestartArbiter($force=0, $tag=0, $command='restart') {

$pmTag = new PluginMonitoringTag();
$pmLog = new PluginMonitoringLog();

Toolbox::logInFile("pm-restart", "sendRestartArbiter, command : $command, tag: $tag, force: $force\n");
// We should specify delay instead of default 20 minutes ...
// if (!$pmLog->isRestartRecent(1200)
if (!$pmLog->isRestartRecent()
|| $force) {
if ($tag > 0) {
Expand Down

0 comments on commit 74754f6

Please sign in to comment.