Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

lhandl/bluecoat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Ruby gem for accessing Blue Coat's boxes from ruby

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages