11 $trace = true |
11 $trace = true |
12 $stderr.puts '$trace is enabled' |
12 $stderr.puts '$trace is enabled' |
13 end |
13 end |
14 |
14 |
15 # parse the current library version |
15 # parse the current library version |
16 $version = ( LIBDIR + 'arborist' + 'monitor' + "#{PROJECT}.rb" ).read.split(/\n/). |
16 $version = ( LIBDIR + 'arborist' + "#{PROJECT}.rb" ).read.split(/\n/). |
17 select{|line| line =~ /VERSION =/}.first.match(/([\d|.]+)/)[1] |
17 select{|line| line =~ /VERSION =/}.first.match(/([\d|.]+)/)[1] |
18 |
18 |
19 task :default => [ :spec, :docs, :package ] |
19 task :default => [ :spec, :docs, :package ] |
20 |
20 |
21 |
21 |
28 spec = Gem::Specification.new do |s| |
28 spec = Gem::Specification.new do |s| |
29 s.email = 'mahlon@martini.nu' |
29 s.email = 'mahlon@martini.nu' |
30 s.homepage = 'http://bitbucket.org/mahlon/Arborist-SNMP' |
30 s.homepage = 'http://bitbucket.org/mahlon/Arborist-SNMP' |
31 s.authors = [ 'Mahlon E. Smith <mahlon@martini.nu>', 'Michael Granger <ged@faeriemud.org>' ] |
31 s.authors = [ 'Mahlon E. Smith <mahlon@martini.nu>', 'Michael Granger <ged@faeriemud.org>' ] |
32 s.platform = Gem::Platform::RUBY |
32 s.platform = Gem::Platform::RUBY |
33 s.summary = "Common SNMP support for Arborist" |
33 s.summary = "SNMP support for Arborist monitors" |
34 s.name = 'arborist-' + PROJECT |
34 s.name = 'arborist-' + PROJECT |
35 s.version = $version |
35 s.version = $version |
36 s.license = 'BSD-3-Clause' |
36 s.license = 'BSD-3-Clause' |
37 s.has_rdoc = true |
37 s.has_rdoc = true |
38 s.require_path = 'lib' |
38 s.require_path = 'lib' |
39 s.bindir = 'bin' |
39 s.bindir = 'bin' |
40 s.files = File.read( __FILE__ ).split( /^__END__/, 2 ).last.split |
40 s.files = File.read( __FILE__ ).split( /^__END__/, 2 ).last.split |
41 # s.executables = %w[] |
41 # s.executables = %w[] |
42 s.description = <<-EOF |
42 s.description = <<-EOF |
43 This library adds common SNMP support to Arborist monitors. |
43 This library adds common SNMP resource support to Arborist monitors. |
44 EOF |
44 EOF |
45 s.required_ruby_version = '>= 2' |
45 s.required_ruby_version = '>= 2' |
46 |
46 |
47 s.add_dependency 'arborist', "~> 0.1" |
47 s.add_dependency 'arborist', "~> 0.1" |
48 s.add_dependency 'snmp', "~> 1.2" |
48 s.add_dependency 'net-snmp2', "~> 0.3" |
49 end |
49 end |
50 |
50 |
51 Gem::PackageTask.new( spec ) do |pkg| |
51 Gem::PackageTask.new( spec ) do |pkg| |
52 pkg.need_zip = true |
52 pkg.need_zip = true |
53 pkg.need_tar = true |
53 pkg.need_tar = true |
107 |
107 |
108 ######################################################################## |
108 ######################################################################## |
109 ### M A N I F E S T |
109 ### M A N I F E S T |
110 ######################################################################## |
110 ######################################################################## |
111 __END__ |
111 __END__ |
|
112 lib/arborist/snmp.rb |
112 lib/arborist/monitor/snmp.rb |
113 lib/arborist/monitor/snmp.rb |
113 lib/arborist/monitor/snmp/swap.rb |
114 lib/arborist/monitor/snmp/swap.rb |
114 lib/arborist/monitor/snmp/disk.rb |
115 lib/arborist/monitor/snmp/disk.rb |
115 lib/arborist/monitor/snmp/process.rb |
116 lib/arborist/monitor/snmp/process.rb |
116 lib/arborist/monitor/snmp/memory.rb |
117 lib/arborist/monitor/snmp/memory.rb |
117 lib/arborist/monitor/snmp/load.rb |
118 lib/arborist/monitor/snmp/cpu.rb |