opsview_rest 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +23 -0
- data/.rspec +2 -0
- data/.travis.yml +10 -0
- data/Gemfile +6 -0
- data/LICENSE +202 -0
- data/README.md +100 -0
- data/Rakefile +22 -0
- data/TODO.md +20 -0
- data/lib/opsview_rest/attribute.rb +32 -0
- data/lib/opsview_rest/contact.rb +71 -0
- data/lib/opsview_rest/host.rb +77 -0
- data/lib/opsview_rest/hostcheckcommand.rb +32 -0
- data/lib/opsview_rest/hostgroup.rb +29 -0
- data/lib/opsview_rest/hosttemplate.rb +29 -0
- data/lib/opsview_rest/keyword.rb +39 -0
- data/lib/opsview_rest/mixin.rb +25 -0
- data/lib/opsview_rest/monitoringserver.rb +33 -0
- data/lib/opsview_rest/notificationmethod.rb +31 -0
- data/lib/opsview_rest/role.rb +41 -0
- data/lib/opsview_rest/servicecheck.rb +53 -0
- data/lib/opsview_rest/servicegroup.rb +27 -0
- data/lib/opsview_rest/timeperiod.rb +41 -0
- data/lib/opsview_rest.rb +166 -0
- data/opsview_rest.gemspec +28 -0
- data/spec/fixtures/list.json +1 -0
- data/spec/fixtures/list_hosttemplate.json +1 -0
- data/spec/fixtures/login_key.json +1 -0
- data/spec/fixtures/logout.json +1 -0
- data/spec/fixtures/reload.json +1 -0
- data/spec/opsview_rest_spec.rb +79 -0
- data/spec/spec_helper.rb +17 -0
- metadata +44 -5
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
require 'opsview_rest/mixin'
|
|
2
|
+
|
|
3
|
+
class OpsviewRest
|
|
4
|
+
class Keyword
|
|
5
|
+
|
|
6
|
+
include OpsviewRest::Mixin
|
|
7
|
+
|
|
8
|
+
attr_accessor :options, :opsview, :resource_type
|
|
9
|
+
|
|
10
|
+
def initialize(opsview, options = {})
|
|
11
|
+
@options = {
|
|
12
|
+
:name => "Unknown",
|
|
13
|
+
:all_hosts => false,
|
|
14
|
+
:hosts => [],
|
|
15
|
+
:roles => [ "View some, change none" ],
|
|
16
|
+
:all_servicechecks => false,
|
|
17
|
+
:servicechecks => [],
|
|
18
|
+
:description => "",
|
|
19
|
+
:style => "group_by_host",
|
|
20
|
+
:enabled => true,
|
|
21
|
+
:save => true,
|
|
22
|
+
:replace => false
|
|
23
|
+
}.update options
|
|
24
|
+
|
|
25
|
+
@opsview = opsview
|
|
26
|
+
@resource_type = @options[:type]
|
|
27
|
+
|
|
28
|
+
@options[:all_hosts] = if @options[:all_hosts] then 1 else 0 end
|
|
29
|
+
@options[:all_servicechecks] = if @options[:all_servicechecks] then 1 else 0 end
|
|
30
|
+
@options[:enabled] = if @options[:enabled] then 1 else 0 end
|
|
31
|
+
@options[:servicechecks] = @options[:servicechecks].map { |x| { "name" => x } }
|
|
32
|
+
@options[:hosts] = @options[:hosts].map { |x| { "name" => x } }
|
|
33
|
+
@options[:roles] = @options[:roles].map { |x| { "name" => x } }
|
|
34
|
+
|
|
35
|
+
save(@options[:replace]) if @options[:save]
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
class OpsviewRest
|
|
2
|
+
module Mixin
|
|
3
|
+
|
|
4
|
+
def resource_path(full=false)
|
|
5
|
+
if (full == true || full == :full)
|
|
6
|
+
"/rest/config/#{self.resource_type}"
|
|
7
|
+
else
|
|
8
|
+
"config/#{self.resource_type}"
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def save(replace=false)
|
|
13
|
+
if replace == true || replace == :replace
|
|
14
|
+
self.opsview.put(self.resource_path, self)
|
|
15
|
+
else
|
|
16
|
+
self.opsview.post(self.resource_path, self)
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def to_json
|
|
21
|
+
self.options.to_json
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
require 'opsview_rest/mixin'
|
|
2
|
+
|
|
3
|
+
class OpsviewRest
|
|
4
|
+
class MonitoringServer
|
|
5
|
+
|
|
6
|
+
include OpsviewRest::Mixin
|
|
7
|
+
|
|
8
|
+
attr_accessor :options, :opsview, :resource_type
|
|
9
|
+
|
|
10
|
+
def initialize(opsview, options = {})
|
|
11
|
+
@options = {
|
|
12
|
+
:name => "Slave",
|
|
13
|
+
:roles => [],
|
|
14
|
+
:activated => true,
|
|
15
|
+
:monitors => [],
|
|
16
|
+
:nodes => [],
|
|
17
|
+
:save => true,
|
|
18
|
+
:replace => false
|
|
19
|
+
}.update options
|
|
20
|
+
|
|
21
|
+
@opsview = opsview
|
|
22
|
+
@resource_type = @options[:type]
|
|
23
|
+
|
|
24
|
+
@option[:roles] = @option[:roles].map { |x| { "name" => x } }
|
|
25
|
+
@option[:monitors] = @option[:monitors].map { |x| { "name" => x } }
|
|
26
|
+
@option[:nodes] = @option[:nodes].map { |x| { "host" => { "name" => x } } }
|
|
27
|
+
@options[:activated] = if @options[:activated] then 1 else 0 end
|
|
28
|
+
|
|
29
|
+
save(@options[:replace]) if @options[:save]
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
end
|
|
33
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
require 'opsview_rest/mixin'
|
|
2
|
+
|
|
3
|
+
class OpsviewRest
|
|
4
|
+
class NotificationMethod
|
|
5
|
+
|
|
6
|
+
include OpsviewRest::Mixin
|
|
7
|
+
|
|
8
|
+
attr_accessor :options, :opsview, :resource_type
|
|
9
|
+
|
|
10
|
+
def initialize(opsview, options = {})
|
|
11
|
+
@options = {
|
|
12
|
+
:name => "Unknown",
|
|
13
|
+
:master => false,
|
|
14
|
+
:active => true,
|
|
15
|
+
:command => "notify_by_email",
|
|
16
|
+
:contact_variables => "EMAIL"
|
|
17
|
+
:save => true,
|
|
18
|
+
:replace => false
|
|
19
|
+
}.update options
|
|
20
|
+
|
|
21
|
+
@opsview = opsview
|
|
22
|
+
@resource_type = @options[:type]
|
|
23
|
+
|
|
24
|
+
@options[:master] = if @options[:master] then 1 else 0 end
|
|
25
|
+
@options[:active] = if @options[:active] then 1 else 0 end
|
|
26
|
+
|
|
27
|
+
save(@options[:replace]) if @options[:save]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
require 'opsview_rest/mixin'
|
|
2
|
+
|
|
3
|
+
class OpsviewRest
|
|
4
|
+
class Role
|
|
5
|
+
|
|
6
|
+
include OpsviewRest::Mixin
|
|
7
|
+
|
|
8
|
+
attr_accessor :options, :opsview, :resource_type
|
|
9
|
+
|
|
10
|
+
def initialize(opsview, options = {})
|
|
11
|
+
@options = {
|
|
12
|
+
:name => "Unknown",
|
|
13
|
+
:description => "",
|
|
14
|
+
:all_hostgroups => true,
|
|
15
|
+
:all_servicegroups => true,
|
|
16
|
+
:all_keywords => false,
|
|
17
|
+
:access_hostgroups => [],
|
|
18
|
+
:access_servicegroups => [],
|
|
19
|
+
:access_keywords => [],
|
|
20
|
+
:hostgroups => [],
|
|
21
|
+
:monitoringservers => [],
|
|
22
|
+
:accesses => [ "NOTIFYSOME", "PASSWORDSAVE", "VIEWALL" ],
|
|
23
|
+
:save => true,
|
|
24
|
+
:replace => false
|
|
25
|
+
}.update options
|
|
26
|
+
|
|
27
|
+
@opsview = opsview
|
|
28
|
+
@resource_type = @options[:type]
|
|
29
|
+
|
|
30
|
+
@options[:hostgroups] = @options[:hostgroups].map { |x| { "name" => x } }
|
|
31
|
+
@options[:monitoringservers] = @options[:monitoringservers].map { |x| { "name" => x } }
|
|
32
|
+
@options[:accesses] = @options[:accesses].map { |x| { "name" => x } }
|
|
33
|
+
@options[:all_hostgroups] = if @options[:all_hostgroups] then 1 else 0 end
|
|
34
|
+
@options[:all_servicegroups] = if @options[:all_servicegroups] then 1 else 0 end
|
|
35
|
+
@options[:all_keywords] = if @options[:all_keywords] then 1 else 0 end
|
|
36
|
+
|
|
37
|
+
save(@options[:replace]) if @options[:save]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
require 'opsview_rest/mixin'
|
|
2
|
+
|
|
3
|
+
class OpsviewRest
|
|
4
|
+
class Servicecheck
|
|
5
|
+
|
|
6
|
+
include OpsviewRest::Mixin
|
|
7
|
+
|
|
8
|
+
attr_accessor :options, :opsview, :resource_type
|
|
9
|
+
|
|
10
|
+
def initialize(opsview, options = {})
|
|
11
|
+
@options = {
|
|
12
|
+
:name => "Unknown",
|
|
13
|
+
:description => "Unknown",
|
|
14
|
+
:keywords => [],
|
|
15
|
+
:attribute => nil,
|
|
16
|
+
:servicegroup => "Unknown",
|
|
17
|
+
:dependencies => [ "Opsview Agent" ],
|
|
18
|
+
:check_period => "24x7",
|
|
19
|
+
:check_interval => "5",
|
|
20
|
+
:check_attempts => "3",
|
|
21
|
+
:retry_check_interval => "1",
|
|
22
|
+
:plugin => "check_nrpe",
|
|
23
|
+
:args => "",
|
|
24
|
+
:stalking => nil,
|
|
25
|
+
:volatile => false,
|
|
26
|
+
:invertresults => false,
|
|
27
|
+
:notification_options => "w,c,r",
|
|
28
|
+
:notification_period => nil,
|
|
29
|
+
:notification_interval => nil,
|
|
30
|
+
:flap_detection_enabled => true,
|
|
31
|
+
:checktype => "Active Plugin",
|
|
32
|
+
:save => true,
|
|
33
|
+
:replace => false
|
|
34
|
+
}.update options
|
|
35
|
+
|
|
36
|
+
@opsview = opsview
|
|
37
|
+
@resource_type = @options[:type]
|
|
38
|
+
|
|
39
|
+
@options[:keywords] = @options[:keywords].map { |x| { "name" => x } }
|
|
40
|
+
@options[:servicegroup] = { "name" => @options[:servicegroup] }
|
|
41
|
+
@options[:dependencies] = @options[:dependencies].map { |x| { "name" => x } }
|
|
42
|
+
@options[:check_period] = { "name" => @options[:check_period] }
|
|
43
|
+
@options[:plugin] = { "name" => @options[:plugin] }
|
|
44
|
+
@options[:volatile] = if @options[:volatile] then 1 else 0 end
|
|
45
|
+
@options[:invertresults] = if @options[:invertresults] then 1 else 0 end
|
|
46
|
+
@options[:flap_detection_enabled] = if @options[:flap_detection_enabled] then 1 else 0 end
|
|
47
|
+
@options[:checktype] = { "name" => @options[:checktype] }
|
|
48
|
+
|
|
49
|
+
save(@options[:replace]) if @options[:save]
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
require 'opsview_rest/mixin'
|
|
2
|
+
|
|
3
|
+
class OpsviewRest
|
|
4
|
+
class Servicegroup
|
|
5
|
+
|
|
6
|
+
include OpsviewRest::Mixin
|
|
7
|
+
|
|
8
|
+
attr_accessor :options, :opsview, :resource_type
|
|
9
|
+
|
|
10
|
+
def initialize(opsview, options = {})
|
|
11
|
+
@options = {
|
|
12
|
+
:name => "Unknown",
|
|
13
|
+
:servicechecks => [ "" ],
|
|
14
|
+
:save => true,
|
|
15
|
+
:replace => false
|
|
16
|
+
}.update options
|
|
17
|
+
|
|
18
|
+
@opsview = opsview
|
|
19
|
+
@resource_type = @options[:type]
|
|
20
|
+
|
|
21
|
+
@options[:servicechecks] = @options[:servicechecks].map { |x| { "name" => x } }
|
|
22
|
+
|
|
23
|
+
save(@options[:replace]) if @options[:save]
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
require 'opsview_rest/mixin'
|
|
2
|
+
|
|
3
|
+
class OpsviewRest
|
|
4
|
+
class Timeperiod
|
|
5
|
+
|
|
6
|
+
include OpsviewRest::Mixin
|
|
7
|
+
|
|
8
|
+
attr_accessor :options, :opsview, :resource_type
|
|
9
|
+
|
|
10
|
+
def initialize(opsview, options = {})
|
|
11
|
+
@options = {
|
|
12
|
+
:name => "nonworkhours",
|
|
13
|
+
:monday => "00:00-09:00,17:00-24:00",
|
|
14
|
+
:tuesday => "00:00-09:00,17:00-24:00",
|
|
15
|
+
:wednesday => "00:00-09:00,17:00-24:00",
|
|
16
|
+
:thursday => "00:00-09:00,17:00-24:00",
|
|
17
|
+
:friday => "00:00-09:00,17:00-24:00",
|
|
18
|
+
:saturday => "00:00-24:00",
|
|
19
|
+
:sunday => "00:00-24:00",
|
|
20
|
+
:servicecheck_notification_periods => [],
|
|
21
|
+
:servicecheck_check_periods => [],
|
|
22
|
+
:host_check_periods => [],
|
|
23
|
+
:alias => "Non-work hours",
|
|
24
|
+
:host_notification_periods => [],
|
|
25
|
+
:save => true,
|
|
26
|
+
:replace => false
|
|
27
|
+
}.update options
|
|
28
|
+
|
|
29
|
+
@opsview = opsview
|
|
30
|
+
@resource_type = @options[:type]
|
|
31
|
+
|
|
32
|
+
@option[:servicecheck_notification_periods] = @option[:servicecheck_notification_periods].map { |x| { "name" => x } }
|
|
33
|
+
@option[:servicecheck_check_periods] = @option[:servicecheck_check_periods].map { |x| { "name" => x } }
|
|
34
|
+
@option[:host_check_periods] = @option[:host_check_periods].map { |x| { "name" => x } }
|
|
35
|
+
@option[:host_notification_periods] = @option[:host_notification_periods].map { |x| { "name" => x } }
|
|
36
|
+
|
|
37
|
+
save(@options[:replace]) if @options[:save]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
end
|
|
41
|
+
end
|
data/lib/opsview_rest.rb
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
require 'rest-client'
|
|
2
|
+
require 'json'
|
|
3
|
+
|
|
4
|
+
class OpsviewRest
|
|
5
|
+
|
|
6
|
+
attr_accessor :url, :username, :password, :rest
|
|
7
|
+
|
|
8
|
+
def initialize(url, options = {})
|
|
9
|
+
options = {
|
|
10
|
+
:username => "api",
|
|
11
|
+
:password => "changeme",
|
|
12
|
+
:connect => true
|
|
13
|
+
}.update options
|
|
14
|
+
|
|
15
|
+
@url = url
|
|
16
|
+
@username = options[:username]
|
|
17
|
+
@password = options[:password]
|
|
18
|
+
@rest = RestClient::Resource.new("#{@url}/rest/", :headers => { :content_type => 'application/json' })
|
|
19
|
+
|
|
20
|
+
login if options[:connect]
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def login
|
|
24
|
+
response = post('login', { 'username' => @username, 'password' => @password })
|
|
25
|
+
@rest.headers[:x_opsview_token] = response['token']
|
|
26
|
+
@rest.headers[:x_opsview_username] = @username
|
|
27
|
+
response
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def logout
|
|
31
|
+
delete('login')
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def create(options = {})
|
|
35
|
+
case options[:type]
|
|
36
|
+
when :attribute
|
|
37
|
+
require 'opsview_rest/attribute'
|
|
38
|
+
OpsviewRest::Attribute.new(self, options)
|
|
39
|
+
when :contact
|
|
40
|
+
require 'opsview_rest/contact'
|
|
41
|
+
OpsviewRest::Contact.new(self, options)
|
|
42
|
+
when :host
|
|
43
|
+
require 'opsview_rest/host'
|
|
44
|
+
OpsviewRest::Host.new(self, options)
|
|
45
|
+
when :hostcheckcommand
|
|
46
|
+
require 'opsview_rest/hostcheckcommand'
|
|
47
|
+
OpsviewRest::Hostcheckcommand.new(self, options)
|
|
48
|
+
when :hostgroup
|
|
49
|
+
require 'opsview_rest/hostgroup'
|
|
50
|
+
OpsviewRest::Hostgroup.new(self, options)
|
|
51
|
+
when :hosttemplate
|
|
52
|
+
require 'opsview_rest/hosttemplate'
|
|
53
|
+
OpsviewRest::Hosttemplate.new(self, options)
|
|
54
|
+
when :keyword
|
|
55
|
+
require 'opsview_rest/keyword'
|
|
56
|
+
OpsviewRest::Keyword.new(self, options)
|
|
57
|
+
when :monitoring_server
|
|
58
|
+
require 'opsview_rest/monitoring_server'
|
|
59
|
+
OpsviewRest::MonitoringServer.new(self, options)
|
|
60
|
+
when :notification_method
|
|
61
|
+
require 'opsview_rest/notification_method'
|
|
62
|
+
OpsviewRest::NotificationMethod.new(self, options)
|
|
63
|
+
when :role
|
|
64
|
+
require 'opsview_rest/role'
|
|
65
|
+
OpsviewRest::Role.new(self, options)
|
|
66
|
+
when :servicecheck
|
|
67
|
+
require 'opsview_rest/servicecheck'
|
|
68
|
+
OpsviewRest::Servicecheck.new(self, options)
|
|
69
|
+
when :servicegroup
|
|
70
|
+
require 'opsview_rest/servicegroup'
|
|
71
|
+
OpsviewRest::Servicegroup.new(self, options)
|
|
72
|
+
when :timeperiod
|
|
73
|
+
require 'opsview_rest/timeperiod'
|
|
74
|
+
OpsviewRest::Timeperiod.new(self, options)
|
|
75
|
+
else
|
|
76
|
+
raise "Type not implemented yet."
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def list(options = {})
|
|
81
|
+
options = {
|
|
82
|
+
:type => "host",
|
|
83
|
+
:rows => "all"
|
|
84
|
+
}.update options
|
|
85
|
+
|
|
86
|
+
get("config/#{options[:type]}?rows=#{options[:rows]}")
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def reload
|
|
90
|
+
get("reload")
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def find(options = {})
|
|
94
|
+
options = {
|
|
95
|
+
:type => "host",
|
|
96
|
+
:rows => "all",
|
|
97
|
+
:name => nil
|
|
98
|
+
}.update options
|
|
99
|
+
|
|
100
|
+
if options[:name].nil?
|
|
101
|
+
raise ArgumentError, "Need to specify the name of the object."
|
|
102
|
+
else
|
|
103
|
+
get("config/#{options[:type]}?s.name=#{options[:name]}?rows=#{options[:rows]}")
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
def purge(options = {})
|
|
108
|
+
options = {
|
|
109
|
+
:type => "host",
|
|
110
|
+
:name => nil
|
|
111
|
+
}.update options
|
|
112
|
+
|
|
113
|
+
if options[:name].nil?
|
|
114
|
+
raise ArgumentError, "Need to specify the name of the object."
|
|
115
|
+
else
|
|
116
|
+
id = find(:type => options[:type], :name => options[:name])[0]["id"]
|
|
117
|
+
delete("config/#{options[:type]}/#{id}")
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def get(path_part, additional_headers = {}, &block)
|
|
122
|
+
api_request { @rest[path_part].get(additional_headers, &block) }
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def delete(path_part, additional_headers = {}, &block)
|
|
126
|
+
api_request { @rest[path_part].delete(additional_headers, &block) }
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
def post(path_part, payload, additional_headers = {}, &block)
|
|
130
|
+
api_request { @rest[path_part].post(payload.to_json, additional_headers, &block) }
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
def put(path_part, payload, additional_headers = {}, &block)
|
|
134
|
+
api_request { @rest[path_part].put(payload.to_json, additional_headers, &block) }
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
def api_request(&block)
|
|
138
|
+
response_body = begin
|
|
139
|
+
response = block.call
|
|
140
|
+
response.body
|
|
141
|
+
rescue RestClient::Exception => e
|
|
142
|
+
puts "I have #{e.inspect} with #{e.http_code}"
|
|
143
|
+
if e.http_code == 307
|
|
144
|
+
get(e.response)
|
|
145
|
+
end
|
|
146
|
+
e.response
|
|
147
|
+
end
|
|
148
|
+
parse_response(JSON.parse(response_body))
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
def parse_response(response)
|
|
152
|
+
# We've got an error if there's "message" and "detail" fields
|
|
153
|
+
# in the response
|
|
154
|
+
if response["message"] and response["detail"]
|
|
155
|
+
raise Opsview::Exceptions::RequestFailed, "Request failed: #{response["message"]}, detail: #{response["detail"]}"
|
|
156
|
+
# If we have a token, return that:
|
|
157
|
+
elsif response["token"]
|
|
158
|
+
response
|
|
159
|
+
# If we have a list of objects, return the list:
|
|
160
|
+
elsif response["list"]
|
|
161
|
+
response["list"]
|
|
162
|
+
else
|
|
163
|
+
response["object"]
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |gem|
|
|
6
|
+
gem.name = "opsview_rest"
|
|
7
|
+
gem.summary = %Q{Opsview REST API library}
|
|
8
|
+
gem.description = %Q{Update configuration on Opsview server via REST API}
|
|
9
|
+
gem.email = "christian.paredes@seattlebiomed.org"
|
|
10
|
+
gem.homepage = "http://github.com/cparedes/opsview_rest"
|
|
11
|
+
gem.authors = ["Christian Paredes"]
|
|
12
|
+
gem.license = 'Apache'
|
|
13
|
+
|
|
14
|
+
gem.files = `git ls-files`.split($/)
|
|
15
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
|
16
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
|
17
|
+
gem.require_paths = ['lib']
|
|
18
|
+
|
|
19
|
+
gem.add_development_dependency "rake", "~> 10.1.1"
|
|
20
|
+
gem.add_development_dependency "rspec", "~> 2.14.1"
|
|
21
|
+
gem.add_development_dependency "yard", "~> 0.8.7.3"
|
|
22
|
+
gem.add_development_dependency "webmock", "~> 1.11.0"
|
|
23
|
+
|
|
24
|
+
gem.add_dependency 'json', '~> 1.6.1'
|
|
25
|
+
gem.add_dependency 'rest-client', '~> 1.6.6'
|
|
26
|
+
|
|
27
|
+
gem.version = '0.4.0'
|
|
28
|
+
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"summary":{"page":"1","totalrows":"1","allrows":"1","totalpages":"1","rows":"1"},"list":[{"hosttemplates":[{"ref":"/rest/config/hosttemplate/28","name":"Network - Base"},{"ref":"/rest/config/hosttemplate/58","name":"OS - Unix Base"},{"ref":"/rest/config/hosttemplate/15","name":"Application - Opsview Common"},{"ref":"/rest/config/hosttemplate/16","name":"Application - Opsview Master"}],"snmpv3_privprotocol":null,"flap_detection_enabled":"1","keywords":[{"ref":"/rest/config/keyword/2","name":"opsview"},{"ref":"/rest/config/keyword/1","name":"opsview-components"}],"check_period":{"ref":"/rest/config/timeperiod/1","name":"24x7"},"hostattributes":[{"arg2":null,"arg1":null,"arg4":null,"value":"/","arg3":null,"name":"DISK"}],"id":"1","notification_period":{"ref":"/rest/config/timeperiod/1","name":"24x7"},"ref":"/rest/config/host/1","notification_options":"u,d,r","tidy_ifdescr_level":"0","name":"opsview","rancid_vendor":null,"snmp_community":"public","hostgroup":{"ref":"/rest/config/hostgroup/2","name":"Monitoring Servers"},"enable_snmp":"0","monitored_by":{"ref":"/rest/config/monitoringserver/1","name":"Master Monitoring Server"},"alias":"Opsview Master Server","parents":[],"uncommitted":"0","icon":{"name":"LOGO - Opsview","path":"/images/logos/opsview_small.png"},"retry_check_interval":"1","ip":"localhost","event_handler":"","use_mrtg":"0","snmp_max_msg_size":"0","servicechecks":[],"use_rancid":"0","snmp_version":"2c","snmpv3_authpassword":"","nmis_node_type":"router","snmp_extended_throughput_data":"0","use_nmis":"0","rancid_connection_type":"ssh","snmpv3_authprotocol":null,"rancid_username":null,"check_command":{"ref":"/rest/config/hostcheckcommand/15","name":"ping"},"rancid_password":null,"check_attempts":"2","check_interval":"5","notification_interval":"60","snmpv3_privpassword":"","snmpv3_username":"","snmp_port":"161","other_addresses":""}]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"summary":{"page":"1","totalrows":"65","allrows":"65","totalpages":"2","rows":"50"},"list":[{"hosts":[],"ref":"/rest/config/hosttemplate/2","name":"Application - Apache HTTP Server","id":"2","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/2","name":"Apache accesses","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/3","name":"Apache active sessions","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/4","name":"Apache bytes per request","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/5","name":"Apache current requests","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/6","name":"Apache idle workers","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/7","name":"Apache requests per second","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/8","name":"Apache shared memory","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/9","name":"Apache traffic","timed_exception":null}],"description":"Host template for all Apache servers","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/3","name":"Application - Apache Tomcat","id":"3","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/10","name":"Apache Tomcat Manager","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/11","name":"Apache Tomcat Status","timed_exception":null}],"description":"Apache Tomcat","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/4","name":"Application - Atlassian","id":"4","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/12","name":"JIRA Status","timed_exception":null}],"description":"Atlassian application checks","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/5","name":"Application - HTTP","id":"5","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/13","name":"HTTP","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/14","name":"HTTP / SSL","timed_exception":null}],"description":"Basic HTTP checks","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/6","name":"Application - JasperReports","id":"6","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/15","name":"JasperServer Process","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/16","name":"JasperServer Status","timed_exception":null}],"description":"JasperReports / JasperServer application checks","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/7","name":"Application - JBoss","id":"7","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/17","name":"JBoss JMX - WEBAPPNAME","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/18","name":"JBoss Status","timed_exception":null}],"description":"JBoss application server checks","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/8","name":"Application - Lotus Domino","id":"8","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/19","name":"Lotus Domino","timed_exception":null}],"description":"Lotus Domino","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/9","name":"Application - Microsoft Active Directory","id":"9","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/20","name":"MS Active Directory","timed_exception":null}],"description":"Microsoft Active Directory","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/10","name":"Application - Microsoft Exchange","id":"10","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/21","name":"Largest Delivery Queue Length","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/22","name":"Microsoft Exchange IMAP service","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/23","name":"Microsoft Exchange Information Store","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/24","name":"Microsoft Exchange Mail Submission","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/25","name":"Microsoft Exchange POP3 service","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/26","name":"Retry Mailbox Delivery Queue Length","timed_exception":null}],"description":"Microsoft Exchange","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/11","name":"Application - Microsoft IIS","id":"11","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/27","name":"IIS Admin Service","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/28","name":"IIS Service","timed_exception":null}],"description":"Basic IIS web server checks","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/12","name":"Application - Microsoft SQL Server","id":"12","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/29","name":"MS SQL Agent Service","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/30","name":"MS SQL Browser","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/31","name":"MS SQL Server Listener","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/32","name":"MS SQL Server Service","timed_exception":null}],"description":"Microsoft SQL Server","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/14","name":"Application - OpenSim","id":"14","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/38","name":"OpenSim - Mono CPU utilisation","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/39","name":"OpenSim - Mono resident memory utilisation","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/40","name":"OpenSim - Server status","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/41","name":"OpenSim - Simulator 1","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/42","name":"OpenSim - Simulator 2","timed_exception":null}],"description":"OpenSimulator core / standalone server checks","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/13","name":"Application - OpenSim Grid","id":"13","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/33","name":"OpenSim - Grid Asset Services","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/34","name":"OpenSim - Grid Inventory Services","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/35","name":"OpenSim - Grid Messaging Server","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/36","name":"OpenSim - Grid Server","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/37","name":"OpenSim - Grid User Services","timed_exception":null}],"description":"OpenSimulator Grid services","managementurls":[],"uncommitted":"0"},{"hosts":[{"ref":"/rest/config/host/1","name":"opsview"}],"ref":"/rest/config/hosttemplate/15","name":"Application - Opsview Common","id":"15","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/43","name":"Nagios Core Processes","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/44","name":"Nagios Core Startup","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/45","name":"Nagios Core Stats","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/1","name":"Opsview Agent","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/47","name":"Opsview Housekeeping Cronjob Monitor","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/46","name":"Opsview HTTP","timed_exception":null}],"description":"Opsview application monitors for Opsview Master or Slaves","managementurls":[],"uncommitted":"0"},{"hosts":[{"ref":"/rest/config/host/1","name":"opsview"}],"ref":"/rest/config/hosttemplate/16","name":"Application - Opsview Master","id":"16","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/48","name":"Defunct ndo2db Processes","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/49","name":"Opsview Application Processes","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/50","name":"Opsview Application Server","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/51","name":"Opsview Application Status","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/55","name":"Opsview Daemon","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/52","name":"Opsview DB Connections","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/53","name":"Opsview DB Performance","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/54","name":"Opsview DB Status","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/56","name":"Opsview Graphing Import","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/57","name":"Opsview Housekeeping Monitor","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/58","name":"Opsview Login","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/59","name":"Opsview NDO","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/60","name":"Opsview Updates","timed_exception":null}],"description":"Opsview application monitors for Opsview Master","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/17","name":"Application - WebLogic","id":"17","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/61","name":"WebLogic - App sessions","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/62","name":"WebLogic - Cluster servers","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/63","name":"WebLogic - JDBC capacity","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/64","name":"WebLogic - JDBC connections","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/65","name":"WebLogic - JMS queue length","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/66","name":"WebLogic - Server memory utilisation","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/67","name":"WebLogic - Server status","timed_exception":null}],"description":"","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/18","name":"Application - Wordpress","id":"18","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/68","name":"Wordpress Admin","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/69","name":"Wordpress Public","timed_exception":null}],"description":"Wordpress","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/19","name":"Business - SLA Monitors","id":"19","servicechecks":[],"description":"Service Level monitor providing availability statistics (previous 7 days)","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/20","name":"Database - DB2","id":"20","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/70","name":"IBM DB2","timed_exception":null}],"description":"DB2","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/21","name":"Database - MySQL Server","id":"21","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/71","name":"MySQL Aborted connects","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/72","name":"MySQL Bytes received","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/73","name":"MySQL Bytes sent","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/74","name":"MySQL Connections","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/75","name":"MySQL DB Listener","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/76","name":"MySQL DB Processes","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/77","name":"MySQL Delayed errors","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/78","name":"MySQL InnoDB Log Pending FSyncs","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/79","name":"MySQL InnoDB Log Pending Writes","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/80","name":"MySQL InnoDB Pending Writes","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/81","name":"MySQL InnoDB Waits","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/82","name":"MySQL Key blocks not flushed","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/83","name":"MySQL Key blocks unused","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/84","name":"MySQL Key blocks used","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/85","name":"MySQL Key read requests","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/86","name":"MySQL Key reads","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/87","name":"MySQL Key write requests","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/88","name":"MySQL Key writes","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/89","name":"MySQL Low memory prunes","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/90","name":"MySQL Max used connections","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/91","name":"MySQL Open Files","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/92","name":"MySQL Open streams","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/93","name":"MySQL Open tables","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/94","name":"MySQL Qcache free blocks","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/95","name":"MySQL Qcache free memory","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/96","name":"MySQL Qcache hits","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/97","name":"MySQL Qcache inserts","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/98","name":"MySQL Qcache not cached","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/99","name":"MySQL Qcache queries incache","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/100","name":"MySQL Qcache total blocks","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/106","name":"MySQL Slave open temp tables","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/107","name":"MySQL Slave retried transactions","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/101","name":"MySQL SSL Renegotiates","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/102","name":"MySQL SSL Session cache hits","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/103","name":"MySQL SSL Session cache misses","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/104","name":"MySQL SSL Session cache overflows","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/105","name":"MySQL SSL Session cache timeouts","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/108","name":"MySQL Threads connected","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/109","name":"MySQL Threads running","timed_exception":null}],"description":"New MySQL host template with advanced monitoring","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/22","name":"Database - Oracle","id":"22","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/110","name":"Oracle Database Query","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/111","name":"Oracle Listener","timed_exception":null}],"description":"Oracle Database Checks","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/23","name":"Database - PostgreSQL","id":"23","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/112","name":"PostgreSQL Database Query","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/113","name":"PostgreSQL Listener","timed_exception":null}],"description":"PostgreSQL Database Checks","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/24","name":"Infrastructure - APC","id":"24","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/115","name":"APC external temperature probe","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/114","name":"APC UPS Status","timed_exception":null}],"description":"APC","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/25","name":"Infrastructure - Netbotz","id":"25","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/116","name":"Netbotz - Humidity","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/117","name":"Netbotz - Temperature","timed_exception":null}],"description":"Netbotz","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/26","name":"Infrastructure - Sensatronics","id":"26","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/118","name":"Sensatronics - Temperature","timed_exception":null}],"description":"Sensatronics","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/27","name":"Management - Puppet","id":"27","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/119","name":"Puppet status","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/120","name":"Puppetmaster status","timed_exception":null}],"description":"Puppet","managementurls":[],"uncommitted":"0"},{"hosts":[{"ref":"/rest/config/host/1","name":"opsview"}],"ref":"/rest/config/hosttemplate/28","name":"Network - Base","id":"28","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/121","name":"Connectivity - LAN","timed_exception":null}],"description":"Basic network checks","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/30","name":"Network - Cisco","id":"30","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/125","name":"Cisco CPU load","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/126","name":"Cisco memory utilisation","timed_exception":null}],"description":"Cisco SNMP checks","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/29","name":"Network - Cisco Advanced","id":"29","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/122","name":"Cisco - 5 min throughput","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/123","name":"Cisco - BGP Peer","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/124","name":"Cisco ASA - HA status","timed_exception":null}],"description":"Network - Cisco Advanced checks","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/31","name":"Network - Foundry","id":"31","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/127","name":"Foundry CPU utilisation","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/128","name":"Foundry memory utilisation","timed_exception":null}],"description":"Foundry SNMP checks","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/32","name":"Network - Juniper","id":"32","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/129","name":"Juniper Netscreen - Active connections","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/130","name":"Juniper Netscreen - CPU utilisation","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/131","name":"Juniper Netscreen - Memory utilisation","timed_exception":null}],"description":"Network - Juniper checks","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/33","name":"Network - Linksys Wireless","id":"33","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/132","name":"Linksys Wireless AP","timed_exception":null}],"description":"Linksys Wireless","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/34","name":"Network - NetScaler","id":"34","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/134","name":"NetScaler - Client connections","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/133","name":"NetScaler - CPU utilisation","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/135","name":"NetScaler - Memory utilisation","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/136","name":"NetScaler - Server connections","timed_exception":null}],"description":"Network - NetScaler checks","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/53","name":"Network - VPN","id":"53","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/162","name":"Connectivity - VPN","timed_exception":null}],"description":"VPN","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/54","name":"Network - WAN","id":"54","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/163","name":"Connectivity - WAN","timed_exception":null}],"description":"WAN","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/35","name":"Network Services - CORBA","id":"35","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/137","name":"CORBA","timed_exception":null}],"description":"CORBA","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/36","name":"Network Services - DHCP","id":"36","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/138","name":"DHCP","timed_exception":null}],"description":"DHCP","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/37","name":"Network Services - DNS","id":"37","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/139","name":"DNS A record check","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/140","name":"DNS service","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/141","name":"DNS zone check","timed_exception":null}],"description":"DNS service status","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/38","name":"Network Services - Email","id":"38","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/142","name":"DNS blacklist check","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/143","name":"IMAP4","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/144","name":"POP3","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/145","name":"SMTP","timed_exception":null}],"description":"Email services status","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/39","name":"Network Services - FTP","id":"39","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/146","name":"FTP","timed_exception":null}],"description":"FTP","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/40","name":"Network Services - IIOP","id":"40","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/147","name":"IIOP","timed_exception":null}],"description":"IIOP","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/41","name":"Network Services - Jabber","id":"41","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/148","name":"Jabber","timed_exception":null}],"description":"Jabber","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/42","name":"Network Services - Kerberos","id":"42","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/149","name":"Kerberos","timed_exception":null}],"description":"Kerberos","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/43","name":"Network Services - LDAP","id":"43","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/150","name":"LDAP","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/151","name":"LDAP Replication","timed_exception":null}],"description":"LDAP service status","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/44","name":"Network Services - NFS","id":"44","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/152","name":"NFS","timed_exception":null}],"description":"NFS","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/45","name":"Network Services - NNTP","id":"45","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/153","name":"NNTP","timed_exception":null}],"description":"NNTP","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/46","name":"Network Services - NTP","id":"46","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/154","name":"NTP Server","timed_exception":null}],"description":"NTP","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/47","name":"Network Services - RADIUS","id":"47","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/155","name":"RADIUS","timed_exception":null}],"description":"RADIUS","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/48","name":"Network Services - SSH","id":"48","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/156","name":"SSH","timed_exception":null},{"exception":null,"ref":"/rest/config/servicecheck/157","name":"SSH processes","timed_exception":null}],"description":"SSH","managementurls":[],"uncommitted":"0"},{"hosts":[],"ref":"/rest/config/hosttemplate/49","name":"Network Services - TACACS","id":"49","servicechecks":[{"exception":null,"ref":"/rest/config/servicecheck/158","name":"TACACS","timed_exception":null}],"description":"TACACS","managementurls":[],"uncommitted":"0"}]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"token":"88dffa0974c364e56431697f257564fb1524b029"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"messages":[],"average_duration":"10","lastupdated":"1389803262","server_status":"0","auditlog_entries":"0","configuration_status":"uptodate"}
|