summaryrefslogtreecommitdiff
path: root/lib
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
commit2e53226ecaa613677007c6b1950d7b3f0b57bf2a (patch)
treec7eb0508e1ffd2b8a7aca8febac0fee2b20d31fd /lib
parent7eed190e05b3bf16b9d27280995649f737dbaa2a (diff)
Alert subjects are either hostname / IP / URL. Nothign else.
Diffstat (limited to 'lib')
-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 = ""