mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
sysutils/monit: set variable $HOST as system name for proper sync to cluster nodes
This commit is contained in:
committed by
Franco Fichtner
parent
7a386c6198
commit
25a88003a6
@@ -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" => ""
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user