This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

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?

Parents
  • 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.

Reply
  • 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.

Children
No Data