Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

SectionCaseCase-URLMethodParametersExample URLResponse 
Accumulators       
 List all accumulators/accumulatorsGET 
Code Block
http://<server>:<port>:<app>/moskito-inspect-rest/accumulators
Code Block
"accumulators": [ AccumulatorDefinition, AccumulatorDefinition, ...]
 
 Get a single accumulator/accumulators/{id}GET
  • id - accumulator id
Code Block
http://<server>:<port>:<app>/moskito-inspect-rest/accumulators/22
Code Block
languagejs
"accumulator": AccumulatorDefinition,
"chartData": ChartData
 
 Delete an accumulator/accumulators/{id}DELETE
  • id - accumulator id
Code Block
http://<server>:<port>:<app>/moskito-inspect-rest/accumulators/22

none.

Example:

Code Block
languagejs
{
    "success": true,
    "results": {}
}
Warning, this will actually drop all collected data.
 Create an accumulator/accumulatorsPOST

POST data JSON or XML:

{
 "name": "TestAccumulator",
 "producerId": "ThreadCount", 
 "interval": "1m",
 "unit": "MILLISECONDS",
 "statName": "ThreadCount",
 "valueName": "current"
}
Code Block
http://<server>:<port>/<app>/moskito-inspect-rest/accumulators
Code Block
"created": AccumulatorDefinition

Example:

Code Block
{
    "success": true,
    "results": {
        "created": {
            "id": "47",
            "name": "TestAccumulator",
            "path": "ThreadCount.ThreadCount.current/1m/MILLISECONDS",
            "numberOfValues": 0,
            "lastValueTimestamp": "none",
            "maxNumberOfValues": 0
        }
    }
}
Note, if the name is already used, a new name is selected, which is old name plus -number
 Returns a chart of multiple accumulators/accumulators/combined?id={id}&id={id}...GET
    • id - multiple ids of accumualtors
Code Block
http://<server>:<port>/<app>/moskito-inspect-rest/accumulators/combined?id=22&id=23

Example:

Code Block
{
  "success": true,
  "results": {
    "chart": {
      "data": [
        {
          "values": [
            "18",
            "3"
          ],
          "timestamp": "22:52",
          "isoTimestamp": "2015-06-27T22:52:00,000",
          "numericTimestamp": 1435438320000
         },
         {
          "values": [
            "18",
            "6"
          ],
          "timestamp": "22:53",
          "isoTimestamp": "2015-06-27T22:53:00,000",
          "numericTimestamp": 1435438380000
         },
         {
           "values": [
              "18",
              "5"
            ],
           "timestamp": "22:54",
           "isoTimestamp": "2015-06-27T22:54:00,000",
            "numericTimestamp": 1435438440000
          }
        ],
        "names": [
         "ThreadCount",
         "ThreadStateRunnable-1m"
        ]
     }
  }
}
 
 Returns a chart of multiple accumulators, normalized to 100%/accumulators/normalized?id={id}&id={id}...GETsame as combinedsame as combinedsame as combined 
Thresholds       
 Definitions of the Thresholds/thresholds/definitionsGET 
Code Block
http://<server>:<port>:<app>/moskito-inspect-rest/thresholds/definitions
Code Block
"definitions": [ThresholdDefinition, ...]
 
 Current statuses of the Thresholds./thresholds/statusesGET 
Code Block
http://<server>:<port>:<app>/moskito-inspect-rest/thresholds/statuses
Code Block
"statuses": [ThresholdStatus, ... ]
 
 Returns both, definitions and statuses of the Thresholds to save bandwidth./thresholdsGET 
Code Block
http://<server>:<port>:<app>/moskito-inspect-rest/thresholds
Code Block
"definitions": [ThresholdDefinition, ...],
"statuses": [ThresholdStatus, ... ]
 
 Delete a threshold/thresholds/{id}DELETE    
 Create a new Threshold/thresholdsPOST    
Alerts       
 Get current alerts. An alert is triggered if the Threshold status is changed./alertsGET-
Code Block
http://<server>:<port>:<app>/moskito-inspect-rest/alerts
Code Block
"alerts": [Alert, Alert..]
 
Status       
 Worst application status/statusGET 
Code Block
http://<server>:<port>:<app>/moskito-inspect-rest/status

"status": "COLOR"

Example:

Code Block
{
    "success": true,
    "results": {
        "status": "GREEN"
    }
}
 
 Worst application status from submitted/statusPOST
Code Block
{
"thresholdNames": ["ThreadCount"]
}
Code Block
http://<server>:<port>:<app>/moskito-inspect-rest/alerts
Same as GET /status 
Dashboards       
 List of Dashboard definitions/dashboardsGET 
Code Block
http://<server>:<port>:<app>/moskito-inspect-rest/dashboards
Code Block
"dashboards": [DashboardDefinition, ...]
 
 Retrieval of Dashboard data./dashboards/{name}GET
  • name of the dashboard
Code Block
http://<server>:<port>:<app>/moskito-inspect-rest/dashboards/Example%20Dashboard
Code Block
"dashboard": Dashboard

 

 

 
Producers       
 Get list of all producers and their cumulated data/producers/{intervalname}/{timeunit}GET
  • intervalname - name of the interval for the data, one of 1m, 5m, 15m etc
  • timeunit - timeunit for duration related values like Total or AVG, for example MILLISECONDS, MICROSECONDS etc
   
 Get the data for a single producer/producers/{id}/{intervalname}/{timeunit}GET
  • id - the id of the producer
  • intervalname - name of the interval for the data, one of 1m, 5m, 15m etc
  • timeunit - timeunit for duration related values like Total or AVG, for example MILLISECONDS, MICROSECONDS etc
   
 Return available subsystems/producers/categoriesGET    
 Return available categories/producers/subsystemsGET    
 Return producers by category/producers/byCategory/{category}/{intervalname}/{timeunit}GET
  • category - selected category
  • intervalname - name of the interval for the data, one of 1m, 5m, 15m etc
  • timeunit - timeunit for duration related values like Total or AVG, for example MILLISECONDS, MICROSECONDS etc
   
 Return producers by subsystem/producers/bySubsystem/{subsystem}/{intervalname}/{timeunit}GET
  • subsystem - selected subsystem
  • intervalname - name of the interval for the data, one of 1m, 5m, 15m etc
  • timeunit - timeunit for duration related values like Total or AVG, for example MILLISECONDS, MICROSECONDS etc
   
Version       
 Return version information of the server/versionGET-
Code Block
http://<server>:<port>/<app>//moskito-inspect-rest/version
 
Code Block
{
    "success": true,
    "results": {
        "version": {
            "fileTimestamp": "2015-06-28T00:25:50,000",
            "version": "2.6.2-SNAPSHOT",
            "group": "net.anotheria",
            "artifact": "moskito-webui"
        }
    }
}