Splunk AppDynamics

JSON formatting from PowerShell REST call for transaction snapshots

CommunityUser
Splunk Employee
Splunk Employee

I am making a REST call in PowerShell for transaction snapshots using "&need-props=true&output=json" in the url.  I get the response in the response object below:

# REST CALL

$response = Invoke-RestMethod -uri $url -Header $headers -Method Get


#VIEW RESPONSE IN JSON

$response | ConvertTo-Json

I have a question about the formatting of the properties fields (e.g. transactionProperties, httpParameters, etc) in the response:

{
"firstInChain": true,
"transactionProperties": [
"@{name=ProcessID; id=0; value=4312}",
"@{name=Content length; id=0; value=724}"
],
"errorIDs": [
11457380
],

Note in the array for transactionProperties, that the object strings are not in a format that I am familiar with (e.g. "@{name=ProcessID; id=0; value=4312}").  Is this proprietary to AppD?  Is it a configuration setting or something that formats it this way?

I am wanting to access the key/value pairs, but not quite sure how to do that.  I've scoured the AppD site for examples of json output to see if this is normal, but haven't found anything related to the output I am getting.

Any insights would be most helpful...

Thanks!

Labels (3)
0 Karma

CommunityUser
Splunk Employee
Splunk Employee

As a follow up, I found that when requesting a single snapshot, the properties fields are properly formatted as expected.  It is only when requesting more than one, the formatting is different.  The same goes for metrics as well as snapshots...

Here is a simple example from the EUM metrics... when I query for a single metric on a singe page, it comes back in a usable format:

{
    "metricId":  121189479,
    "metricName":  "BTM|Application Diagnostic Data|Base Page:12463461|End User Response Time (ms)",
    "metricPath":  "End User Experience|Base Pages|web.b.ebscohost.com/ehost/search/selectdb|End User Response Time (ms)",
    "frequency":  "ONE_MIN",
    "metricValues":  [
                         {
                             "startTimeInMillis":  1562605200000,
                             "occurrences":  1,
                             "current":  675,
                             "min":  675,
                             "max":  675,
                             "useRange":  true,
                             "count":  1,
                             "sum":  675,
                             "value":  675,
                             "standardDeviation":  0
                         }
                     ]
}

However, if I query for multiple metrics from that same base page, the same metric as above comes back in non-standard format...

{
    "metricId":  121143678,
    "metricName":  "METRIC DATA NOT FOUND",
    "metricPath":  "End User Experience|Base Pages|www.ebsco.com/academic-libraries/library-technology|End User Response Time (ms)",
    "frequency":  "ONE_MIN",
    "metricValues":  [

                     ]
},
{
    "metricId":  121189479,
    "metricName":  "BTM|Application Diagnostic Data|Base Page:12463461|End User Response Time (ms)",
    "metricPath":  "End User Experience|Base Pages|web.b.ebscohost.com/ehost/search/selectdb|End User Response Time (ms)",
    "frequency":  "ONE_MIN",
    "metricValues":  [
                         "@{startTimeInMillis=1562605200000; occurrences=1; current=675; min=675; max=675; useRange=True; count=1; sum=675; value=675; standardDeviation=0}"
                     ]
},
{
    "metricId":  121145538,
    "metricName":  "METRIC DATA NOT FOUND",
    "metricPath":  "End User Experience|Base Pages|epic/departments/eissales/pages|End User Response Time (ms)",
Get Updates on the Splunk Community!

Uncovering Multi-Account Fraud with Splunk Banking Analytics

Last month, I met with a Senior Fraud Analyst at a nationally recognized bank to discuss their recent success ...

Secure Your Future: A Deep Dive into the Compliance and Security Enhancements for the ...

What has been announced?  In the blog, “Preparing your Splunk Environment for OpensSSL3,”we announced the ...

New This Month in Splunk Observability Cloud - Synthetic Monitoring updates, UI ...

This month, we’re delivering several platform, infrastructure, application and digital experience monitoring ...