I am trying to get Networks Clients Usage, but not getting proper data to match with meraki. Any API

Kausik
Comes here often

I am trying to get Networks Clients Usage, but not getting proper data to match with meraki. Any API

i am calling a curl to "https://api.meraki.com/api/v0/networks/<networkID>/clients/<clientID>/trafficHistory?startingAfter=1...

 

and i am getting return as below and i found that the timestamp(ts) returns in only hour "2020-01-01 12:00:00" format but not in the minutes or seconds. Please let me know on this to get proper result or is there any other way to get  APIs to make a graph about traffic-flow by time?. Please find the attached screenshot also.

[

{
        "ts"1577923200.0,
        "application""Miscellaneous secure web",
        "destination""g60.p4.webrootcloudav.com",
        "protocol""TCP",
        "port"443,
        "recv"1625,
        "sent"744,
        "numFlows"0,
        "activeSeconds"13320
    },
    {
        "ts"1577923200.0,
        "application""Miscellaneous secure web",
        "destination""sn-usw2.webrootcloudav.com",
        "protocol""TCP",
        "port"443,
        "recv"40,
        "sent"25,
        "numFlows"2,
        "activeSeconds"180
    }
]

 

Thanks & RegardsClientsUsage.png

 

5 Replies 5
Seshu
Meraki Employee
Meraki Employee

Hello @Kausik 

 

The Traffic Analysis gives the Applications / Website information for a client overall. But the dashboard does not store all the specific flows for all the websites visited. It only stores the flows that are visited in the past hour/day/week/month. 

 

If you would like to track each flow and need specific timestamp with hour/second information, Syslog server should be way to go.

 

Let me know if you have any questions.

 

Regards,

Meraki Team

Kausik
Comes here often

Hello @Seshu 

 

Thanks for your response. Would you mind to explain me the purpose and use of "activeSeconds" field in API return.

Seshu
Meraki Employee
Meraki Employee

How long was that session/flow active for

@Seshu , you mention the dashboard only displays the last "hour/day/week/month", but every time I run trafficHistory, it's never giving me the hour.  I always returns midnight.  Is there a way to make a call to trafficHistory so it returns the traffic in the last hour only?

Kausik
Comes here often

@plumpyfoo No, unable to resolved it yet. I just added the activeSeconds with ts, but I know this is not the solution. Due to this addition some cases we are getting future timestamps.

Get notified when there are additional replies to this discussion.