No commit activity in last 3 years
No release in over 3 years
Simple server snooping on and recording OpenNebula's VM & Host monitoring traffic
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
~> 10.0
~> 3.0.0
~> 0.9.0

Runtime

~> 1.11.1
~> 1.0.4
~> 1.11.1
~> 0.3.17
~> 4.18.0
~> 1.3.10
 Project Readme

Build Status Dependency Status Gem Version Code Climate

ONESnooper Server

Simple server snooping on and recording OpenNebula's VM & Host monitoring traffic.

Requirements

  • Ruby >= 1.9.3
  • Rubygems
  • Database (SQLite, MySQL, MongoDB)
  • OpenNebula >= 4.10 (doesn't have to be present on the same machine)
  • iptables with TEE

Some dependencies require dev versions of various lib packages to compile native extensions.

Installation

gem install onesnooper-server

Configuration

UDP Datagram Mirroring

  • OpenNebula Manager Host:
iptables -I PREROUTING -p udp -m udp --dport 4124 -j TEE --gateway $ONESNOOPER_HOST
  • ONESnooper Server Host:
iptables -I PREROUTING -d $ONE_MANAGER_HOST/32 -p udp -m udp --dport 4124 -j DNAT --to-destination $ONESNOOPER_HOST:9000

Database Configuration

You can use multiple databases at the same time!

You can choose from:

  • SQLite3 (not recommended for production)
  • MySQL
  • MongoDB

For SQL-based databases, you can use this Sequel migration script:

cd /tmp
mkdir migrations
cd migrations
wget https://raw.githubusercontent.com/arax/onesnooper-server/master/migrations/001_create_db.rb
cd ..
sequel -m migrations sqlite:///tmp/onesnooper-server.sqlite

For MySQL, just adapt the DB location on the last line according to your local MySQL configuration and Sequel documentation.

ONESnooper Server Configuration

You can configure ONESnooper Server by saving an updated version of the following configuration file as /etc/onesnooper-server/onesnooper-server.yml.

---
defaults: &defaults
  bind_address: 127.0.0.1
  bind_port: 9000
  log_level: info
  store:
  - mongodb
  stores:
    sqlite:
      database_file: /tmp/onesnooper-server.sqlite
    mysql:
      database: one_monitoring
      host: localhost
      port: 3306
      username:
      password:
    mongodb:
      database: one_monitoring
      host: localhost
      port: 27017
  allowed_sources:
  - 127.0.0.1

###############################################
#######  DO NOT EDIT AFTER THIS POINT  ########
###############################################

production:
  <<: *defaults

development:
  <<: *defaults
  log_level: debug
  store:
  - sqlite

test:
  <<: *defaults
  log_level: debug
  store:
  - sqlite

Usage

Start onesnooper-server and wait ...

Code Documentation

Code Documentation for OneacctExport by YARD

Continuous integration

Continuous integration for OneacctExport by Travis-CI

Contributing

  1. Fork it ( https://github.com/arax/onesnooper-server/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request