11/3に行うRAMにて実施するTutorialです.
全体の流れは以下に示すとおりです.
- Dockerを使ってElasticsearch
- Dockerを使ってMoloch
- Molochでpcapを解析
- 解析結果を眺める
/* | |
* Your Stylesheet | |
* | |
* This stylesheet is loaded when Atom starts up and is reloaded automatically | |
* when it is changed and saved. | |
* | |
* Add your own CSS or Less to fully customize Atom. | |
* If you are unfamiliar with Less, you can read more about it here: | |
* http://lesscss.org | |
*/ |
import numpy as np | |
import colorlover as cl | |
def convert_colorscale_format(colorscale): | |
plotly_colorscale = [] | |
for index, sec_value in enumerate(np.linspace(0, 1, len(colorscale))): | |
plotly_colorscale.append([sec_value, colorscale[index]]) | |
return plotly_colorscale |
import plotly.graph_objs as go | |
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot | |
import numpy as np | |
import colorlover as cl | |
N = 10000 | |
cluster_id = [np.random.randint(N/1000) for val in range(N)] | |
trace = go.Scattergl( | |
x = np.random.randn(N), |
import plotly.graph_objs as go | |
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot | |
import numpy as np | |
N = 10000 | |
cluster_id = [np.random.randint(N/1000) for val in range(N)] | |
trace = go.Scattergl( | |
x = np.random.randn(N), | |
y = np.random.randn(N), | |
mode = 'markers', | |
marker = dict( |
import plotly.graph_objs as go | |
from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot | |
import numpy as np | |
import colorlover as cl | |
def convert_colorscale_format(colorscale): | |
plotly_colorscale = [] | |
for index, sec_value in enumerate(np.linspace(0, 1, len(colorscale))): | |
plotly_colorscale.append([sec_value, colorscale[index]]) | |
return plotly_colorscale | |
# %% |
from elasticsearch import Elasticsearch | |
es = Elasticsearch(['elasticsearch:9200']) | |
response = es.search( | |
index="sessions2-181016", | |
body={ | |
"size": 0, | |
"query": { | |
"bool": { | |
"filter": { | |
"bool": { |
server.host: "0.0.0.0" | |
elasticsearch.url: "http://elasticsearch:9200" |
name: base | |
channels: | |
- anaconda | |
- activisiongamescience | |
- conda-forge | |
- defaults | |
dependencies: | |
- geoip2=2.2.0=py36_0 | |
- libmaxminddb=1.1.4=0 | |
- maxminddb=1.2.0=py36_0 |
version: '2' | |
services: | |
kibana: | |
image: docker.elastic.co/kibana/kibana:6.4.2 | |
container_name: kibana | |
volumes: | |
- ./kibana.yml:/usr/share/kibana/config/kibana.yml | |
ports: | |
- 5601:5601 | |
networks: |