Project

bluecoat

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
A bundle of functions for accessing Blue Coat Appliances. I.e. Reporter, ProxySG, etc.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Bluecoat

This gem provides an interface from ruby to Blue Coat Boxes.

Installation

Add this line to your application's Gemfile:

gem 'bluecoat'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bluecoat

Usage

require 'bluecoat'

Proxy SG

connect

sg = BlueCoat::SG.new({
  :host => "bluecoatsg.local",
  :user => "admin",
  :pass => "password"
})

fetch whole policy

policy = sg.fetch_policy

fetch a defined subnet

subnet = sg.fetch_subnet "subnet1"

Reporter

connect

bc = BlueCoat::Reporter.new({
  :host => "bluecatreporter.local",
  :user => "admin",
  :pass => "password",
  :role => "admin"    # choose existant role on reporter
})

fetch a report from reporter through WEB API

Give parameters as specified by the Blue Coat Reporter WEB API as described in the Reporter Administrators Guide. The result is a two dimensional array rows/columns.

result = bc.fetch_report({
  :database => "databasename",
  :columns => "total_bytes",
  :sort => "total_bytes",
  :summarizeBy => "c_ip",
  :rows => 100,
  :dateRelativeUnit => :month,
  :dateStart => -1,
  :dateEnd => 0
})

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request