diff --git a/sysutils/monit/src/opnsense/mvc/app/models/OPNsense/Monit/Monit.xml b/sysutils/monit/src/opnsense/mvc/app/models/OPNsense/Monit/Monit.xml
index 8f6bfebf3..4735550f1 100644
--- a/sysutils/monit/src/opnsense/mvc/app/models/OPNsense/Monit/Monit.xml
+++ b/sysutils/monit/src/opnsense/mvc/app/models/OPNsense/Monit/Monit.xml
@@ -118,7 +118,7 @@
Y
- /^([0-9a-zA-Z\._\-]){1,255}$/u
+ /^([0-9a-zA-Z\._\-\$]){1,255}$/u
Should be a string between 1 and 255 characters. Allowed characters are letters and numbers as well as underscore, minus and dot.
diff --git a/sysutils/monit/src/opnsense/scripts/OPNsense/Monit/post-install.php b/sysutils/monit/src/opnsense/scripts/OPNsense/Monit/post-install.php
index 7ee2100b9..f0d11aa2a 100755
--- a/sysutils/monit/src/opnsense/scripts/OPNsense/Monit/post-install.php
+++ b/sysutils/monit/src/opnsense/scripts/OPNsense/Monit/post-install.php
@@ -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" => ""
);