QQL to Query ingress and egress

Hello,

Can we query how much ingress and egress bytes for a month for specific device using SQL command?

  • Hi,

    I would recommend using SWQL instead, but you can use also SQL. The data are stored in SQL Flow Storage database and for querying you can use predefined views (NetFlowFlows_View*). Only problem might be that in the Flow Storage are stored only nodeIDs, so you will need to get them from the Orion database (Nodes table).

    Query to Flow Storage would look like:

    SELECT NodeID, SUM(IngressBytes) AS IB, SUM(EgressBytes) AS EB
    FROM NetFlowFlows_View
    WHERE NodeID = [XY] AND TimeStamp >= [Time condition]
    GROUP BY NodeID

    Flows are stored in the UTC timezone.