Giter VIP home page Giter VIP logo

Comments (8)

McStork avatar McStork commented on June 16, 2024

Capture sample with 'add_output json' option set in config file:

{
  "pcap_stats": {
    "start_time": "2016-03-04T09:58:00Z",
    "stop_time": "2016-03-04T09:59:00Z",
    "dimensions": [ "ifname", "pcap_stat" ],
    "data": [
      {
        "ifname": "eth0",
        "pcap_stat": [
          { "val": "pkts_captured", "count": 588 },
          { "val": "filter_received", "count": 588 }
        ]
      }
    ]
  },
  "priming_responses": {
    "start_time": "2016-03-04T09:58:00Z",
    "stop_time": "2016-03-04T09:59:00Z",
    "dimensions": [ "All", "ReplyLen" ],
    "data": [ ]
  },
  "priming_queries": {
    "start_time": "2016-03-04T09:58:00Z",
    "stop_time": "2016-03-04T09:59:00Z",
    "dimensions": [ "Transport", "EDNSBufSiz" ],
    "data": [ ]
  },
  "qtype_total": {
    "start_time": "2016-03-04T09:58:00Z",
    "stop_time": "2016-03-04T09:59:00Z",
    "dimensions": [ "All", "Qtype" ],
    "data": [
      {
        "All": "ALL",
        "Qtype": [
          { "val": "12", "count": 6 },
          { "val": "1", "count": 4 },
          { "val": "28", "count": 1 }
        ]
      }
    ]
  },
  "qname_qtype": {
    "start_time": "2016-03-04T09:58:00Z",
    "stop_time": "2016-03-04T09:59:00Z",
    "dimensions": [ "Qname", "Qtype" ],
    "data": [
      {
        "Qname": "github.com",
        "Qtype": [
          { "val": "1", "count": 3 }
        ]
      }
    ]
  }
}

from dsc.

hassaniqbal2k3 avatar hassaniqbal2k3 commented on June 16, 2024

Very useful.

from dsc.

hassaniqbal2k3 avatar hassaniqbal2k3 commented on June 16, 2024

i have a need to process the dns stats and store in db for further analysis. was thinking of parsing the xml output. this json output support was much needed.

from dsc.

jelu avatar jelu commented on June 16, 2024

Thanks for the PR, I will be looking at this next week. Just recently join DNS-OARC so I will need some time to setup a development environment to test this. There are a few things I see right away and I may do a PR to your branch later on with a few changes.

from dsc.

McStork avatar McStork commented on June 16, 2024

@hassaniqbal2k3 Just being curious. What db would you plan to use?

@jelu Sure, you are welcome to open a PR.

from dsc.

hassaniqbal2k3 avatar hassaniqbal2k3 commented on June 16, 2024

@McStork Cassandra is under consideration, but after looking at the extended json and mongo db combo that you have mentioned, we will study this as well.

from dsc.

jelu avatar jelu commented on June 16, 2024

Format has changed because the dataset name is not unique. Base JSON object is now an array in which a list of dataset objects resides. ISO8601 dates have been removed to conform to the XML output.

{
  "name": "pcap_stats",
  "start_time": 1457602000,
  "stop_time": 1457602020,
  "dimensions": [ "ifname", "pcap_stat" ],
  "data": [
    {
      "ifname": "eth0",
      "pcap_stat": [
        { "val": "pkts_captured", "count": 14 },
        { "val": "filter_received", "count": 14 }
      ]
    }
  ]
}

from dsc.

McStork avatar McStork commented on June 16, 2024

@jelu That looks good! Having timestamps instead of ISO8601 is also fine.

from dsc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.