Class: Algolia::MonitoringClient
- Inherits:
-
Object
- Object
- Algolia::MonitoringClient
- Defined in:
- lib/algolia/api/monitoring_client.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Class Method Summary collapse
Instance Method Summary collapse
-
#custom_delete(path, parameters = nil, request_options = {}) ⇒ Object
Send requests to the Algolia REST API.
-
#custom_delete_with_http_info(path, parameters = nil, request_options = {}) ⇒ Http::Response
Send requests to the Algolia REST API.
-
#custom_get(path, parameters = nil, request_options = {}) ⇒ Object
Send requests to the Algolia REST API.
-
#custom_get_with_http_info(path, parameters = nil, request_options = {}) ⇒ Http::Response
Send requests to the Algolia REST API.
-
#custom_post(path, parameters = nil, body = nil, request_options = {}) ⇒ Object
Send requests to the Algolia REST API.
-
#custom_post_with_http_info(path, parameters = nil, body = nil, request_options = {}) ⇒ Http::Response
Send requests to the Algolia REST API.
-
#custom_put(path, parameters = nil, body = nil, request_options = {}) ⇒ Object
Send requests to the Algolia REST API.
-
#custom_put_with_http_info(path, parameters = nil, body = nil, request_options = {}) ⇒ Http::Response
Send requests to the Algolia REST API.
-
#get_cluster_incidents(clusters, request_options = {}) ⇒ IncidentsResponse
List incidents for selected clusters.
-
#get_cluster_incidents_with_http_info(clusters, request_options = {}) ⇒ Http::Response
List incidents for selected clusters.
-
#get_cluster_status(clusters, request_options = {}) ⇒ StatusResponse
List statuses of selected clusters.
-
#get_cluster_status_with_http_info(clusters, request_options = {}) ⇒ Http::Response
List statuses of selected clusters.
-
#get_incidents(request_options = {}) ⇒ IncidentsResponse
List incidents.
-
#get_incidents_with_http_info(request_options = {}) ⇒ Http::Response
List incidents.
-
#get_indexing_time(clusters, request_options = {}) ⇒ IndexingTimeResponse
Get indexing times.
-
#get_indexing_time_with_http_info(clusters, request_options = {}) ⇒ Http::Response
Get indexing times.
-
#get_inventory(request_options = {}) ⇒ InventoryResponse
List servers.
-
#get_inventory_with_http_info(request_options = {}) ⇒ Http::Response
List servers.
-
#get_latency(clusters, request_options = {}) ⇒ LatencyResponse
Get search latency times.
-
#get_latency_with_http_info(clusters, request_options = {}) ⇒ Http::Response
Get search latency times.
-
#get_metrics(metric, period, request_options = {}) ⇒ InfrastructureResponse
Get metrics for a given period.
-
#get_metrics_with_http_info(metric, period, request_options = {}) ⇒ Http::Response
Get metrics for a given period.
-
#get_reachability(clusters, request_options = {}) ⇒ Hash<String, Hash>
Test the reachability of clusters.
-
#get_reachability_with_http_info(clusters, request_options = {}) ⇒ Http::Response
Test the reachability of clusters.
-
#get_status(request_options = {}) ⇒ StatusResponse
List cluster statuses.
-
#get_status_with_http_info(request_options = {}) ⇒ Http::Response
List cluster statuses.
-
#initialize(config = nil) ⇒ MonitoringClient
constructor
A new instance of MonitoringClient.
Constructor Details
#initialize(config = nil) ⇒ MonitoringClient
Returns a new instance of MonitoringClient.
7 8 9 10 11 12 13 |
# File 'lib/algolia/api/monitoring_client.rb', line 7 def initialize(config = nil) raise '`config` is missing.' if config.nil? raise '`app_id` is missing.' if config.app_id.nil? || config.app_id == '' raise '`api_key` is missing.' if config.api_key.nil? || config.api_key == '' @api_client = Algolia::ApiClient.new(config) end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
5 6 7 |
# File 'lib/algolia/api/monitoring_client.rb', line 5 def api_client @api_client end |
Class Method Details
.create(app_id, api_key, opts = {}) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/algolia/api/monitoring_client.rb', line 15 def self.create(app_id, api_key, opts = {}) hosts = [] hosts << Transport::StatefulHost.new('status.algolia.com', accept: CallType::READ | CallType::WRITE) config = Algolia::Configuration.new(app_id, api_key, hosts, 'Monitoring', opts) create_with_config(config) end |
.create_with_config(config) ⇒ Object
23 24 25 |
# File 'lib/algolia/api/monitoring_client.rb', line 23 def self.create_with_config(config) new(config) end |
Instance Method Details
#custom_delete(path, parameters = nil, request_options = {}) ⇒ Object
Send requests to the Algolia REST API. This method allow you to send requests to the Algolia REST API.
65 66 67 68 |
# File 'lib/algolia/api/monitoring_client.rb', line 65 def custom_delete(path, parameters = nil, = {}) response = custom_delete_with_http_info(path, parameters, ) @api_client.deserialize(response.body, [:debug_return_type] || 'Object') end |
#custom_delete_with_http_info(path, parameters = nil, request_options = {}) ⇒ Http::Response
Send requests to the Algolia REST API. This method allow you to send requests to the Algolia REST API.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/algolia/api/monitoring_client.rb', line 33 def custom_delete_with_http_info(path, parameters = nil, = {}) # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? raise ArgumentError, "Parameter `path` is required when calling `custom_delete`." end path = '/1{path}'.sub('{' + 'path' + '}', path.to_s) query_params = {} query_params = query_params.merge(parameters) unless parameters.nil? query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :'MonitoringClient.custom_delete', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:DELETE, path, ) end |
#custom_get(path, parameters = nil, request_options = {}) ⇒ Object
Send requests to the Algolia REST API. This method allow you to send requests to the Algolia REST API.
108 109 110 111 |
# File 'lib/algolia/api/monitoring_client.rb', line 108 def custom_get(path, parameters = nil, = {}) response = custom_get_with_http_info(path, parameters, ) @api_client.deserialize(response.body, [:debug_return_type] || 'Object') end |
#custom_get_with_http_info(path, parameters = nil, request_options = {}) ⇒ Http::Response
Send requests to the Algolia REST API. This method allow you to send requests to the Algolia REST API.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/algolia/api/monitoring_client.rb', line 76 def custom_get_with_http_info(path, parameters = nil, = {}) # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? raise ArgumentError, "Parameter `path` is required when calling `custom_get`." end path = '/1{path}'.sub('{' + 'path' + '}', path.to_s) query_params = {} query_params = query_params.merge(parameters) unless parameters.nil? query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :'MonitoringClient.custom_get', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#custom_post(path, parameters = nil, body = nil, request_options = {}) ⇒ Object
Send requests to the Algolia REST API. This method allow you to send requests to the Algolia REST API.
153 154 155 156 |
# File 'lib/algolia/api/monitoring_client.rb', line 153 def custom_post(path, parameters = nil, body = nil, = {}) response = custom_post_with_http_info(path, parameters, body, ) @api_client.deserialize(response.body, [:debug_return_type] || 'Object') end |
#custom_post_with_http_info(path, parameters = nil, body = nil, request_options = {}) ⇒ Http::Response
Send requests to the Algolia REST API. This method allow you to send requests to the Algolia REST API.
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/algolia/api/monitoring_client.rb', line 120 def custom_post_with_http_info(path, parameters = nil, body = nil, = {}) # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? raise ArgumentError, "Parameter `path` is required when calling `custom_post`." end path = '/1{path}'.sub('{' + 'path' + '}', path.to_s) query_params = {} query_params = query_params.merge(parameters) unless parameters.nil? query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(body) = .merge( :operation => :'MonitoringClient.custom_post', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:POST, path, ) end |
#custom_put(path, parameters = nil, body = nil, request_options = {}) ⇒ Object
Send requests to the Algolia REST API. This method allow you to send requests to the Algolia REST API.
198 199 200 201 |
# File 'lib/algolia/api/monitoring_client.rb', line 198 def custom_put(path, parameters = nil, body = nil, = {}) response = custom_put_with_http_info(path, parameters, body, ) @api_client.deserialize(response.body, [:debug_return_type] || 'Object') end |
#custom_put_with_http_info(path, parameters = nil, body = nil, request_options = {}) ⇒ Http::Response
Send requests to the Algolia REST API. This method allow you to send requests to the Algolia REST API.
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/algolia/api/monitoring_client.rb', line 165 def custom_put_with_http_info(path, parameters = nil, body = nil, = {}) # verify the required parameter 'path' is set if @api_client.config.client_side_validation && path.nil? raise ArgumentError, "Parameter `path` is required when calling `custom_put`." end path = '/1{path}'.sub('{' + 'path' + '}', path.to_s) query_params = {} query_params = query_params.merge(parameters) unless parameters.nil? query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] || @api_client.object_to_http_body(body) = .merge( :operation => :'MonitoringClient.custom_put', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:PUT, path, ) end |
#get_cluster_incidents(clusters, request_options = {}) ⇒ IncidentsResponse
List incidents for selected clusters. List known incidents for selected clusters.
238 239 240 241 |
# File 'lib/algolia/api/monitoring_client.rb', line 238 def get_cluster_incidents(clusters, = {}) response = get_cluster_incidents_with_http_info(clusters, ) @api_client.deserialize(response.body, [:debug_return_type] || 'Monitoring::IncidentsResponse') end |
#get_cluster_incidents_with_http_info(clusters, request_options = {}) ⇒ Http::Response
List incidents for selected clusters. List known incidents for selected clusters.
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/algolia/api/monitoring_client.rb', line 208 def get_cluster_incidents_with_http_info(clusters, = {}) # verify the required parameter 'clusters' is set if @api_client.config.client_side_validation && clusters.nil? raise ArgumentError, "Parameter `clusters` is required when calling `get_cluster_incidents`." end path = '/1/incidents/{clusters}'.sub('{' + 'clusters' + '}', @api_client.encode_uri(clusters.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :'MonitoringClient.get_cluster_incidents', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_cluster_status(clusters, request_options = {}) ⇒ StatusResponse
List statuses of selected clusters. Report whether a cluster is operational.
278 279 280 281 |
# File 'lib/algolia/api/monitoring_client.rb', line 278 def get_cluster_status(clusters, = {}) response = get_cluster_status_with_http_info(clusters, ) @api_client.deserialize(response.body, [:debug_return_type] || 'Monitoring::StatusResponse') end |
#get_cluster_status_with_http_info(clusters, request_options = {}) ⇒ Http::Response
List statuses of selected clusters. Report whether a cluster is operational.
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/algolia/api/monitoring_client.rb', line 248 def get_cluster_status_with_http_info(clusters, = {}) # verify the required parameter 'clusters' is set if @api_client.config.client_side_validation && clusters.nil? raise ArgumentError, "Parameter `clusters` is required when calling `get_cluster_status`." end path = '/1/status/{clusters}'.sub('{' + 'clusters' + '}', @api_client.encode_uri(clusters.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :'MonitoringClient.get_cluster_status', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_incidents(request_options = {}) ⇒ IncidentsResponse
List incidents. List known incidents for all clusters.
311 312 313 314 |
# File 'lib/algolia/api/monitoring_client.rb', line 311 def get_incidents( = {}) response = get_incidents_with_http_info() @api_client.deserialize(response.body, [:debug_return_type] || 'Monitoring::IncidentsResponse') end |
#get_incidents_with_http_info(request_options = {}) ⇒ Http::Response
List incidents. List known incidents for all clusters.
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 |
# File 'lib/algolia/api/monitoring_client.rb', line 287 def get_incidents_with_http_info( = {}) path = '/1/incidents' query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :'MonitoringClient.get_incidents', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_indexing_time(clusters, request_options = {}) ⇒ IndexingTimeResponse
Get indexing times. List the average times for indexing operations for selected clusters.
351 352 353 354 |
# File 'lib/algolia/api/monitoring_client.rb', line 351 def get_indexing_time(clusters, = {}) response = get_indexing_time_with_http_info(clusters, ) @api_client.deserialize(response.body, [:debug_return_type] || 'Monitoring::IndexingTimeResponse') end |
#get_indexing_time_with_http_info(clusters, request_options = {}) ⇒ Http::Response
Get indexing times. List the average times for indexing operations for selected clusters.
321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 |
# File 'lib/algolia/api/monitoring_client.rb', line 321 def get_indexing_time_with_http_info(clusters, = {}) # verify the required parameter 'clusters' is set if @api_client.config.client_side_validation && clusters.nil? raise ArgumentError, "Parameter `clusters` is required when calling `get_indexing_time`." end path = '/1/indexing/{clusters}'.sub('{' + 'clusters' + '}', @api_client.encode_uri(clusters.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :'MonitoringClient.get_indexing_time', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_inventory(request_options = {}) ⇒ InventoryResponse
List servers. List the servers belonging to clusters. The response depends on whether you authenticate your API request: - With authentication, the response lists the servers assigned to your Algolia application’s cluster. - Without authentication, the response lists the servers for all Algolia clusters.
384 385 386 387 |
# File 'lib/algolia/api/monitoring_client.rb', line 384 def get_inventory( = {}) response = get_inventory_with_http_info() @api_client.deserialize(response.body, [:debug_return_type] || 'Monitoring::InventoryResponse') end |
#get_inventory_with_http_info(request_options = {}) ⇒ Http::Response
List servers. List the servers belonging to clusters. The response depends on whether you authenticate your API request: - With authentication, the response lists the servers assigned to your Algolia application's cluster. - Without authentication, the response lists the servers for all Algolia clusters.
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 |
# File 'lib/algolia/api/monitoring_client.rb', line 360 def get_inventory_with_http_info( = {}) path = '/1/inventory/servers' query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :'MonitoringClient.get_inventory', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_latency(clusters, request_options = {}) ⇒ LatencyResponse
Get search latency times. List the average latency for search requests for selected clusters.
424 425 426 427 |
# File 'lib/algolia/api/monitoring_client.rb', line 424 def get_latency(clusters, = {}) response = get_latency_with_http_info(clusters, ) @api_client.deserialize(response.body, [:debug_return_type] || 'Monitoring::LatencyResponse') end |
#get_latency_with_http_info(clusters, request_options = {}) ⇒ Http::Response
Get search latency times. List the average latency for search requests for selected clusters.
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 |
# File 'lib/algolia/api/monitoring_client.rb', line 394 def get_latency_with_http_info(clusters, = {}) # verify the required parameter 'clusters' is set if @api_client.config.client_side_validation && clusters.nil? raise ArgumentError, "Parameter `clusters` is required when calling `get_latency`." end path = '/1/latency/{clusters}'.sub('{' + 'clusters' + '}', @api_client.encode_uri(clusters.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :'MonitoringClient.get_latency', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_metrics(metric, period, request_options = {}) ⇒ InfrastructureResponse
Get metrics for a given period. Report the aggregate value of a metric for a selected period of time.
471 472 473 474 |
# File 'lib/algolia/api/monitoring_client.rb', line 471 def get_metrics(metric, period, = {}) response = get_metrics_with_http_info(metric, period, ) @api_client.deserialize(response.body, [:debug_return_type] || 'Monitoring::InfrastructureResponse') end |
#get_metrics_with_http_info(metric, period, request_options = {}) ⇒ Http::Response
Get metrics for a given period. Report the aggregate value of a metric for a selected period of time.
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 |
# File 'lib/algolia/api/monitoring_client.rb', line 435 def get_metrics_with_http_info(metric, period, = {}) # verify the required parameter 'metric' is set if @api_client.config.client_side_validation && metric.nil? raise ArgumentError, "Parameter `metric` is required when calling `get_metrics`." end # verify the required parameter 'period' is set if @api_client.config.client_side_validation && period.nil? raise ArgumentError, "Parameter `period` is required when calling `get_metrics`." end path = '/1/infrastructure/{metric}/period/{period}'.sub('{' + 'metric' + '}', @api_client.encode_uri(metric.to_s)).sub('{' + 'period' + '}', @api_client.encode_uri(period.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :'MonitoringClient.get_metrics', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_reachability(clusters, request_options = {}) ⇒ Hash<String, Hash>
Test the reachability of clusters. Test whether clusters are reachable or not.
511 512 513 514 |
# File 'lib/algolia/api/monitoring_client.rb', line 511 def get_reachability(clusters, = {}) response = get_reachability_with_http_info(clusters, ) @api_client.deserialize(response.body, [:debug_return_type] || 'Monitoring::Hash<String, Hash>') end |
#get_reachability_with_http_info(clusters, request_options = {}) ⇒ Http::Response
Test the reachability of clusters. Test whether clusters are reachable or not.
481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 |
# File 'lib/algolia/api/monitoring_client.rb', line 481 def get_reachability_with_http_info(clusters, = {}) # verify the required parameter 'clusters' is set if @api_client.config.client_side_validation && clusters.nil? raise ArgumentError, "Parameter `clusters` is required when calling `get_reachability`." end path = '/1/reachability/{clusters}/probes'.sub('{' + 'clusters' + '}', @api_client.encode_uri(clusters.to_s)) query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :'MonitoringClient.get_reachability', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |
#get_status(request_options = {}) ⇒ StatusResponse
List cluster statuses. Report whether clusters are operational. The response depends on whether you authenticate your API request. - With authentication, the response includes the status of the cluster assigned to your Algolia application. - Without authentication, the response lists the statuses of all public Algolia clusters.
544 545 546 547 |
# File 'lib/algolia/api/monitoring_client.rb', line 544 def get_status( = {}) response = get_status_with_http_info() @api_client.deserialize(response.body, [:debug_return_type] || 'Monitoring::StatusResponse') end |
#get_status_with_http_info(request_options = {}) ⇒ Http::Response
List cluster statuses. Report whether clusters are operational. The response depends on whether you authenticate your API request. - With authentication, the response includes the status of the cluster assigned to your Algolia application. - Without authentication, the response lists the statuses of all public Algolia clusters.
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 |
# File 'lib/algolia/api/monitoring_client.rb', line 520 def get_status_with_http_info( = {}) path = '/1/status' query_params = {} query_params = query_params.merge([:query_params]) unless [:query_params].nil? header_params = {} header_params = header_params.merge([:header_params]) unless [:header_params].nil? post_body = [:debug_body] = .merge( :operation => :'MonitoringClient.get_status', :header_params => header_params, :query_params => query_params, :body => post_body, :use_read_transporter => false ) @api_client.call_api(:GET, path, ) end |