Module: Icinga2::Actions

Included in:
Client
Defined in:
lib/icinga2/actions.rb

Overview

namespace for action handling

There are several actions available for Icinga 2 provided by the /v1/actions URL endpoint.

original API Documentation: www.icinga.com/docs/icinga2/latest/doc/12-icinga2-api/#actions

Instance Method Summary collapse

Instance Method Details

#restart_processHash

Restarts Icinga2.

Examples:

restart_process

Returns:



138
139
140
141
142
143
144
# File 'lib/icinga2/actions.rb', line 138

def restart_process
  post(
    url: format('%s/actions/restart-process', @icinga_api_url_base),
    headers: @headers,
    options: @options
  )
end

#shutdown_processHash

Shuts down Icinga2.

Examples:

shutdown_process

Returns:



123
124
125
126
127
128
129
# File 'lib/icinga2/actions.rb', line 123

def shutdown_process
  post(
    url: format('%s/actions/shutdown-process', @icinga_api_url_base),
    headers: @headers,
    options: @options
  )
end