Plugin Management

Revision as of 19:22, 9 October 2017 by Uky (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Network measurement is performed through observation of traffic from monitored sources. Due to the volume of raw data, applications must process traffic near sources of data generation or exchange. The Plugin Management system provides methods to manage distributed measurement tasks and resulting output data. We make use of the Cresco Framework [1] for agent and plugin management.

  • Features
    • Provide a global view of state of devices, processes, and data flows in distributed environments.
    • Provide centralized configuration management for distributed resources.
    • Provide abstract methods to develop, deploy, and maintain distributed applications and related data flows.
    • Employ edge computing techniques in network measurement.
  • Status
    • Improved distributed control-plane communication
    • Improved number of possible agents in network
    • Improved resiliency of agent network
    • Generalized task (plugin) scheduling
    • Providing distributed location-based scheduling
    • Developed Docker Container Plugin
    • Developed backend (Cresco) dashboard
    • Providing device resource utilization
    • Providing container resource utilization
    • Up to four Netflow streams aggregated at UK

Agents and Plugins

A single agent with one or more plugins runs on each AMIS device. A plugin instance and related configuration parameters are deploy for each measurement tasks. An example of plugin management on a device is shown in the figure below:

Device View

One or more capture devices can used together for distributed measure measurements. Agents and related plugins are coordinated through a central controller as shown in the figure below:

System View

Notes

  1. V. K. C. Bumgardner, V. W. Marek and C. D. Hickey, "Cresco: A distributed agent-based edge computing framework," 2016 12th International Conference on Network and Service Management (CNSM), Montreal, QC, 2016, pp. 400-405.

Test Page

<html>
  <head>
    <script src="http://code.jquery.com/jquery-1.12.0.min.js"></script>
    <script type="text/javascript">
      var server_ip = '[controller server ip]';
      function submitCommand() {
        $('.displayText').text('Launching command');
        $.ajax({
          url:'http://' + server_ip + ':32001/API/submit/' + $('#command').val(),
          dataType: "text"
        }).error(function(data) {
          $('.displayText').html(data.responseText);
        }).done(function(data) {
          exchangeID = data;
          $('.displayText').html("Exchange ID: " + data);
          forcePopulateDropDown();
        });
      }
      function forcePopulateDropDown() {
        $.ajax({
          url:'http://' + server_ip + ':32001/API/list/',
          dataType: "json"
        }).error(function(data) {
          alert(data.responseText);
        }).done(function(data) {
          var html = '';
          if(data != null) {
            if (data.length > 0) {
              $.each(data, function (i, v) {
                html += '<option';
                if (i == 0) { html += ' selected'; }
                html += '>' + v.exchange + '</option>';
              });
            }
          }
          $('#exchanges').html(html);
        });
      }
      function populateDropDown(data) {
        /*$.ajax({
          url:'http://' + server_ip + ':32001/API/list/',
          dataType: "json"
        }).error(function(data) {
          alert(data.responseText);
        }).done(function(data) {*/
          var html = '';
          if(data != null) {
            if (data.length > 0) {
              $.each(data, function (i, v) {
                html += '<option';
                if (i == 0) { html += ' selected'; }
                html += '>' + v.exchange + '</option>';
              });
            }
          }
          $('#exchanges').html(html);
        //});
      }
      function getList() {
        $('.displayText').text('Getting data.');
        $.ajax({
          url:'http://' + server_ip + ':32001/API/list/',
          dataType: "json"
        }).error(function(data) {
          alert(data.responseText);
        }).done(function(data) {
          if(data == null) {
              $('.displayText').text("Results were null, " + textStatus + " " + jqXHR.status);    
          } else {
            $('.displayText').html('');
            var html = '';
            html += '<table border="1"><thead><tr><th>Exchange ID</th><th>State</th><th>Issued</th><th>Start</th><th>End</th><th>Program</th><th>Arguments</th></thead><tbody>';
            if (data.length == 0) {
              $('.displayText').append('No data found...');
            } else {
              $.each(data, function (i, v) {
                html += '<tr><td>' + v.exchange + '</td><td>' + v.state + '</td><td>' + v.issued + '</td><td>' + v.start + '</td><td>' + v.end + '</td><td>' + v.program + '</td><td>' + ((v.args != "") ? v.args : "none") + '</td></tr>';
              });
            }
            $('.displayText').html(html + '</tbody></table>');
          }
          populateDropDown(data);
        });
      }
      function getResults() {
        if ($('#exchanges').val() === "") {
          $('.displayText').text('You must select an exchange first...');
        } else {
          $('.displayText').text('Getting data.');
          $.ajax({
            url:'http://' + server_ip + ':32001/API/results/' + $('#exchanges').val(),
            dataType: "json"
          }).error(function(data) {
            alert(data.responseText);
          }).done(function(data) {
            if(data == null) {
                $('.displayText').text("Results were null, " + textStatus + " " + jqXHR.status);    
            } else {
              $('.displayText').html('');
              var html = '<dl>';
              html += '<dt><u><b>Exchange</b></u></dt><dd>' + data.exchange + '</dd>';
              html += '<dt><u><b>Status</b></u></dt><dd>' + data.state + '</dd>';
              html += '<dt><u><b>Program</b></u></dt><dd>' + data.program + '</dd>';
              html += '<dt><u><b>Args</b></u></dt><dd>' + ((data.args != "") ? data.args : "none") + '</dd>';
              html += '<dt><u><b>Issued</b></u></dt><dd>' + data.issued + '</dd>';
              html += '<dt><u><b>Start</b></u></dt><dd>' + data.start + '</dd>';
              html += '<dt><u><b>End</b></u></dt><dd>' + data.end + '</dd>';
              html += '</dl>';
              html += '<u><b>Logs</b></u><br>';
              if (data.logs.length == 0) {
                html += 'No logs found...<br>';
              } else {
                $.each(data.logs, function (i, v) {
                  html += v + '<br>';
                });
              }
              html += '<br><u><b>Results</b></u><br>';
              if (data.results.length == 0) {
                html += 'No results found...<br>';
              } else {
                if ($.isPlainObject(data.results[0])) {
                  html += '<table border="1"><thead><tr><th>Machine Name</th><th>Netflow</th></tr></thead><tbody>';
                  $.each(data.results, function (i, v) {
                    html += '<tr><td>' + v.Machine_Name + '</td><td>' + JSON.stringify(v.Netflow) + '</td></tr>';
                  });
                  html += '</tbody></table>';
                } else {
                  $.each(data.results, function (i, v) {
                    html += v + '<br>';
                  });
                }
              }
              $('.displayText').html(html);
            }
          });
        }
      }
      function closeExchange() {
        if ($('#exchanges').val() === "") {
          $('.displayText').text('You must select an exchange first...');
        } else {
          $('.displayText').text('Getting data.');
          $.ajax({
            url:'http://' + server_ip + ':32001/API/close/' + $('#exchanges').val(),
            dataType: "text"
          }).error(function(data) {
            alert(data.responseText);
          }).done(function(data) {
            if(data == null) {
                $('.displayText').text("Results were null, " + textStatus + " " + jqXHR.status);    
            } else {
              $('.displayText').html(data);
            }
            forcePopulateDropDown();
          });
        }
      }
      function pushSendUDP() {
        $.ajax({
          url:'http://' + server_ip + ':32001/API/badpacket'
        });
      }
      $(function() {
        $('#command').bind('enterKey',function(e){
           submitCommand();
        });
        $('#command').keyup(function(e){
            if(e.keyCode == 13)
            {
                $(this).trigger('enterKey');
            }
        });
        forcePopulateDropDown();
      });
    </script>
  </head>
  <body>
    <input type="text" id="command"></input>
    <input type="submit" onclick="submitCommand();" value="Submit Command" />&nbsp;
    <input type="submit" onclick="getList();" value="Get List" />&nbsp;
    <select id="exchanges"></select>
    <input type="submit" onclick="getResults();" value="Grab Results" />&nbsp;
    <input type="submit" onclick="closeExchange();" value="Kill Task" />&nbsp;
    <input type="submit" onclick="pushSendUDP();" value="Call sendudp" /><br>
    <div class="displayText"></div>
  </body>
</html>