public
Description: Real-time visualization of server traffic, events and statistics with Ruby, SSH and OpenGL
Homepage: http://www.fudgie.org
Clone URL: git://github.com/Fudge/gltail.git
Bump to 0.1.7

* Handle empty host in URLs logged by Rails (Steve Purcell 
<steve@sanityinc.com>)
* Local File source (George Swinnerton)
* PostgreSQL Syslog support (Lionel Bouton)
* Cisco ASA parser (Jeff Bryner <jeff@jeffbryner.com>)
erlends (author)
Sun Jul 13 02:12:03 -0700 2008
commit  8dd1e4835cfc36a0ad330db4cc896ab65e2a4c87
tree    11fccc08089776d0475ca590cee15e7547b3b43f
parent  cc07289b21420deed2e06631836daecb0b33f8f4
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
0
@@ -1,3 +1,32 @@
0
+== 0.1.7 / 2008-07-13
0
+
0
+* Handle empty host in URLs logged by Rails (Steve Purcell <steve@sanityinc.com>)
0
+* Local File source (George Swinnerton)
0
+* PostgreSQL Syslog support (Lionel Bouton)
0
+* Cisco ASA parser (Jeff Bryner <jeff@jeffbryner.com>)
0
+
0
+== 0.1.6 / 2008-05-31
0
+
0
+* Use net-ssh version < 1.2 when loading gem
0
+
0
+== 0.1.5 / 2008-05-19
0
+
0
+* Freeze net-ssh version at 1.1.4
0
+
0
+== 0.1.4 / 2008-04-29
0
+
0
+* Only trap signals on non Windows platforms (Chris Gahan)
0
+
0
+== 0.1.3 / 2008-03-28
0
+
0
+* Render strings as number + text to reuse OpenGL call-lists in more cases.
0
+ Fixes the annoying stuttering every second with more than a trivial amount
0
+ of text.
0
+
0
+== 0.1.2 / 2008-03-04
0
+
0
+* Handle rubygems versions > 0.x
0
+
0
 == 0.1.1 / 2008-02-17
0
 
0
 * Correctly sort Total and Average Blocks
...
15
16
17
 
 
 
 
 
 
18
19
20
...
61
62
63
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
65
66
...
96
97
98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
100
101
...
15
16
17
18
19
20
21
22
23
24
25
26
...
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
...
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
0
@@ -15,6 +15,12 @@ servers:
0
         files: /var/www/apps/funapp/current/log/production.log
0
         parser: rails
0
         color: 0.2, 0.2, 1.0, 1.0
0
+ dev:
0
+ host: clockingit.com
0
+ source: local
0
+ files: /var/www/clockingit/logs/production.log
0
+ parser: rails
0
+ color: 0.2, 0.2, 1.0, 1.0
0
 config:
0
     dimensions: 1200x600
0
     min_blob_size: 0.004
0
@@ -61,6 +67,23 @@ config:
0
             database:
0
                 order: 9
0
                 size: 10
0
+ firewall:
0
+ order: 10
0
+ size: 15
0
+ action:
0
+ order: 11
0
+ size: 15
0
+ auto_clean: false
0
+ show: total
0
+ sourceinterface:
0
+ order: 12
0
+ size: 15
0
+ sourcehost:
0
+ order: 13
0
+ size: 15
0
+ sourceport:
0
+ order: 14
0
+ size: 15
0
 
0
     right_column:
0
         size: 25
0
@@ -96,6 +119,23 @@ config:
0
             warnings:
0
                 order: 8
0
                 size: 5
0
+ destinationinterface:
0
+ order: 9
0
+ size: 15
0
+ ipprotocol:
0
+ order: 10
0
+ size: 15
0
+ destinationhost:
0
+ order: 11
0
+ size: 15
0
+ destinationport:
0
+ order: 12
0
+ size: 15
0
+ info:
0
+ order: 13
0
+ size: 15
0
+ auto_clean: false
0
+ show: total
0
 resolver:
0
     reverse_ip_lookups: true
0
     reverse_timeout: 0.5
...
5
6
7
8
 
9
10
11
...
47
48
49
 
 
 
 
 
 
 
 
 
50
51
52
...
59
60
61
 
62
63
64
...
5
6
7
 
8
9
10
11
...
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
...
68
69
70
71
72
73
74
0
@@ -5,7 +5,7 @@
0
 #
0
 
0
 module GlTail
0
- VERSION = '0.1.6'
0
+ VERSION = '0.1.7'
0
 end
0
 
0
 begin
0
@@ -47,6 +47,15 @@ rescue LoadError
0
   exit
0
 end
0
 
0
+begin
0
+ require 'file/tail'
0
+rescue LoadError
0
+ puts "Missing gem file-tail."
0
+ puts "Ubuntu:"
0
+ puts " sudo gem install -y file-tail -r"
0
+ exit
0
+end
0
+
0
 $:.unshift(File.dirname(__FILE__)) # this should be obsolete once its a gem
0
 
0
 # load our libraries
0
@@ -59,6 +68,7 @@ require 'gl_tail/config/yaml_parser'
0
 # future options: JMS queue, spread.org, local tail, etc
0
 require 'gl_tail/sources/base'
0
 require 'gl_tail/sources/ssh'
0
+require 'gl_tail/sources/local'
0
 
0
 %w( engine activity block item element parser resolver blob_store font_store).each {|f| require "gl_tail/#{f}" }
0
 
...
35
36
37
38
 
 
39
40
 
 
 
 
 
 
 
41
42
 
43
44
45
...
35
36
37
 
38
39
40
 
41
42
43
44
45
46
47
48
 
49
50
51
52
0
@@ -35,11 +35,18 @@ module GlTail
0
 
0
       self.yaml['servers'].each do |server|
0
 
0
- src = GlTail::Source::SSH.new(@config)
0
+ name = server.shift
0
+ data = server.shift
0
 
0
- src.name = server.shift
0
+ if data['source'] && data['source'].downcase == 'local'
0
+ src = GlTail::Source::Local.new(@config)
0
+ else
0
+ src = GlTail::Source::SSH.new(@config)
0
+ end
0
+
0
+ src.name = name
0
 
0
- apply_values(src, server.shift)
0
+ apply_values(src, data)
0
 
0
         @config.sources << src
0
       end
...
18
19
20
 
 
 
 
 
21
22
23
24
 
25
26
27
...
18
19
20
21
22
23
24
25
26
27
28
 
29
30
31
32
0
@@ -18,10 +18,15 @@ class PostgreSQLParser < Parser
0
 
0
     _, database, datetime, activity, description = /^\[(.*), (.* .* .*)\] LOG: ([a-zA-Z0-9\s]*): (.*)/.match(line).to_a
0
 
0
+ unless _
0
+ _, database, datetime, activity, description = /postgres\[\d+\]: \[\d+-\d+\] \[(.*), (.* .* .*)\] LOG: ([a-zA-Z0-9\s]*): (.*)/.match(line).to_a
0
+ syslog = true if _
0
+ end
0
+
0
     if database
0
       add_activity(:block => 'database', :name => database, :size => 0.2)
0
     else
0
- _, datetime, activity, description = /^(.* .* .*) LOG: ([a-zA-Z0-9\s]*): (.*)/.match(line).to_a
0
+ _, datetime, activity, description = /(.* .* .*) LOG: ([a-zA-Z0-9\s]*): (.*)/.match(line).to_a
0
     end
0
 
0
     if activity
...
3
4
5
6
 
 
7
8
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
11
12
...
3
4
5
 
6
7
8
9
 
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
0
@@ -3,10 +3,26 @@ module GlTail
0
   module Source
0
 
0
     class Local < Base
0
- config_attribute :command, "The Command to run"
0
+ config_attribute :source, "The type of Source"
0
+ config_attribute :host
0
       config_attribute :files, "The files to tail", :deprecated => "Should be embedded in the :command"
0
 
0
- # TODO: code to run comand locally and parse streams
0
+ def init
0
+ @log = File.open(files)
0
+ @log.extend(File::Tail)
0
+ @log.max_interval = 5
0
+ @log.return_if_eof = true
0
+ end
0
+
0
+ def process
0
+ @log.tail(1) { |line|
0
+ parser.parse(line)
0
+ }
0
+ end
0
+
0
+ def update
0
+ end
0
+
0
     end
0
   end
0
 end
...
4
5
6
 
7
8
9
...
4
5
6
7
8
9
10
0
@@ -4,6 +4,7 @@ module GlTail
0
   module Source
0
 
0
     class SSH < Base
0
+ config_attribute :source, "The type of Source"
0
       config_attribute :command, "The Command to run"
0
       config_attribute :files, "The files to tail", :deprecated => "Should be embedded in the :command"
0
       config_attribute :host, "The Host to connect to"

Comments

    No one has commented yet.