com.trendmicro.ds.platform.rest.api

## Interface IStatusAPI

-     @Path(value="/status")
      public interface IStatusAPI

  Interface for the status monitoring API.

  It checks the CPU, memory, disk, event, and job status of manager nodes. All this information was monitored and recorded in the database via monitoring threads.

  For queries that do not specify a manager node, it will query all available (online only) manager nodes. The default fail rate for the status report is 20% which mean it will report non OK (200) status only when the failed nodes exceed 20% of all available nodes.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `javax.ws.rs.core.Response` | `getDetailStatus(java.lang.String item)` Query a specific item for all available manager nodes under the default fail rate and threshold for this item.
    `javax.ws.rs.core.Response` | `getDetailStatus(java.lang.String item, java.lang.Integer failRate)` Query a specific item for all available manager nodes by the desired fail rate but using default threshold.
    `javax.ws.rs.core.Response` | `getDetailStatus(java.lang.String item, java.lang.Integer failRate, java.lang.Integer warningThreshold)` Query a specific item for all available manager nodes by the desired fail rate and threshold.
    `javax.ws.rs.core.Response` | `getNodeDetailStatus(java.lang.String item)` Query current manager node for a specific item Please check the status/manager/item/{item} documentation for valid item keywords.
    `javax.ws.rs.core.Response` | `getNodeDetailStatus(java.lang.String item, java.lang.Integer warningThreshold)` Query current manager node for a specific item with the desired threshold Please check the status/manager/item/{item} documentation for valid item keywords.
    `javax.ws.rs.core.Response` | `ping()` Query all available manager nodes under default fail rate and thresholds for each item.
    `javax.ws.rs.core.Response` | `ping(java.lang.Integer failRate)` Query all available manager nodes under the desired fail rate but using default thresholds for each item.
    `javax.ws.rs.core.Response` | `pingNode()` Query the status of current manager node under default thresholds for each item.

- - ### Method Detail

    - #### ping

          @GET
           @Path(value="/manager/ping")
          javax.ws.rs.core.Response ping()
                                                                     throws java.lang.Exception

      Query all available manager nodes under default fail rate and thresholds for each item.
      Throws:
        `java.lang.Exception`

    - #### ping

          @GET
           @Path(value="/manager/ping/{failRate}")
          javax.ws.rs.core.Response ping(@PathParam(value="failRate")
                                                                                       java.lang.Integer failRate)
                                                                                throws java.lang.Exception

      Query all available manager nodes under the desired fail rate but using default thresholds for each item.
      Parameters:
        `failRate` - Report error when DSM nodes get fail over this percentage
      Throws:
        `java.lang.Exception`

    - #### pingNode

          @GET
           @Path(value="/manager/current/ping")
          javax.ws.rs.core.Response pingNode()
                                                                                 throws java.lang.Exception

      Query the status of current manager node under default thresholds for each item.
      Throws:
        `java.lang.Exception`

    - #### getDetailStatus

          @GET
           @Path(value="/manager/item/{item}")
          javax.ws.rs.core.Response getDetailStatus(@PathParam(value="item")
                                                                                              java.lang.String item)
                                                                                       throws java.lang.Exception

      Query a specific item for all available manager nodes under the default fail rate and threshold for this item.

      Valid Query Items:

      Item | Description | Default Threshold
      --- | --- | ---
      cpu | Check if CPU overloading. | ≥ 85 (%)
      memory | Check if memory usage too high. | ≥ 85 (%)
      event | Check if too many events were generated. | ≥ 1000
      job | Check if too many jobs were created. | ≥ 1000
      disk | Check if free disk space is not enough. | ≤ 10 (%)

      Response Status Codes:

      Code | Description
      --- | ---
      200 (OK) | Everything is fine.
      400 (Bad Request) | Returned if the fail rate or threshold value is invalid
      403 (Forbidden) | The status monitoring query is disabled. Please enable status monitoring before running the query.
      500 (Internal Server Error) | Multiple errors found during the general status query
      501 (Not Implemented) | The query item is not implemented or the item keyword is incorrect. Please check correct keyword to query again.
      503 (Service Unavailable) | Database connections failed. Please check the database or try it later.
      521 (CPU Overloading) | CPU loading is OVER the threshold. Default CPU loading threshold is 85%.
      531 (High Memory Usage) | Memory usage is OVER the threshold. Default memory usage threshold is 85%.
      541 (Too Many Events) | Too many events are generated and is OVER the threshold. Default event generated threshold is 1000.
      551 (Too Many Jobs) | Too many jobs are created and is OVER the threshold. Default job created threshold is 1000.
      507 (Insufficient Storage) | Free disk space is UNDER the threshold. Default low disk space threshold is 10%.

      Parameters:
        `item` - Query the overall status for the specified item.
      Throws:
        `java.lang.Exception`

    - #### getDetailStatus

          @GET
           @Path(value="/manager/item/{item}/{failRate}")
          javax.ws.rs.core.Response getDetailStatus(@PathParam(value="item")
                                                                                                         java.lang.String item,
                                                                                                         @PathParam(value="failRate")
                                                                                                         java.lang.Integer failRate)
                                                                                                  throws java.lang.Exception

      Query a specific item for all available manager nodes by the desired fail rate but using default threshold. Please check the status/manager/item/{item} documentation for valid item keywords.
      Parameters:
        `item` - Query the overall status for the specific item.
        `failRate` - Report error when DSM nodes get fail over this percentage in the specified item
      Throws:
        `java.lang.Exception`

    - #### getDetailStatus

          @GET
           @Path(value="/manager/item/{item}/{failRate}/{warningThreshold}")
          javax.ws.rs.core.Response getDetailStatus(@PathParam(value="item")
                                                                                                                            java.lang.String item,
                                                                                                                            @PathParam(value="failRate")
                                                                                                                            java.lang.Integer failRate,
                                                                                                                            @PathParam(value="warningThreshold")
                                                                                                                            java.lang.Integer warningThreshold)
                                                                                                                     throws java.lang.Exception

      Query a specific item for all available manager nodes by the desired fail rate and threshold. Please check the status/manager/item/{item} documentation for valid item keywords.
      Parameters:
        `item` - Query the overall status for the specific item.
        `failRate` - Report error when DSM nodes get fail over this percentage in the specified item
        `warningThreshold` - Report warning when the item usage is OVER or UNDER this threshold
      Throws:
        `java.lang.Exception`

    - #### getNodeDetailStatus

          @GET
           @Path(value="/manager/current/item/{item}")
          javax.ws.rs.core.Response getNodeDetailStatus(@PathParam(value="item")
                                                                                                          java.lang.String item)
                                                                                                   throws java.lang.Exception

      Query current manager node for a specific item Please check the status/manager/item/{item} documentation for valid item keywords.
      Parameters:
        `item` - Query the status for this specific item.
      Throws:
        `java.lang.Exception`

    - #### getNodeDetailStatus

          @GET
           @Path(value="/manager/current/item/{item}/{warningThreshold}")
          javax.ws.rs.core.Response getNodeDetailStatus(@PathParam(value="item")
                                                                                                                             java.lang.String item,
                                                                                                                             @PathParam(value="warningThreshold")
                                                                                                                             java.lang.Integer warningThreshold)
                                                                                                                      throws java.lang.Exception

      Query current manager node for a specific item with the desired threshold Please check the status/manager/item/{item} documentation for valid item keywords.
      Parameters:
        `item` - Query the overall status for the specific item.
        `warningThreshold` - Report warning when the item usage over this threshold
      Throws:
        `java.lang.Exception`

Copyright © 2017 Trend Micro Inc. All Rights Reserved.