Permalink
Browse files

Version bump to 0.1.0

  • Loading branch information...
igrigorik committed Jan 28, 2010
1 parent 413004c commit 1c3bd06d4e6983527373eff8cbdce1685f43ddc8
Showing with 88 additions and 0 deletions.
  1. +59 −0 README.rdoc
  2. +28 −0 Rakefile
  3. +1 −0 VERSION
View
@@ -0,0 +1,59 @@
+= GMetric
+
+A pure Ruby client for generating Ganglia 3.1.x+ gmetric meta and metric packets and talking to your gmond / gmetad nodes over UDP protocol. Supports host spoofing, and all the same parameters as the gmetric command line executable.
+
+== Example: Sending a gmetric to a gmond over UDP
+
+ Ganglia::GMetric.send("127.0.0.1", 8670, {
+ :name => 'pageviews',
+ :units => 'req/min',
+ :type => 'uint8',
+ :value => 7000,
+ :tmax => 60,
+ :dmax => 300
+ })
+
+== Example: Generating the Meta and Metric packets
+
+ g = Ganglia::GMetric.pack(
+ :slope => 'positive',
+ :name => 'ruby',
+ :value => rand(100),
+ :tmax => 60,
+ :units => '',
+ :dmax => 60,
+ :type => 'uint8'
+ )
+
+ # s[0] = meta packet
+ # s[1] = gmetric packet
+
+ s = UDPSocket.new
+ s.connect("127.0.0.1", 8670)
+ s.send g[0], 0
+ s.send g[1], 0
+
+== License
+
+(The MIT License)
+
+Copyright (c) 2009 Ilya Grigorik
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -0,0 +1,28 @@
+require 'rake'
+require 'spec/rake/spectask'
+
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |gemspec|
+ gemspec.name = "gmetric"
+ gemspec.summary = "Pure Ruby interface for generating Ganglia gmetric packets"
+ gemspec.description = gemspec.summary
+ gemspec.email = "ilya@igvita.com"
+ gemspec.homepage = "http://github.com/igrigorik/gmetric"
+ gemspec.authors = ["Ilya Grigorik"]
+ gemspec.rubyforge_project = "gmetric"
+ end
+
+ Jeweler::GemcutterTasks.new
+rescue LoadError
+ puts "Jeweler not available. Install it with: sudo gem install jeweler -s http://gemcutter.org"
+end
+
+task :default => :spec
+
+Spec::Rake::SpecTask.new do |t|
+ t.ruby_opts = ['-rtest/unit']
+ t.spec_files = FileList['spec/**/*_spec.rb']
+end
+
+
View
@@ -0,0 +1 @@
+0.1.0

0 comments on commit 1c3bd06

Please sign in to comment.