Skip to main content
Deftone
New Member
September 29, 2016
Question

Report src - dst per policy

  • September 29, 2016
  • 1 reply
  • 5269 views

Hi,

I'm trying to make a datasheet to create reports showing source, destination and policyid per policy. What I made does not work as expected.. Is there someone that can provide me with the right script. What I tried:

 

select `srcip`, sum(coalesce(`rcvdbyte`,0)) as received_bytes from $log where $filter and (ipstr(`srcip`)='') group by `srcip` order by policyid

 

Thanks

    1 reply

    hzhao_FTNT
    Staff
    Staff
    September 29, 2016

    Hi there, try below dataset:

    log type=traffic

    select srcip,  dstip, policyid, sum(coalesce(sentbyte, 0)+coalesce(rcvdbyte, 0)) as bandwidth from $log where $filter and logid_to_int(logid) not in (4, 7, 14) group by srcip,  dstip, policyid order by bandwidth desc

    Deftone
    DeftoneAuthor
    New Member
    September 30, 2016

    Yess thank you... Now I'm seeing source and destinations with right policyid's 

    Just one more question..IS it also possible to create Datasheet per policy id...

    Something like show srcip, dstip in policyid 111 order by bandwidth ?

    hzhao_FTNT
    Staff
    Staff
    September 30, 2016

    Are you looking for a drill down chart? Currently our drilldown chart support up to 3 columns, so we have to put srcip and dstip into a combined column.

     

    dataset as below:

    log type traffic

    select policyid, ipstr(srcip) || ' | ' || ipstr(dstip) as src_dst_ip, sum(coalesce(sentbyte, 0)+coalesce(rcvdbyte, 0)) as bandwidth from $log where $filter and logid_to_int(logid) not in (4, 7, 14) group by src_dst_ip, policyid order by bandwidth desc

     

    chart setting as below:

    chart type: table

    table type: drilldown

    column 1: policyid

    column 2: src_dst_ip

    column 3: bandwidth

     

    add this chart into report and run this report.

     

    regards,

    hz