opFlow API Reference

This page is deprecated

Authentication

Authentication is required to access all methods listed below.

POST login (authenticate)

POST /cgi-omk/opFlow.pl

Authenticate to opFlow. 

Request

ParameterDescription
auth_usernameThe username to authenticate with
auth_passwordThe password for the user

Successful Response

A cookie is created and sent with the response.  This must be saved and passed with all requests below.  

Common Parameters

Many of the parameters are common over all calls and are used when they make sense.

Parameters

ParameterDescription
topnNumber of rows to return, any extra will be summarised into "Other" category
dns"true", "false" or empty. When "true" opData will convert the IP address into a name for display (when relevant, eg. flowEndPoints)
summary

The column to summarise the values by.

Possible Valuemeaning
octets or bytesSummarise octet column (so size of packets)
packetsSummarise by number of packets
flowsSummarise by number of flows
time_tag_startEpoch time to start the time period
time_tag_endEpoch time to end the time period
period

[ Optional ] - If provided and time_tag_start/time_tag_end are not, this will set time_tag_start/time_tag_end from the current time back period. If start/end are provided they will override.

accepts m/h/d, eg. 15m, 2h, 3d

applicationFilter by application given (when relevant)
portFilter by port given (when relevant)
agentFilter flows by specified agent
site_nameFilter flows by site
endpointFilter flows by endpoint (when relevant)

TopN

GET TopN for time period

GET /cgi-omk/opData.pl

This will return a structure

Required Parameters (along with common parameters)

ParameterDescription
act

Tells opData which data model you would like to load, all return TopN + Other (if there are extra)

Possible valueMeaning

flowSummary

Summarise all flows for each time slice, returns 1 dataset with all flows included
flowEndPointsFlows summarised by endpoint
flowAppSourcesFlows summarised by App Sources
flowAppDestinationsFlows summarised by App Desitinations
flowApplicationsFlows summarised by Application
flowTosFlows summarised by TOS
flowTalkersFlows summarised by Talker
flowListenersFlows summarised by Listener
summarisethe size in seconds of each time slice, eg, 60 with flowEndPoints will summarise all records for each endpoint for each minute (so the dataset will have 1 record for every 60 seconds for each TopN endpoint)

Request example output:

{
  "data": [
    {
      "data": [
        797,
        10147,
        18322,
        36579,
        8059,
        43464,
        3658,
        18222,
        27292,
        4002,
        43059,
        3556,
        8689,
        36700,
        0,
        0
      ],
      "name": "Other",
      "type": "area"
    },
    {
      "data": [
        0,
        0,
        0,
        0,
        0,
        0,
        18554181,
        30147004,
        61861232,
        72973960,
        3795368,
        134633928,
        0,
        0,
        0,
        0
      ],
      "name": "ssh:server1.opmantek.com",
      "type": "area"
    }
  ],
  "func": "flowAppSources",
  "interval": 60000,
  "javascript_time_tag_start": [
    2014,
    10,
    "06",
    11,
    30,
    44,
    0
  ],
  "time_tag_end_label": "6-Nov-2014 11:45:44",
  "time_tag_start_label": "6-Nov-2014 11:30:44"
}


GET TopN summarised by time period (pie charts)

GET /cgi-omk/opData.pl

Required Parameters (along with common parameters)

ParameterDescription
act

Tells opData which data model you would like to load, all return TopN + Other (if there are extra)

Possible valueMeaning

topnFlows

Summarise all flows by endpoint/application
topnEndPointsSummarise all flows by endpoint
topnApplicationsSummarise all flows by Application

Example output:

{
  "data": [   
    {
      "id": "192.168.1.1",
      "model": "topnEndPoints",
      "name": "server1.opmantek.com (192.168.1.1)",
      "y": 0.88
    },
    {
      "id": "Other",
      "model": "topnEndPoints",
      "name": "Other",
      "y": 0.12
    },    
  ],
  "func": "topnEndPoints",
  "javascript_time_tag_start": [
    2014,
    10,
    "06",
    11,
    30,
    44,
    0
  ]
}