Timelion in the ELK Stack

Timelion #00: Defining one Index

.es(index=uela-dataset-01-geo-all)
defining the index to work on Timelion

Timelion #01: Sample on a “Twitter” Dataset

PUT /my-twitter/tweet/1?pretty
{
"user" : "thor",
"edad" : 32,
"post_date" : "2018-01-31T20:12:12",
"message" : "Prueba en Elasticsearch Tweet1 (Thor)"
}
PUT /my-twitter/tweet/2?pretty
{
"user" : "rocky",
"edad" : 48,
"post_date" : "2018-01-31T20:13:12",
"message" : "Prueba en Elasticsearch Tweet1 (Rocky)"
}
PUT /my-twitter/tweet/3?pretty
{
"user" : "Meteoro",
"edad" : 16,
"post_date" : "2018-01-31T20:14:12",
"message" : "Prueba en Elasticsearch Tweet1 (Meteoro)"
}
PUT /my-twitter/tweet/4?pretty
{
"user" : "Batman",
"edad" : 29,
"post_date" : "2018-02-03T20:12:12",
"message" : "Prueba en Elasticsearch Tweet4 (Batman)"
}
PUT /my-twitter/tweet/5?pretty
{
"user" : "Aquaman",
"edad" : 31,
"post_date" : "2018-02-01T20:13:12",
"message" : "Prueba en Elasticsearch Tweet5 (Aquaman)"
}
PUT /my-twitter/tweet/6?pretty
{
"user" : "Green Lanter",
"edad" : 42,
"post_date" : "2018-02-08T20:14:12",
"message" : "Prueba en Elasticsearch Tweet6 (Green Lanter)"
}
Dev Tools Screen after the post
Average Age in the “Twitter” Dataset
Timelion, First Time Configuration
before edit Timelion indexs!
after edit Timelion indexs! (caution!)
.es(index=my-twitter, timefield=post_date).color(#ee1122)
.es(index=my-twitter, timefield=post_date).color(#ee1122)
.es(index=my-twitter, timefield=post_date, metric=avg:edad)
.color(#ff0000)
.points(radius=12, fill=1, fillColor=#009900)
.es(index=my-twitter, timefield=post_date, metric=avg:edad)
.color(#ff0000)
.points(radius=12, fill=1, fillColor=#009900)

Timelion #02: Sample over a “AIR Quality” Dataset

First visualization on Clima Dataset
https://aqicn.org/map/buenos-aires/es/#@g/-34.6288/-58.4469/12z
.es(index=uela-dataset-01-all, timefield=FECHA_HORA, metric=max:AIRQ_CO), 
.es(index=uela-dataset-01-all, timefield=FECHA_HORA, metric=max:AIRQ_NO2),
.es(index=uela-dataset-01-all, timefield=FECHA_HORA, metric=max:AIRQ_CO),
.es(index=uela-dataset-01-all, timefield=FECHA_HORA, metric=max:AIRQ_NO2),
.es(index=uela-dataset-01-all, timefield=FECHA_HORA, metric=max:AIRQ_CO).mvavg(7).yaxis(1),
.es(index=uela-dataset-01-all, timefield=FECHA_HORA, metric=max:AIRQ_NO2).mvavg(7).yaxis(2),
.es(index=uela-dataset-01-all, timefield=FECHA_HORA, metric=max:AIRQ_CO).mvavg(7).yaxis(1),
.es(index=uela-dataset-01-all, timefield=FECHA_HORA, metric=max:AIRQ_NO2).mvavg(7).yaxis(2),
.es(index=uela-dataset-01-all, timefield=FECHA_HORA, metric=max:AIRQ_CO).mvavg(7).label("AIRQ_CO"),
.es(index=uela-dataset-01-all, timefield=FECHA_HORA, metric=max:AIRQ_NO2).mvavg(7).yaxis(2).label("AIRQ_NO2"),
.es(index=uela-dataset-01-all, timefield=FECHA_HORA, metric=max:AIRQ_CO).mvavg(7).label("AIRQ_CO").trend(),
.es(index=uela-dataset-01-all, timefield=FECHA_HORA, metric=max:AIRQ_NO2).mvavg(7).yaxis(2).label("AIRQ_NO2").trend(),
label() + trend() functions concatenated
.... .trend().legend(columns=4, position=nw),
just to see the idea… RGB
just un example, to see the idea… RGB

Timelion #03: Some Tipical Queries

#sample ~1 min. 11:22
#sample 2~ before add range(0,100)
c
#sample 4~ min 21:23 (Diff Monday & Monday)

Timelion #04: Filling Gaps

#sample 6 ~ min. 23:34 with “nearest”
#sample 7~ fit(nearest)
#sample 8~ min 25:35 fit(average)
#sample 9~min 27:31 Interval 1 week
#sample 10~with fit none (not recomendable)
#sample 11 ~ with scale min 31:04
#sample 12~ min 33:31 plugin agregate() + trend()
#sample 13~Colors! Min 34:31
#sample 14 ~… more colors ….

Timelion #05: Moving Average

min 36:35 — Moving Average over 7 days
holt function is like media movile…
Last functions: if(), gt() and points()

Finals Works

Resources

--

--

--

#cloud . #mobile ~} Sharing IT while learning It! ... Opinions are for my own

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Slicing and Indexing with Pandas

Photo by Adam Nowakowski on Unsplash

Data-Science Series(Practical-3)- Data Pre-processing with Data reduction techniques in python

Getting Started in Data Science with Bootcamp

“Understanding AI” Blog Series

Experiences from Both Sides of the Data Science Hiring Table

When Less Data is Enough Data

Oversampling and Undersampling

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Pablo Ezequiel Inchausti

Pablo Ezequiel Inchausti

#cloud . #mobile ~} Sharing IT while learning It! ... Opinions are for my own

More from Medium

PART 1 Install of Saas based Appdynamics client on Linux for app server agent

First step with elastic security

OAuth2 Token Exchange RFC8693

How to install Elasticsearch and Kibana version 8.1 on RHEL For Beginner