com.trendmicro.ds.platform.rest.api

## Interface IStatusAPI

-     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

          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

          javax.ws.rs.core.Response ping(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

          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

          javax.ws.rs.core.Response getDetailStatus(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

          javax.ws.rs.core.Response getDetailStatus(java.lang.String item,
                                                    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

          javax.ws.rs.core.Response getDetailStatus(java.lang.String item,
                                                    java.lang.Integer failRate,
                                                    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

          javax.ws.rs.core.Response getNodeDetailStatus(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

          javax.ws.rs.core.Response getNodeDetailStatus(java.lang.String item,
                                                        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 © 2015 Trend Micro Inc. All Rights Reserved.