gltail 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data.tar.gz.sig CHANGED
Binary file
@@ -1,3 +1,10 @@
1
+ == 0.1.7 / 2008-07-13
2
+
3
+ * Handle empty host in URLs logged by Rails (Steve Purcell <steve@sanityinc.com>)
4
+ * Local File source (George Swinnerton)
5
+ * PostgreSQL Syslog support (Lionel Bouton)
6
+ * Cisco ASA parser (Jeff Bryner <jeff@jeffbryner.com>)
7
+
1
8
  == 0.1.6 / 2008-05-31
2
9
 
3
10
  * Use net-ssh version < 1.2 when loading gem
@@ -15,6 +15,12 @@ servers:
15
15
  files: /var/www/apps/funapp/current/log/production.log
16
16
  parser: rails
17
17
  color: 0.2, 0.2, 1.0, 1.0
18
+ dev:
19
+ host: clockingit.com
20
+ source: local
21
+ files: /var/www/clockingit/logs/production.log
22
+ parser: rails
23
+ color: 0.2, 0.2, 1.0, 1.0
18
24
  config:
19
25
  dimensions: 1200x600
20
26
  min_blob_size: 0.004
@@ -61,6 +67,23 @@ config:
61
67
  database:
62
68
  order: 9
63
69
  size: 10
70
+ firewall:
71
+ order: 10
72
+ size: 15
73
+ action:
74
+ order: 11
75
+ size: 15
76
+ auto_clean: false
77
+ show: total
78
+ sourceinterface:
79
+ order: 12
80
+ size: 15
81
+ sourcehost:
82
+ order: 13
83
+ size: 15
84
+ sourceport:
85
+ order: 14
86
+ size: 15
64
87
 
65
88
  right_column:
66
89
  size: 25
@@ -96,6 +119,23 @@ config:
96
119
  warnings:
97
120
  order: 8
98
121
  size: 5
122
+ destinationinterface:
123
+ order: 9
124
+ size: 15
125
+ ipprotocol:
126
+ order: 10
127
+ size: 15
128
+ destinationhost:
129
+ order: 11
130
+ size: 15
131
+ destinationport:
132
+ order: 12
133
+ size: 15
134
+ info:
135
+ order: 13
136
+ size: 15
137
+ auto_clean: false
138
+ show: total
99
139
  resolver:
100
140
  reverse_ip_lookups: true
101
141
  reverse_timeout: 0.5
@@ -5,7 +5,7 @@
5
5
  #
6
6
 
7
7
  module GlTail
8
- VERSION = '0.1.6'
8
+ VERSION = '0.1.7'
9
9
  end
10
10
 
11
11
  begin
@@ -43,7 +43,16 @@ begin
43
43
  rescue LoadError
44
44
  puts "Missing gem net-ssh."
45
45
  puts "Ubuntu:"
46
- puts " sudo gem install -y net-ssh -r"
46
+ puts " sudo gem install -y net-ssh -v 1.1.4 -r"
47
+ exit
48
+ end
49
+
50
+ begin
51
+ require 'file/tail'
52
+ rescue LoadError
53
+ puts "Missing gem file-tail."
54
+ puts "Ubuntu:"
55
+ puts " sudo gem install -y file-tail -r"
47
56
  exit
48
57
  end
49
58
 
@@ -59,6 +68,7 @@ require 'gl_tail/config/yaml_parser'
59
68
  # future options: JMS queue, spread.org, local tail, etc
60
69
  require 'gl_tail/sources/base'
61
70
  require 'gl_tail/sources/ssh'
71
+ require 'gl_tail/sources/local'
62
72
 
63
73
  %w( engine activity block item element parser resolver blob_store font_store).each {|f| require "gl_tail/#{f}" }
64
74
 
@@ -35,11 +35,18 @@ module GlTail
35
35
 
36
36
  self.yaml['servers'].each do |server|
37
37
 
38
- src = GlTail::Source::SSH.new(@config)
38
+ name = server.shift
39
+ data = server.shift
39
40
 
40
- src.name = server.shift
41
+ if data['source'] && data['source'].downcase == 'local'
42
+ src = GlTail::Source::Local.new(@config)
43
+ else
44
+ src = GlTail::Source::SSH.new(@config)
45
+ end
46
+
47
+ src.name = name
41
48
 
42
- apply_values(src, server.shift)
49
+ apply_values(src, data)
43
50
 
44
51
  @config.sources << src
45
52
  end
@@ -18,10 +18,15 @@ class PostgreSQLParser < Parser
18
18
 
19
19
  _, database, datetime, activity, description = /^\[(.*), (.* .* .*)\] LOG: ([a-zA-Z0-9\s]*): (.*)/.match(line).to_a
20
20
 
21
+ unless _
22
+ _, database, datetime, activity, description = /postgres\[\d+\]: \[\d+-\d+\] \[(.*), (.* .* .*)\] LOG: ([a-zA-Z0-9\s]*): (.*)/.match(line).to_a
23
+ syslog = true if _
24
+ end
25
+
21
26
  if database
22
27
  add_activity(:block => 'database', :name => database, :size => 0.2)
23
28
  else
24
- _, datetime, activity, description = /^(.* .* .*) LOG: ([a-zA-Z0-9\s]*): (.*)/.match(line).to_a
29
+ _, datetime, activity, description = /(.* .* .*) LOG: ([a-zA-Z0-9\s]*): (.*)/.match(line).to_a
25
30
  end
26
31
 
27
32
  if activity
@@ -11,7 +11,7 @@ class RailsParser < Parser
11
11
  _, ms, url = /^Completed in ([\d.]+) .* \[([^\]]+)\]/.match(line).to_a
12
12
 
13
13
  if url
14
- _, host, url = /^http[s]?:\/\/([^\/]+)(.*)/.match(url).to_a
14
+ _, host, url = /^http[s]?:\/\/([^\/]*)(.*)/.match(url).to_a
15
15
 
16
16
  add_activity(:block => 'sites', :name => host, :size => ms.to_f) # Size of activity based on request time.
17
17
  add_activity(:block => 'urls', :name => HttpHelper.generalize_url(url), :size => ms.to_f)
@@ -3,10 +3,26 @@ module GlTail
3
3
  module Source
4
4
 
5
5
  class Local < Base
6
- config_attribute :command, "The Command to run"
6
+ config_attribute :source, "The type of Source"
7
+ config_attribute :host
7
8
  config_attribute :files, "The files to tail", :deprecated => "Should be embedded in the :command"
8
9
 
9
- # TODO: code to run comand locally and parse streams
10
+ def init
11
+ @log = File.open(files)
12
+ @log.extend(File::Tail)
13
+ @log.max_interval = 5
14
+ @log.return_if_eof = true
15
+ end
16
+
17
+ def process
18
+ @log.tail(1) { |line|
19
+ parser.parse(line)
20
+ }
21
+ end
22
+
23
+ def update
24
+ end
25
+
10
26
  end
11
27
  end
12
28
  end
@@ -4,6 +4,7 @@ module GlTail
4
4
  module Source
5
5
 
6
6
  class SSH < Base
7
+ config_attribute :source, "The type of Source"
7
8
  config_attribute :command, "The Command to run"
8
9
  config_attribute :files, "The files to tail", :deprecated => "Should be embedded in the :command"
9
10
  config_attribute :host, "The Host to connect to"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gltail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erlend Simonsen
@@ -29,11 +29,12 @@ cert_chain:
29
29
  /UfNqVgtDGy57Xw9DBNRbUm92FVILwpudQs3SX1z2Gik08RrKReELwpRciY=
30
30
  -----END CERTIFICATE-----
31
31
 
32
- date: 2008-05-31 00:00:00 +02:00
32
+ date: 2008-07-13 00:00:00 +02:00
33
33
  default_executable:
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: ruby-opengl
37
+ type: :runtime
37
38
  version_requirement:
38
39
  version_requirements: !ruby/object:Gem::Requirement
39
40
  requirements:
@@ -43,6 +44,7 @@ dependencies:
43
44
  version:
44
45
  - !ruby/object:Gem::Dependency
45
46
  name: net-ssh
47
+ type: :runtime
46
48
  version_requirement:
47
49
  version_requirements: !ruby/object:Gem::Requirement
48
50
  requirements:
@@ -52,12 +54,13 @@ dependencies:
52
54
  version:
53
55
  - !ruby/object:Gem::Dependency
54
56
  name: hoe
57
+ type: :development
55
58
  version_requirement:
56
59
  version_requirements: !ruby/object:Gem::Requirement
57
60
  requirements:
58
61
  - - ">="
59
62
  - !ruby/object:Gem::Version
60
- version: 1.5.1
63
+ version: 1.7.0
61
64
  version:
62
65
  description: "== FEATURES: * Real-Time OpenGL view * Multiple logfiles on multiple servers * Configurable layout * Multiple logfile parsers (Apache Combined, Rails, IIS, Postfix/spamd/clamd, Nginx, Squid, PostgreSQL, PureFTPD, MySQL, TShark, qmail/vmpop3d) * Custom events * Show rate, total or average * If you can 'tail' it, you can visualize it * Written in Ruby using net-ssh & libopengl-ruby * Free! == RUNNING: gl_tail --help gl_tail --new gl_tail.yaml gl_tail You can press 'f' while running to toggle the attempted frames per second. Or 'b' to change default blob type, and space to toggle bouncing. == REQUIREMENTS: * rubygems 0.9.4 * ruby-opengl 0.40.1 * net-ssh 1.1.2 * opengl/ruby development packages (ruby1.8-dev libgl1-mesa-dev libglu1-mesa-dev libglut3-dev)"
63
66
  email: mr@fudgie.org
@@ -133,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
136
  requirements: []
134
137
 
135
138
  rubyforge_project: gltail
136
- rubygems_version: 1.1.1
139
+ rubygems_version: 1.2.0
137
140
  signing_key:
138
141
  specification_version: 2
139
142
  summary: View real-time data and statistics from any logfile on any server with SSH, in an intuitive and entertaining way.
metadata.gz.sig CHANGED
Binary file