Last active
May 6, 2021 09:19
-
-
Save sjoegren/6f83e958f3e6330d757b8bbaea26d37d to your computer and use it in GitHub Desktop.
OP5 Monitor 8.3.0 - Temporarily mitigate hostname-number-name-notification-problem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/notify.pl b/notify.pl | |
index 3e7d971..7a5d26b 100755 | |
--- a/notify.pl | |
+++ b/notify.pl | |
@@ -407,7 +407,9 @@ for($i=0; $i<=$#ARGV; $i++) { | |
# this is a free form variable, so register it | |
$k = $1; | |
$v = $2; | |
- if($v && $v =~ /^\d*$/ && $v > 1000000000) { | |
+ # Temporary workaround for MON-12704 | |
+ #if($v && $v =~ /^\d*$/ && $v > 1000000000) { | |
+ if($v && $v =~ /^16\d{8}$/) { | |
# number past the unix billenia. Assume timestamp and translate | |
($sec, $min, $hour, $mday, $month, $year, $wday, $yday, $is_dst) = localtime($v); | |
$v = sprintf("%4d-%02d-%02d %02d:%02d:%02d",$year+1900,$month+1,$mday,$hour,$min,$sec); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment