curl -H "Content-Type:application/json" -X PUT --data "{keys:'ipsource,ipdestination,tcpsourceport,tcpdestinationport', value:'bytes', log:true}" http://127.0.0.1:8008/flow/tcp/jsonAnd now I can access the flows, using this command.
http://127.0.0.1:8008/flows/json?maxFlows=4&name=tcp
Ok... I'm using a topology with 2 switches, 2 hosts and I think it's working. Take a look:
[ { "agent": "192.168.56.120", "dataSource": "19", "end": 1391779971349, "flowID": 769, "flowKeys": "10.0.0.2,10.0.0.1,5001,39640", "name": "tcp", "start": 1391779911282, "value": 4622798.9265738055 }, { "agent": "192.168.56.120", "dataSource": "22", "end": 1391779971349, "flowID": 768, "flowKeys": "10.0.0.2,10.0.0.1,5001,39640", "name": "tcp", "start": 1391779911303, "value": 4611028.287888947 }, { "agent": "192.168.56.120", "dataSource": "21", "end": 1391779971271, "flowID": 767, "flowKeys": "10.0.0.1,10.0.0.2,39640,5001", "name": "tcp", "start": 1391779911248, "value": 8.339224087560749E9 }, { "agent": "192.168.56.120", "dataSource": "17", "end": 1391779967745, "flowID": 766, "flowKeys": "10.0.0.1,10.0.0.2,39640,5001", "name": "tcp", "start": 1391779907738, "value": 8.319268933611224E9 } ]Some doubts...Probably the value is the amount of traffic passing in the flow right now, during the minute or another thing?When I try to refresh the page, the traffic is not being refreshed, why?
[
{
"agent": "192.168.56.120",
"dataSource": "3",
"lastUpdate": 0,
"metricName": "udp",
"metricValue": 1.3000075155298363E7,
"topKeys": [{
"key": "10.0.0.1,10.0.0.2,37925,5001",
"lastUpdate": 0,
"value": 1.3000075155298363E7
}]
},
{
"agent": "192.168.56.120",
"dataSource": "7",
"lastUpdate": 8,
"metricName": "udp",
"metricValue": 1.3165422906452058E7,
"topKeys": [{
"key": "10.0.0.1,10.0.0.2,37925,5001",
"lastUpdate": 8,
"value": 1.3165422906452058E7
}]
} ...>> >> >> >>> &g
[
{
"agent": "10.0.0.100",
"dataSource": "2.1000",
"lastUpdate": 2,
"metricName": "udp",
"metricValue": 1.3196068224561417E7,
"topKeys": [
{
"key": "10.0.20.10,10.0.20.20,43130,5001",
"lastUpdate": 2,
"value": 1.3196068224561417E7
},
{
"key": "0.0.0.0,255.255.255.255,68,67",
"lastUpdate": 16427,
"value": 1.4938231142276044
}
]
} {
"agent": "10.0.0.100",
"dataSource": "2.1001",
"lastUpdate": 3,
"metricName": "udp",
"metricValue": 1.3867384534219673E7,
"topKeys": [
{
"key": "10.0.20.10,10.0.20.20,43130,5001",
"lastUpdate": 3,
"value": 1.3867384534219673E7
},
{
"key": "0.0.0.0,255.255.255.255,68,67",
"lastUpdate": 12216,
"value": 8.240292363362695
}
]
}"value": 3.9976194902333083E-22 appears on my Rest Api. In the case below, the flow
"key": "1,5,10.0.0.101,200.131.206.30,26340,53" will not appear on my Rest API.
"topKeys": [ { "key": "1,5,10.0.0.100,10.0.0.7,35993,6343", "lastUpdate": 241, "value": 310303.26716923673 }, { "key": "1,5,10.0.0.101,10.0.0.7,43841,6343", "lastUpdate": 972, "value": 195968.38534171964 }, { "key": "1,5,10.0.0.100,10.0.0.7,52084,6343", "lastUpdate": 2051, "value": 145133.82554375567 }, { "key": "1,5,10.0.0.101,10.0.0.7,38826,6343", "lastUpdate": 972, "value": 128377.11586738651 }, { "key": "1,5,10.0.0.101,200.131.206.30,26340,53", "lastUpdate": 119313, "value": 3.9976194902333083E-22 }
...>> >> >> >> >&
...>> >> >> >&