diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-20 15:30:12 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-20 15:30:12 +0000 |
commit | 04321b103890b2d8e2600bce64aad4759baf774a (patch) | |
tree | c7eb0508e1ffd2b8a7aca8febac0fee2b20d31fd /lib | |
parent | e43a6e6d622eec4b97d20ca4c16c4b8d358fb1f3 (diff) |
Alert subjects are either hostname / IP / URL. Nothign else.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/custodian/alerter.rb | 15 |
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 = "" |