malsh 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ba6b10739e65fa9b65e4cd60cd399ccdc4fc688d69bbaca61f0d032e9fd2c3d
4
- data.tar.gz: 521295added941774b5ba85b0a2c3777747569552f5c94b6926259a050c812c2
3
+ metadata.gz: ac84ac7dfd01868083d18c3e6be4fecba347d7a748e96033bc49e6b2d0b25c35
4
+ data.tar.gz: 88e91d32de344e8416c57d0e86bb8983a67db9c46d9e4639ff6402648694f238
5
5
  SHA512:
6
- metadata.gz: '050824909ff8d3d653b0e7a864b403002560386d217f02de354a6829d38890f439c2950bc6ac443bde5165e1ae0aed03097d91e604368af0acafc8f9158a417a'
7
- data.tar.gz: 77b19f42a100da11c7e29c79f00a438bbe6488817f478be5b0fa9363cabab365415e810dc0d98ce0b310d033b10f563ad92b22e0d26e8416a5a86b24112711d6
6
+ metadata.gz: 11cab119d65d791bfa156646c3891795af92125f62095694e9edbcfd53efc16a403505876d6941aaa1228d310cecdb888a437f904e879a4ea36f3e1760c8ee03
7
+ data.tar.gz: 15b728424b65bb9080773210f4737e45416a7b00f6cc2c3036060df061115d6ee489801f79859788f87fcbec8007566a920d3b8103637fafdad2ed6bfbe63b98
@@ -10,11 +10,10 @@ module Malsh::Notification
10
10
  def self.notify_alert(subject, alerts)
11
11
  puts "#{subject}: "
12
12
  alerts.each do |alert|
13
- title = case alert.type
14
- when 'external'
15
- alert.monitor.name
16
- else
13
+ title = if Malsh.alert_has_host?(alert)
17
14
  alert.host.name
15
+ else
16
+ alert.monitor.name
18
17
  end
19
18
  puts "#{title}: #{alert.message}"
20
19
  end
data/lib/malsh/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Malsh
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: malsh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - kazuhiko yamahsita
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-10 00:00:00.000000000 Z
11
+ date: 2021-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor