z2monitor 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,8 +20,8 @@ module Zabbix
20
20
  request = {
21
21
  'method' => 'trigger.get',
22
22
  'params' => {
23
- 'sortfield' => 'priority',
24
- 'sortorder' => 'desc',
23
+ 'sortfield' => ['priority', 'lastchange'],
24
+ 'sortorder' => ['desc', 'desc'],
25
25
  'templated' => '0',
26
26
  'filter' => { 'value' => '1', 'status' => '0' },
27
27
  'expandData' => 'host',
data/lib/z2monitor.rb CHANGED
@@ -96,7 +96,7 @@ module Zabbix
96
96
  cols = `tput cols`.to_i
97
97
  eventlist = self.get_events() #TODO: get_events(max_lines)
98
98
  pretty_output = []
99
- pretty_output << ["Last updated: %8s%#{cols-39}sZ2monitor Dashboard".cyan_on_blue % [Time.now.strftime('%T'),'']] if format != 'full'
99
+ pretty_output << ["Last updated: %8s%#{cols-41}sZ2monitor Dashboard".cyan_on_blue % [Time.now.strftime('%T'),'']] if format != 'full'
100
100
  if eventlist.length != 0
101
101
  max_hostlen = eventlist.each.max { |a,b| a[:hostname].length <=> b[:hostname].length }[:hostname].length
102
102
  max_desclen = eventlist.each.max { |a,b| a[:description].length <=> b[:description].length }[:description].length
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: z2monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-26 00:00:00.000000000 Z
12
+ date: 2012-06-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: colored
16
- requirement: &17341660 !ruby/object:Gem::Requirement
16
+ requirement: &5391600 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *17341660
24
+ version_requirements: *5391600
25
25
  description: A command line interface for viewing alerts from a Zabbix instance (for
26
26
  Zabbix 2.0)
27
27
  email: milkteafuzz@gmail.com