Class: OPNsenseAPI::Core::Monit::Settings

Inherits:
Object
  • Object
show all
Includes:
OPNsenseAPI::Core
Defined in:
lib/opnsense_api/core/monit/settings.rb

Overview

Constant Summary collapse

BASE_PATH =
'/monit/settings'

Instance Method Summary collapse

Methods included from OPNsenseAPI::Core

#initialize

Instance Method Details

#add_alert(body = {}) ⇒ Object



27
28
29
# File 'lib/opnsense_api/core/monit/settings.rb', line 27

def add_alert(body = {})
  @client.post("#{BASE_PATH}/addAlert", body)
end

#add_service(body = {}) ⇒ Object



31
32
33
# File 'lib/opnsense_api/core/monit/settings.rb', line 31

def add_service(body = {})
  @client.post("#{BASE_PATH}/addService", body)
end

#add_test(body = {}) ⇒ Object



35
36
37
# File 'lib/opnsense_api/core/monit/settings.rb', line 35

def add_test(body = {})
  @client.post("#{BASE_PATH}/addTest", body)
end

#del_alert(body = {}, uuid:) ⇒ Object



39
40
41
# File 'lib/opnsense_api/core/monit/settings.rb', line 39

def del_alert(body = {}, uuid:)
  @client.post("#{BASE_PATH}/delAlert/#{uuid}", body)
end

#del_service(body = {}, uuid:) ⇒ Object



43
44
45
# File 'lib/opnsense_api/core/monit/settings.rb', line 43

def del_service(body = {}, uuid:)
  @client.post("#{BASE_PATH}/delService/#{uuid}", body)
end

#del_test(body = {}, uuid:) ⇒ Object



47
48
49
# File 'lib/opnsense_api/core/monit/settings.rb', line 47

def del_test(body = {}, uuid:)
  @client.post("#{BASE_PATH}/delTest/#{uuid}", body)
end

#dirty(params = {}) ⇒ Object



51
52
53
# File 'lib/opnsense_api/core/monit/settings.rb', line 51

def dirty(params = {})
  @client.get("#{BASE_PATH}/dirty", params)
end

#get(params = {}) ⇒ Object



55
56
57
# File 'lib/opnsense_api/core/monit/settings.rb', line 55

def get(params = {})
  @client.get("#{BASE_PATH}/get", params)
end

#get_alert(params = {}, uuid: nil) ⇒ Object



59
60
61
# File 'lib/opnsense_api/core/monit/settings.rb', line 59

def get_alert(params = {}, uuid: nil)
  @client.get("#{BASE_PATH}/getAlert/#{uuid}", params)
end

#get_general(params = {}) ⇒ Object



63
64
65
# File 'lib/opnsense_api/core/monit/settings.rb', line 63

def get_general(params = {})
  @client.get("#{BASE_PATH}/getGeneral", params)
end

#get_service(params = {}, uuid: nil) ⇒ Object



67
68
69
# File 'lib/opnsense_api/core/monit/settings.rb', line 67

def get_service(params = {}, uuid: nil)
  @client.get("#{BASE_PATH}/getService/#{uuid}", params)
end

#get_test(params = {}, uuid: nil) ⇒ Object



71
72
73
# File 'lib/opnsense_api/core/monit/settings.rb', line 71

def get_test(params = {}, uuid: nil)
  @client.get("#{BASE_PATH}/getTest/#{uuid}", params)
end

#search_alert(body = {}) ⇒ Object



75
76
77
# File 'lib/opnsense_api/core/monit/settings.rb', line 75

def search_alert(body = {})
  @client.post("#{BASE_PATH}/searchAlert", body)
end

#search_service(body = {}) ⇒ Object



79
80
81
# File 'lib/opnsense_api/core/monit/settings.rb', line 79

def search_service(body = {})
  @client.post("#{BASE_PATH}/searchService", body)
end

#search_test(body = {}) ⇒ Object



83
84
85
# File 'lib/opnsense_api/core/monit/settings.rb', line 83

def search_test(body = {})
  @client.post("#{BASE_PATH}/searchTest", body)
end

#set(body = {}) ⇒ Object



87
88
89
# File 'lib/opnsense_api/core/monit/settings.rb', line 87

def set(body = {})
  @client.post("#{BASE_PATH}/set", body)
end

#set_alert(body = {}, uuid:) ⇒ Object



91
92
93
# File 'lib/opnsense_api/core/monit/settings.rb', line 91

def set_alert(body = {}, uuid:)
  @client.post("#{BASE_PATH}/setAlert/#{uuid}", body)
end

#set_service(body = {}, uuid:) ⇒ Object



95
96
97
# File 'lib/opnsense_api/core/monit/settings.rb', line 95

def set_service(body = {}, uuid:)
  @client.post("#{BASE_PATH}/setService/#{uuid}", body)
end

#set_test(body = {}, uuid:) ⇒ Object



99
100
101
# File 'lib/opnsense_api/core/monit/settings.rb', line 99

def set_test(body = {}, uuid:)
  @client.post("#{BASE_PATH}/setTest/#{uuid}", body)
end

#toggle_alert(body = {}, uuid:, enabled: nil) ⇒ Object



103
104
105
# File 'lib/opnsense_api/core/monit/settings.rb', line 103

def toggle_alert(body = {}, uuid:, enabled: nil)
  @client.post("#{BASE_PATH}/toggleAlert/#{uuid}/#{enabled}", body)
end

#toggle_service(body = {}, uuid:, enabled: nil) ⇒ Object



107
108
109
# File 'lib/opnsense_api/core/monit/settings.rb', line 107

def toggle_service(body = {}, uuid:, enabled: nil)
  @client.post("#{BASE_PATH}/toggleService/#{uuid}/#{enabled}", body)
end