summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-20 15:30:12 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-20 15:30:12 +0000
commit04321b103890b2d8e2600bce64aad4759baf774a (patch)
treec7eb0508e1ffd2b8a7aca8febac0fee2b20d31fd
parente43a6e6d622eec4b97d20ca4c16c4b8d358fb1f3 (diff)
Alert subjects are either hostname / IP / URL. Nothign else.
-rw-r--r--lib/custodian/alerter.rb15
1 files changed, 2 insertions, 13 deletions
diff --git a/lib/custodian/alerter.rb b/lib/custodian/alerter.rb
index 72bf37a..086d5b3 100644
--- a/lib/custodian/alerter.rb
+++ b/lib/custodian/alerter.rb
@@ -154,16 +154,11 @@ class Alerter
res = DNSUtil.ip_to_hostname( subject )
if ( res )
- subject = "#{subject} [#{res}]"
+ subject = res
end
end
#
- # Add the test-type to the subject
- #
- subject = "#{subject} #{@details['test_type']}"
-
- #
# Document the hostname if the alert relates to an IP address.
#
resolved = ""
@@ -225,18 +220,12 @@ class Alerter
if ( ( subject =~ /^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)$/ ) ||
( subject =~ /^([0-9a-f:]+)$/ ) )
res = DNSUtil.ip_to_hostname( subject )
-
if ( res )
- subject = "#{subject} [#{res}]"
+ subject = res
end
end
#
- # Add the test-type to the subject
- #
- subject = "#{subject} #{@details['test_type']}"
-
- #
# Document the hostname if the alert relates to an IP address.
#
resolved = ""