1from datetime import datetime
2from elasticsearch import Elasticsearch
3from pandas import DataFrame, Series
4import pandas as pd
5import matplotlib.pyplot as plt
6es = Elasticsearch(host="192.168.121.252")
7res = es.search(index="_all", doc_type='logs', body={"query": {"match_all": {}}}, size=2, fields=('path','@timestamp'))
1# Create a basic ES client
2client = Elasticsearch(['url'])
3
4# Search
5search = Search(using=client)
6
7results = search.execute()
8
9search_dict = results.hits.hits
10
11results_df = pd.DataFrame(search_dict)