Output Formatting

The AMPS monitoring interface offers several possible output formats to ease the consumption of monitoring reporting data. The possible options are XML, CSV and RNC output formats, each of which is discussed in more detail below.

JSON Document Output

All monitoring interface resources can have the current node, along with all child nodes, list its output as a JSON document by appending the .json file extension to the end of the resource name. For example, if an administrator would like to have a JSON document of all of the CPUs on the server, including all the relevant statistics about those CPUs, then the following URI will generate that information:

http://localhost:8085/amps/host/cpus.json

The document that is returned will be similar to the following:

{
    "amps": {
        "host": {
            "cpus": [
                {
                    "id":"all",
                    "idle_percent":"62.452316076294",
                    "iowait_percent":"0.490463215259",
                    "system_percent":"10.681198910082",
                    "user_percent":"26.376021798365"
                },
                {
                    "id":"cpu0",
                    "idle_percent":"75.417130144605",
                    "iowait_percent":"0.333704115684",
                    "system_percent":"7.563959955506",
                    "user_percent":"16.685205784205"
                },
                {
                    "id":"cpu1",
                    "idle_percent":"50.000000000000",
                    "iowait_percent":"0.642398286938",
                    "system_percent":"13.597430406852",
                    "user_percent":"35.760171306210"
                }
            ]
        }
    }
}

Appending the .json file extension to any AMPS monitoring interface resource will generate the corresponding JSON document.

XML Document Output

All monitoring interface resources can have the current node, along with all child nodes, list its output as an XML document by appending the .xml file extension to the end of the resource name. For example, if an administrator would like to have an XML document of all of the currently running processors, including all the relevant statistics about those processors, then the following URI will generate that information:

http://localhost:8085/amps/instance/processors/all.xml

The document that is returned will be similar to the following:

<amps>
    <instance>
        <processors>
            <processor id='all'>
                <denied_reads>0</denied_reads>
                <denied_writes>0</denied_writes>
                <description>AMPS Aggregate Processor Stats</description>
                <last_active>1855</last_active>
                <matches_found>0</matches_found>
                <matches_found_per_sec>0</matches_found_per_sec>
                <messages_received>0</messages_received>
                <messages_received_per_sec>0</messages_received_per_sec>
                <throttle_count>0</throttle_count>
            </processor>
        </processors>
    </instance>
</amps>

Appending the .xml file extension to any AMPS monitoring interface resource will generate the corresponding XML document.

CSV Document Output

The .csv file extension can be appended to any leaf node resource to have a CSV file generated to examine those values.

This can also be coupled with the time range selection to generate reports. See Time Range Selection above for more details on time range selection.

Below is a sample of the .csv output from the monitoring interface from the following URL:

http://localhost:8085/amps/instance/processors/all/matches_found_per_sec.csv?t0=20230830T0

This resource will create a file with the following contents:

20230830T000000.000000Z,94244
20230830T000010.000000Z,304661
20230830T000020.000000Z,301078
20230830T000030.000000Z,304661
20230830T000040.000000Z,0
20230830T000050.000000Z,0
20230830T000100.000000Z,0
20230830T000110.000000Z,0
20230830T000120.000000Z,302390
20230830T000130.000000Z,307637
20230830T000140.000000Z,0
20230830T000150.000000Z,0
20230830T000200.000000Z,0

Leaf Nodes

A leaf node of the monitoring interface represents a single recorded statistic. Leaf nodes do support CSV document output.

Examples of leaf node endpoints include:

http://localhost:8085/amps/instance/processors/all/messages_received_per_sec

or

http://localhost:8085/amps/instance/transaction_log/write_latency

Non-Leaf Nodes

A non-leaf node represents an aggregate of related statistics. Non-leaf nodes do not support CSV document output. Due to the limitations of the tabular format of CSV, there is no clear way to translate the hierarchical structure of a non-leaf node into a CSV document.

Examples of non-leaf node endpoints include:

http://localhost:8085/amps/instance/processors/all

or

http://localhost:8085/amps/instance/transaction_log

RNC Document Output

AMPS supports generation of an XML schema via the Relax NG Compact (RNC) specification language. To generate an RNC file, enter the following URL in a browser:

http://localhost:port/amps.rnc

AMPS will display the RNC schema.

To convert the RNC schema into an XML schema, first save the RNC output to a file:

%> wget http://localhost:9090/amps.rnc

The output can then be converted to an xml schema using Trang (available at http://code.google.com/p/jing-trang/) with:

trang -I rnc -O xsd amps.rnc amps.xsd

Last updated

Copyright 2013-2024 60East Technologies, Inc.