Beispiel #1
0
#
report = Report(title='Shark', position=3)
report.save()

section = Section.create(report)

### Shark Time Series

t = SharkTable.create(name='Total Traffic Bytes',
                      duration=1,
                      resolution='1sec',
                      aggregated=False)

create_shark_column(t,
                    'time',
                    extractor='sample_time',
                    iskey=True,
                    label='Time',
                    datatype='time')
create_shark_column(t,
                    'generic_bytes',
                    label='Bytes',
                    iskey=False,
                    extractor='generic.bytes',
                    operation='sum')

yui3.TimeSeriesWidget.create(section, t, 'Overall Bandwidth (Bytes)', width=12)

### Table for Shark
table = SharkTable.create(name='Packet Traffic', duration=1, aggregated=False)

create_shark_column(table,
#
# Define a Shark Report and Table
#
report = Report(title='Shark DNS', position=6)
report.save()

section = Section.create(report)


### DNS Success/Failure Queries Over time
name = 'DNS Success and Failure Queries Over Time' 
t = SharkTable.create(name=name, 
                      duration=15, resolution='1min', aggregated=False)

create_shark_column(t, 'time', label='Time', iskey=True, datatype='time', extractor='sample_time')
create_shark_column(t, 'dns_count', label='DNS Query Count', iskey=False, extractor='dns.query.count', operation='sum')
create_shark_column(t, 'dns_is_success', label='DNS Success', iskey=False, extractor='dns.is_success', operation='none')
yui3.TimeSeriesWidget.create(section, t, name, width=12)


### DNS Response Code List for Shark 1
name = 'DNS Response Codes'
table = SharkTable.create(name=name, 
                      duration=15, aggregated=True)

create_shark_column(table, 'dns_is_success_str', label='DNS Success', iskey=True, extractor='dns.is_success_str', operation='none')
create_shark_column(table, 'dns_total_queries', label='DNS Total Queries', issortcol=True, extractor='dns.query.count', operation='sum')

yui3.PieWidget.create(section, table, name, width=6)
# Define a Overall TimeSeries showing Avg Bytes/s
section = Section.create(report, title='Profiler Overall',
                         section_keywords=['resolution', 'duration'])

table = TimeSeriesTable.create('ts1', duration=1440, resolution='15min')

Column.create(table, 'time',      label='Time',        datatype='time',  iskey=True)
Column.create(table, 'avg_bytes', label='Avg Bytes/s', datatype='bytes', units='B/s')

yui3.TimeSeriesWidget.create(section, table, "Profiler Overall Traffic", width=6)

### Shark Time Series
section = Section.create(report, title='Shark Traffic',
                         section_keywords=['resolution', 'duration', ])

t = SharkTable.create(name='Total Traffic Bytes',
                      duration=15, resolution='1sec', aggregated=False)

create_shark_column(t, 'time', extractor='sample_time', iskey=True,
                    label='Time', datatype='time')
create_shark_column(t, 'generic_bytes', label='Avg Bytes/s', iskey=False,
                    extractor='generic.bytes', operation='sum', datatype='bytes')

yui3.TimeSeriesWidget.create(
    section,
    t,
    'Overall Bandwidth (Bytes) at (1-second resolution)',
    width=6
)
Beispiel #4
0
#
report = Report(title='Shark DNS', position=6)
report.save()

section = Section.create(report)

### DNS Success/Failure Queries Over time
name = 'DNS Success and Failure Queries Over Time'
t = SharkTable.create(name=name,
                      duration=15,
                      resolution='1min',
                      aggregated=False)

create_shark_column(t,
                    'time',
                    label='Time',
                    iskey=True,
                    datatype='time',
                    extractor='sample_time')
create_shark_column(t,
                    'dns_count',
                    label='DNS Query Count',
                    iskey=False,
                    extractor='dns.query.count',
                    operation='sum')
create_shark_column(t,
                    'dns_is_success',
                    label='DNS Success',
                    iskey=False,
                    extractor='dns.is_success',
                    operation='none')
yui3.TimeSeriesWidget.create(section, t, name, width=12)