Forum Discussion

Billy's avatar
Billy
Comet
2 months ago

How can I isolate traffic between two specific sites using the Cato API?

Hello Catoers,

I'm trying to get an overview of data transferred between sites via the Cato tunnel. I considered using the accountMetrics query to analyze bytesUpstream and bytesDownstream, but that only provides aggregate data without specifying the destination.

Would using eventsFeed - filtering by source and destination - be a better approach? Or is there another query that directly correlates traffic between specific sites?

Thanks for your guidance.

3 Replies

  • Hi Billy,

    It is possible to get traffic statistics for all your CATO VPN tunnels by using the accountMetrics API.  We use a shell script that pulls the data from CATO every five minutes, we used to poll every minute to get more granular traffic graphs, but we ended up with gaps in our graphs due to zero data pulled from the API, CATO Support recommended changing the script to 5 minutes.

    You will need some scripting knowledge to extract each separate tunnels "bytesDownstream" and "bytesUpstream".

    Regards

    Trevor

  • peter's avatar
    peter
    Icon for Cato Employee rankCato Employee

    Hello Billy,

    It feels like this should be possible but unfortunately every time I've looked into it, it's not possible to get inter-site traffic volumes because queries like appStats and accountMetrics either don't support those as filters, or they return no data if that combination of filters is used. You could use eventsFeed with client-side filtering (i.e. after you have downloaded the events) to count a number of events with source = Site A and destination = Site B.

    Cheers,

    Peter

    • Billy's avatar
      Billy
      Comet

      Hi Peter,

      Thanks for the reply, after further research yes I cannot have the bytes sent from a Site to another, and even using eventsfeed we don' have the information about that.

      Regards,