diff --git a/src/includes/functions.inc.php b/src/includes/functions.inc.php
index e3ea0e54..4889c73d 100644
--- a/src/includes/functions.inc.php
+++ b/src/includes/functions.inc.php
@@ -330,7 +330,12 @@ function psm_parse_msg($status, $type, $vars, $combi = false) {
if (!$message) {
return $message;
}
+
$vars['date'] = date('Y-m-d H:i:s');
+
+ // merge the constants into the $vars so we can do a %LOOKUP% from language packs
+ $constants = get_defined_constants(true);
+ array_merge($vars, $constants['user']);
foreach ($vars as $k => $v) {
$message = str_replace('%'.strtoupper($k).'%', $v, $message);
diff --git a/src/lang/en_US.lang.php b/src/lang/en_US.lang.php
index 34c26a31..db118c44 100644
--- a/src/lang/en_US.lang.php
+++ b/src/lang/en_US.lang.php
@@ -342,16 +342,30 @@ $sm_lang = array(
'notifications' => array(
'off_sms' => 'Server \'%LABEL%\' is DOWN: ip=%IP%, port=%PORT%. Error=%ERROR%',
'off_email_subject' => 'IMPORTANT: Server \'%LABEL%\' is DOWN',
- 'off_email_body' => "Failed to connect to the following server:
Server: %LABEL%
IP: %IP%
Port: %PORT%
Error: %ERROR%
Date: %DATE%",
+ 'off_email_body' => "Failed to connect to the following server:
Server: %LABEL%
IP: %IP%
Port: %PORT%
Error: %ERROR%
Date: %DATE%
Source: %PSM_BASE_URL%",
'off_pushover_title' => 'Server \'%LABEL%\' is DOWN',
- 'off_pushover_message' => "Failed to connect to the following server:
Server: %LABEL%
IP: %IP%
Port: %PORT%
Error: %ERROR%
Date: %DATE%",
- 'off_telegram_message' => "Failed to connect to the following server:
Server: %LABEL%
IP: %IP%
Port: %PORT%
Error: %ERROR%
Date: %DATE%",
+ 'off_pushover_message' => "Failed to connect to the following server:
Server: %LABEL%
IP: %IP%
Port: %PORT%
Error: %ERROR%
Date: %DATE%
Source: %PSM_BASE_URL%",
+ 'off_telegram_message' => "Failed to connect to the following server:
Server: %LABEL%
IP: %IP%
Port: %PORT%
Error: %ERROR%
Date: %DATE%
Source: %PSM_BASE_URL%",
'on_sms' => 'Server \'%LABEL%\' is RUNNING: ip=%IP%, port=%PORT%, it was down for %LAST_OFFLINE_DURATION%',
'on_email_subject' => 'IMPORTANT: Server \'%LABEL%\' is RUNNING',
- 'on_email_body' => "Server '%LABEL%' is running again, it was down for %LAST_OFFLINE_DURATION%:
Server: %LABEL%
IP: %IP%
Port: %PORT%
Date: %DATE%",
+ 'on_email_body' => "Server '%LABEL%' is running again, it was down for %LAST_OFFLINE_DURATION%:
Server: %LABEL%
IP: %IP%
Port: %PORT%
Date: %DATE%
Source: %PSM_BASE_URL%",
'on_pushover_title' => 'Server \'%LABEL%\' is RUNNING',
- 'on_pushover_message' => 'Server \'%LABEL%\' is running again, it was down for %LAST_OFFLINE_DURATION%:
Server: %LABEL%
IP: %IP%
Port: %PORT%
Date: %DATE%',
- 'on_telegram_message' => 'Server \'%LABEL%\' is running again, it was down for :
Server: %LABEL%
IP: %IP%
Port: %PORT%
Downtime: %LAST_OFFLINE_DURATION%
Date: %DATE%',
+ 'on_pushover_message' => 'Server \'%LABEL%\' is running again, it was down for %LAST_OFFLINE_DURATION%:
Server: %LABEL%
IP: %IP%
Port: %PORT%
Date: %DATE%
Source: %PSM_BASE_URL%',
+ 'on_telegram_message' => 'Server \'%LABEL%\' is running again, it was down for %LAST_OFFLINE_DURATION%:
Server: %LABEL%
IP: %IP%
Port: %PORT%
Date: %DATE%
Source: %PSM_BASE_URL%',
+ ),
+ 'notifications' => array(
+ 'off_sms' => 'Server \'%LABEL%\' is DOWN: ip=%IP%, port=%PORT%. Error=%ERROR%',
+ 'off_email_subject' => 'IMPORTANT: Server \'%LABEL%\' is DOWN',
+ 'off_email_body' => "Failed to connect to the following server:
Server: %LABEL%
IP: %IP%
Port: %PORT%
Error: %ERROR%
Date: %DATE%
Source: %PSM_BASE_URL%",
+ 'off_pushover_title' => 'Server \'%LABEL%\' is DOWN',
+ 'off_pushover_message' => "Failed to connect to the following server:
Server: %LABEL%
IP: %IP%
Port: %PORT%
Error: %ERROR%
Date: %DATE%
Source: %PSM_BASE_URL%",
+ 'off_telegram_message' => "Failed to connect to the following server:
Server: %LABEL%
IP: %IP%
Port: %PORT%
Error: %ERROR%
Date: %DATE%
Source: %PSM_BASE_URL%",
+ 'on_sms' => 'Server \'%LABEL%\' is RUNNING: ip=%IP%, port=%PORT%, it was down for %LAST_OFFLINE_DURATION%',
+ 'on_email_subject' => 'IMPORTANT: Server \'%LABEL%\' is RUNNING',
+ 'on_email_body' => "Server '%LABEL%' is running again, it was down for %LAST_OFFLINE_DURATION%:
Server: %LABEL%
IP: %IP%
Port: %PORT%
Date: %DATE%
Source: %PSM_BASE_URL%",
+ 'on_pushover_title' => 'Server \'%LABEL%\' is RUNNING',
+ 'on_pushover_message' => 'Server \'%LABEL%\' is running again, it was down for %LAST_OFFLINE_DURATION%:
Server: %LABEL%
IP: %IP%
Port: %PORT%
Date: %DATE%
Source: %PSM_BASE_URL%',
+ 'on_telegram_message' => 'Server \'%LABEL%\' is running again, it was down for :
Server: %LABEL%
IP: %IP%
Port: %PORT%
Downtime: %LAST_OFFLINE_DURATION%
Date: %DATE%
Source: %PSM_BASE_URL%',
'combi_off_email_message' => "