sysutils/monit: set variable $HOST as system name for proper sync to cluster nodes

This commit is contained in:
Frank Brendel
2017-06-07 16:23:46 +02:00
committed by Franco Fichtner
parent 7a386c6198
commit 25a88003a6
2 changed files with 2 additions and 6 deletions
@@ -118,7 +118,7 @@
</enabled>
<name type="TextField">
<Required>Y</Required>
<mask>/^([0-9a-zA-Z\._\-]){1,255}$/u</mask>
<mask>/^([0-9a-zA-Z\._\-\$]){1,255}$/u</mask>
<ValidationMessage>Should be a string between 1 and 255 characters. Allowed characters are letters and numbers as well as underscore, minus and dot.</ValidationMessage>
</name>
<type type="OptionField">
@@ -54,10 +54,6 @@ $LoadAvg1 = $nCPU[0] * 2;
$LoadAvg5 = $nCPU[0] + ($nCPU[0] / 2);
$LoadAvg15 = $nCPU[0];
// get FQDN
$hostName = $cfgObj->system->hostname;
$domainName = $cfgObj->system->domain;
// inherit SMTP settings from System->Settings->Notifications
$generalSettings = array();
if (!empty($cfgObj->notifications->smtp->ipaddress)) {
@@ -101,7 +97,7 @@ $defaultTests = array(
// define system service
$systemService = array(
"enabled" => 1,
"name" => $hostName . "." . $domainName,
"name" => '$HOST',
"type" => "system",
"tests" => ""
);