@@ -0,0 +1,930 @@
+from elasticsearch import Elasticsearch, TransportError%0Afrom elasticsearch.helpers import scan%0Afrom elasticsearch_xpack import XPackClient%0Aimport requests%0Aimport pandas as pd%0Aimport numpy as np%0Aimport re%0Afrom ipaddress import IPv4Address as ipv4, AddressValueError%0Aimport time%0Afrom bokeh.plotting import figure, output_file, show, save%0Afrom bokeh.models import FuncTickFormatter, FixedTicker, NumeralTickFormatter, Div, Title, LinearAxis, Range1d%0Afrom bokeh.charts import Bar, Donut%0Afrom bokeh.layouts import gridplot, column, row%0A%0Aclass Init():%0A%09def __init__(self, url = None, timeout = 120):%0A%09%09self.timeout = timeout%0A%09%09if not url:%0A%09%09%09self.url = es%0A%09%09if not requests.get(self.url):%0A%09%09%09print(%22Connection incorrect!%22)%0A%09%09%09exit(0)%0A%09def connect(self):%0A%09%09return Elasticsearch(self.url, timeout = self.timeout)%0A%0Adef fig1(idx, conn):%0A%09%0Aif __name__ == %22__main__%22:%0A%09conn = Init(timeout = 300).connect()%0A%09fig1(%22logs-advancedsearch%22, conn)%09%09

Add advancedsearch.py