Getting StartedΒΆ

The only thing you’ll need to start is your access key. You can either find that from your organization page, or in your config file (/etc/tracelytics.conf) on a machine with TraceView installed. All queries are made to https://api.tv.solarwinds.com.

Once you’ve got that, you can start asking for stuff!

(Oh, also, when you’re just trying stuff out on the command line, consider piping responses through python -mjson.tool. It’ll make things a bit easier to read, so we’ll do it here.)

Getting a list of apps:

$ curl -G "https://api.tv.solarwinds.com/api-v2/apps" \
    -d key=<access-key>
{
    "data": [
        "Default"
    ],
    "response": "ok"
}

You can query these apps for their average duration (server-side), as well:

$ curl -G "https://api.tv.solarwinds.com/api-v2/latency/Default/server/summary" \
    -d key=<access-key>
{
    "data": {
        "average": 1195232.8979591837, # Average, in milliseconds
        "count": 1225,                 # Number of traces
        "latest": 200795.91836734695   # Latest val, in milliseconds
    },
    "response": "ok"
}

Or if you want all the data you need to make a graph of latency over the last hour:

$ curl -G "https://api.tv.solarwinds.com/api-v2/latency/Default/server/series" \
    -d key=<access-key> \
    -o <output-file>

You can even get fancy, and get that series, but only for a particular URL, and over the last week:

$ curl -G "https://api.tv.solarwinds.com/api-v2/latency/Default/server/series" \
    -d key=<access-key> \
    -d time_window=<time-window> \
    -d domain=<domain> \
    -d url=<url> \
    -o <output-file>

There’s more! Check out the docs for all the gory details, and happy tracing!

Related Topics