From 2e53226ecaa613677007c6b1950d7b3f0b57bf2a Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Tue, 20 Nov 2012 15:30:12 +0000 Subject: Alert subjects are either hostname / IP / URL. Nothign else. --- lib/custodian/alerter.rb | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'lib/custodian') 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,15 +154,10 @@ 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. # @@ -225,17 +220,11 @@ 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. # -- cgit v1.2.1