GithubHelp home page GithubHelp logo

fudge / gltail Goto Github PK

View Code? Open in Web Editor NEW
610.0 610.0 100.0 677 KB

Real-time visualization of server traffic, events and statistics with Ruby, SSH and OpenGL

Home Page: http://www.fudgie.org

Ruby 100.00%

gltail's People

Contributors

anall avatar dshimy avatar fudge avatar jim-p avatar jlsync avatar jormon avatar jrgifford avatar makevoid avatar nofxx avatar petersondrew avatar runeb avatar sigvei avatar zedtux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gltail's Issues

[SOLVED] Gltail connection glitch?

When I run gltail on windows, connecting to Debian Jessie on a Apache 2.4 HTTP server, gltail refuses to show any balls. I can run ssh and tail -f the log using the command line it says it's doing, but it doesn't work. config.yaml below

servers:
site1:
host: 192.168.1.3
user: odin
password: l356129b
command: tail -f -n0
files: /var/log/apache2/access.log
parser: apache
color: 0.2, 1.0, 0.2, 1.0
config:
dimensions: 1200x600
min_blob_size: 0.004
max_blob_size: 0.04
highlight_color: orange
bounce: false
left_column:
size: 25
alignment: -0.99
blocks:
info:
order: 0
size: 10
auto_clean: false
show: total
hosts:
order: 1
size: 3
sites:
order: 2
size: 10
content:
order: 3
size: 5
show: total
color: 1.0, 0.8, 0.4, 1.0
status:
order: 4
size: 10
color: 1.0, 0.8, 0.4, 1.0
types:
order: 5
size: 5
color: 1.0, 0.4, 0.2, 1.0
users:
order: 6
size: 10
smtp:
order: 7
size: 5
logins:
order: 8
size: 5
database:
order: 9
size: 10
memcached:
order: 10
size: 3

right_column:
    size: 25
    alignment: 0.99
    blocks:
        urls:
            order: 0
            size: 15
        slow requests:
            order: 1
            size: 5
            show: average
        referrers:
            order: 2
            size: 10
        user agents:
            order: 3
            size: 5
            color: 1.0, 1.0, 1.0, 1.0
        mail from:
            order: 4
            size: 5
        mail to:
            order: 5
            size: 5
        viruses:
            order: 6
            size: 5
        rejections:
            order: 7
            size: 5
            color: 1.0, 0.2, 0.2, 1.0
        warnings:
            order: 8
            size: 5

resolver:
reverse_ip_lookups: true
reverse_timeout: 0.5

Squid hits/misses

It'd be awesome to have the blobs either filled in or not depending on whether a line in a squid log is a hit or a miss (is serving from local cache or having to go out onto the internet). Or if that's difficult then maybe there's an easier way of differentiating between hits and misses.

bitrot?

I'm unable to run gl_tail on OS X 10.9 with ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13]

$ ./gl_tail
Rubygems and/or bundler missing.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:2007:in `raise_if_conflicts': Unable to activate gltail-0.1.8, because net-ssh-2.9.1 conflicts with net-ssh (= 1.1.4) (Gem::LoadError)
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/specification.rb:1176:in `activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems.rb:186:in `rescue in try_activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems.rb:183:in `try_activate'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:132:in `rescue in require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:144:in `require'
    from /Users/anders/gltail/lib/gl_tail.rb:28:in `<top (required)>'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from ./gl_tail:77:in `<main>'

glTail on OSX doesnt support SSH keys with a password set

Just tried using glTail on OSX and have found that it wont connect to systems where the SSH key is password-protected. Initially it was failing on ssh-askpass not being present, however even after using a common OSX script to provide that functionality I am getting the following error:

UNKNOWN:[/bin/bash: /usr/libexec/ssh-askpass: Operation not permitted

The ssh-askpass script is executable and has the correct permissions (its accessible by any user on the system), so I am not sure what is triggering the OMP error.

Ge this into repos

It would be nice if this tool is in some package repos such as Debians one.

Not rendering anything

I have been trying to reuse gltail I have been successfully using it last year not sure what have changed but its not working anymore, the ruby opengl window opens but not showing any bubbles.

SIngle line from log file

es.domain.com x.x.x.x Wga2338AAAEAAGBnJAYAAAAT [11/Nov/2017:08:37:51 +0000] 200 6701 99807 0 "GET / HTTP/1.0" "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.75 Safari/537.36"

config file used:

`servers:
dakwak-us:
host: localhost
source: local
files: /home/waheed/logs/dakwak-tpv-current.log
parser: apache
color: 1.0, 0.0, 0.0, 1.0

config:
dimensions: 1440x900
min_blob_size: 0.005
max_blob_size: 0.05
highlight_color: white
bounce: true
left_column:
size: 25
alignment: -0.99
blocks:
urls:
order: 12
size: 30
sites:
order: 2
size: 2
show: total
content:
order: 3
size: 5
show: total
status:
order: 4
size: 12
show: total
types:
order: 5
size: 5
color: 1.0, 0.4, 0.2, 1.0
users:
order: 6
size: 10
smtp:
order: 7
size: 5
logins:
order: 8
size: 5
database:
order: 9
size: 10
firewall:
order: 10
size: 15
action:
order: 11
size: 15
auto_clean: false
show: total
int:
order: 11
size: 5
rule:
order: 11
size: 5
sourceinterface:
order: 12
size: 15
sourcehost:
order: 13
size: 15
sourceport:
order: 14
size: 15
user agents:
order: 3
size: 5
mappers:
order: 11
size: 8
sqlselect:
color: 1.0, 0.8, 0.4, 1.0
sqlupdate:
color: 1.0, 0.2, 0.2, 1.0
sqlinsert:
color: 1.0, 0.5, 0.5, 0.0

right_column:
    size: 25
    alignment: 0.99
    blocks:
        info:
            order: 3
            size: 15
            auto_clean: false
            show: total
        hosts:
            order: 1
            size: 30
            show: total
        referrers:
            order: 4
            size: 10
        mail from:
            order: 30
            size: 5
        mail to:
            order: 5
            size: 5
        viruses:
            order: 6
            size: 5
        rejections:
            order: 7
            size: 5
            color: 1.0, 0.2, 0.2, 1.0
        warnings:
            order: 8
            size: 5
        destinationinterface:
            order: 9
            size: 15
        ipprotocol:
            order: 10
            size: 15
        sourcedestination:
            order: 11
            size: 15
        destinationhost:
            order: 11
            size: 15
        destinationport:
            order: 12
            size: 15
        agents:
            order: 14
            size: 8
            show: total
            auto_clean: false
            color: 0.5, 0.5, 0.5, 0.5

resolver:
reverse_ip_lookups: true
reverse_timeout: 0.5

`

gem list used with bundle

Using bundler 1.16.0
Using chipmunk 5.3.4.5
Using tins 0.7.0
Using file-tail 1.0.12
Using glu 8.3.0
Using glut 8.3.0
Using net-ssh 2.6.5
Using net-ssh-gateway 1.2.0
Using opengl 0.8.0
Using gltail 0.1.9 from source at .

Please let me know if I missed anything. I already used osx seirra and ubuntu 16.04 with ruby 1.9.2 and ruby 2.3 with the same empty ruby opengl window with two left and right lines and a bottom lines for the cone.

No bubbles or any other visualizations

Cmd used gltail_fudge$ ./bin/gl_tail /home/waheed/Desktop/config.yaml

Thanks for this nice visualizer fudge

On minimize and maximize UI disspears

Please fix it please. Because i'm using win+d pretty often to instantly get to desktop and when i'm doing it, everything dissapears in gltail.

Thanks ;) nice tool btw

Missing or outdated gem: ruby-opengl (>=0.40.1)

When i updated from Ubuntu 11.04 to 11.10 all of a sudden Gltail ceased to work throwing that error message everytime and i cannot work out why or whats changed or how to further debug this issue, any pointers ?

Missing or outdated gem: ruby-opengl (>=0.40.1)
Ubuntu:
sudo apt-get install rake ruby1.8-dev libgl1-mesa-dev libglu1-mesa-dev libglut3-dev
sudo gem install -y ruby-opengl -r

My gems installed :

*** LOCAL GEMS ***

file-tail (1.0.6)
Author: Florian Frank
Rubyforge: http://rubyforge.org/projects/file-tail
Homepage: http://flori.github.com/file-tail
Installed at: /var/lib/gems/1.8

File::Tail for Ruby

mkrf (0.2.3)
Author: Kevin Clark
Rubyforge: http://rubyforge.org/projects/mkrf
Homepage: http://glu.ttono.us
Installed at: /var/lib/gems/1.8

Generate Rakefiles to Build C Extensions to Ruby

needle (1.3.0)
Author: Jamis Buck
Homepage: http://needle.rubyforge.org
Installed at: /var/lib/gems/1.8

Needle is a Dependency Injection/Inversion of Control container for
Ruby. It supports both type-2 (setter) and type-3 (constructor)
injection. It takes advantage of the dynamic nature of Ruby to
provide a rich and flexible approach to injecting dependencies.

net-ssh (2.2.1, 1.1.4)
Authors: Jamis Buck, Delano Mandelbaum
Rubyforge: http://rubyforge.org/projects/net-ssh
Homepage: http://github.com/net-ssh/net-ssh
Installed at (2.2.1): /var/lib/gems/1.8
(1.1.4): /var/lib/gems/1.8

Net::SSH: a pure-Ruby implementation of the SSH2 client protocol.

net-ssh-gateway (1.1.0, 1.0.1)
Author: Jamis Buck
Rubyforge: http://rubyforge.org/projects/net-ssh-gateway
Homepage: http://net-ssh.rubyforge.org/gateway
Installed at (1.1.0): /var/lib/gems/1.8
(1.0.1): /var/lib/gems/1.8

A simple library to assist in establishing tunneled Net::SSH
connections

rake (0.9.2)
Author: Jim Weirich
Rubyforge: http://rubyforge.org/projects/rake
Homepage: http://rake.rubyforge.org
Installed at: /var/lib/gems/1.8

Ruby based make-like utility.

ruby-opengl (0.60.1)
Authors: Alain Hoang, Jan Dvorak, Minh Thu Vo, James Adam
Rubyforge: http://rubyforge.org/projects/ruby-opengl
Homepage: http://ruby-opengl.rubyforge.org
Installed at: /var/lib/gems/1.8

OpenGL Interface for Ruby

spruz (0.2.13)
Author: Florian Frank
Homepage: http://flori.github.com/spruz
Installed at: /var/lib/gems/1.8

Useful stuff.

LIke i say i have no idea where to look and i cannot find any information on it either.

windows gltail

Hi folks,
I have no problem to install gltail on Fedora 17, Ubuntu 12.02 etc...
But on windows platform, i give up...
anyone can tell me if gltail is supported on windows using newer ruby versions ?
Thank you

Ruby can't see parser

Can anyone tell my why gltail can't see this parser?

#
# Place this file in gltail/lib/gl_tail/parsers/gitlogfu.rb
#
# Parser which handles the output of following 'git log' command.
#
# git log --pretty='format:%ct <%an>' --shortstat -z | tr '\n\0' ' \n' | sort -n
#
class GitLogFuParser < Parser

  def parse(line)
    @yesterday ||= Time.at(0)
    if line =~ /(\d+) <(.*?)>\s+(\d+) files changed, (\d+) insertions..., (\d+) deletions/
      today = Time.at($1.to_i)
      author = $2
      files = $3.to_i
      inserts = $4.to_i
      deletes = $5.to_i

      add_activity(:block => 'insertions', :name => author, :size => inserts) if inserts > 0
      add_activity(:block => 'deletions', :name => author, :size => deletes) if deletes > 0

      add_event(:block => 'insertions', :name => author, :message => today.strftime('%B %d, %Y'), 
                :update_stats => false, :color => [0.4, 0.4, 0.4, 1.0]) if today.day != @yesterday.day && today.wday == 0

      @yesterday = today

    end
  end

end

Rails monitor

I have a local webdev config. on my mac - ruby website.
I want to monitor it via gltail.
After editing the config file, it says connecting:
from config file -------
servers:
rails:
host: 89.33.181.61 -> this is my external IP
user: imac - my imac user
command: tail -f -n0
files: /users/imac/schnipps/log/development.log
parser: rails
color: 0.2, 0.2, 1.0, 1.0


does it look ok? I know I can SSH to this webdev from anywhere.

Better instructions

You need better instructions. Everything looks awesome but it's just not possible for some of us to get this running w/out a little more detailed description(I like many are not ruby fanatics).

For instance, you say run ./gl_tail.rb ... however I do not see that in the root and I find it in the /lib/ but it produces many errors. Where is that supposed to be run?

Missing gem net-ssh.

I'm using Ubuntu 9.04 and all seems to install without error. When I try and run gl_tail it quits and informs me I need to install net-ssh with:
sudo gem install -y net-ssh -r

I've done that a few times and it installs each time but still no such luck running gl_tail.

RubyGems Environment:

  • RUBYGEMS VERSION: 1.3.1
  • RUBY VERSION: 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
  • INSTALLATION DIRECTORY: /var/lib/gems/1.8
  • RUBY EXECUTABLE: /usr/bin/ruby1.8
  • EXECUTABLE DIRECTORY: /var/lib/gems/1.8/bin
  • RUBYGEMS PLATFORMS:
    • ruby
    • x86_64-linux
  • GEM PATHS:
    • /var/lib/gems/1.8
    • /home/dave/.gem/ruby/1.8
  • GEM CONFIGURATION:
    • :update_sources => true
    • :verbose => true
    • :benchmark => false
    • :backtrace => false
    • :bulk_threshold => 1000
  • REMOTE SOURCES:

Can't Handle Substantial Server Load

Running gl_tail on a server that gets a relatively high amount of traffic causes the program to eventually grind to a halt. I've tried it on a server that gets about 200 hits/second and the program lasted about 20 seconds. Perhaps the OpenGL code should be ported to C?

Local Reads

I love glTail but can't figure out how to make it do a local file tail or tcpdump (tshark?). Can you put an example in the repo on how to do this?

Mac OS X Logs streaming in, but not rendering visualization

on OSX 10.10.3
when running in debug mode I can see the logs streaming in from the remote servers, but nothing gets rendered on the display.

I've tried installing from this source and installing from community gem, same behavior. In the console output stream this is the only feedback indicating anything is going wrong (this is printed out every so often)

543 frames in 10.000 seconds = 54.300 FPS
Elements[0], Activities[0], Blobs[0/0]

not sure where to go from here. any help would be appreciated.

Errors in element.rb

Running the first time with input from an nginx server, gltail crashed and I received the following traceback:

./bin/../lib/gl_tail/element.rb:280:in `glDeleteLists': no implicit conversion from nil to integer (TypeError)
    from ./bin/../lib/gl_tail/element.rb:280:in `render'
    from ./bin/../lib/gl_tail/block.rb:83:in `render'
    from ./bin/../lib/gl_tail/engine.rb:99:in `draw'
    from ./bin/../lib/gl_tail/engine.rb:97:in `each'
    from ./bin/../lib/gl_tail/engine.rb:97:in `draw'
    from ./bin/../lib/gl_tail/engine.rb:371:in `to_proc'
    from ./bin/../lib/gl_tail/engine.rb:353:in `call'
    from ./bin/../lib/gl_tail/engine.rb:353:in `glutMainLoop'
    from ./bin/../lib/gl_tail/engine.rb:353:in `start'
    from bin/gl_tail:111

I added to the if statement above it and @text_list to avoid the scenario, but I doubt that's the proper solution.

The same thing also occurred on line 255.

on MACOS X fullscreen does not work

I have set up in the lib/gl_tail/config.rb the fullscreen
def initialize(config)
@config = config

  @fullscreen = true

  @wanted_fps = 1
  @aspect = 0.6
  @bounce = true

  @top = 0.9
  @line_size = 0.03
  @bitmap_mode = 0
  @mode = 0
  @highlight_color = [1.0, 0.0, 0.0, 1.0]
end

But in the config.yaml I have this:
config:
dimensions: 1200x1000
min_blob_size: 0.004
max_blob_size: 0.04
highlight_color: orange
bounce: true

SO, when it starts it is windowed to the settings in the .yaml file and the shortcuts don't work for any command.

script.rb can't run from rails controller

Hi,
I wrote script to execute remote commands using net/ssh.
my script works fine when I run it from command line.
But when I try to execute it from rails controller I got an error.

`require': no such file to load -- net/ssh (LoadError)

can anybody help me to understand what I am doing wrong.
Thanks

Rails controller
@Result=system "ruby script.rb"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.