Google location history in Elastisearch

Prerequisites:
Thanks to Kevin Dwyer for the esloader.py script, which demonstrates the usage of the Elasticsearch bulk API in a simple way.

See his Github repository tracky – https://github.com/dwyerk/tracky !

Navigate to Google Maps Timeline with a desktop browser.

Bottom right you find a gear to access your settings.

Choose download a copy of all my data.

You will be faced to a menu, where you can download data from all the Google services.

There untick everything but the location history and confirm the download.

Have patience as it can take several hours until the export hast been created.

You will be notified via mail – download the archive then.

Extract the archive to a desktop pc and you will find one big json-file containig you whole location history (beside subfolders with daily details). It is named like „Location-History.json“ in German exactly „Standortverlauf.json“.

Beside the json-files you will also find a good explanation of the data you got. See the html-file, that is contained in the archive.

Copy this „Locationhistory.json“ respectively „Standortverlauf.json“ file over to your Elasticsearch box.

Navigate to https://github.com/dwyerk/tracky.
At least copy over the esloader.py script and adjust it to your individual settings (Elasticsearch instance, index names, index mapping – mostly self-explanatory). See the code also below the pictures.

Then run the esloader.py with your json-filename „Locationhistory.json“ respectively „Standortverlauf.json“ as parameter.

Attention: Importing a huge amount of geo point can take a while. For about millions of entries you’ll have to wait some minutes or so.

After that you can start to visualize.

Some sample data from my last ten years:

Our trip to the sea with slightly decreasing altitude ; )

import ujson as json
from argparse import ArgumentParser
from datetime import datetime

from elasticsearch import Elasticsearch
import elasticsearch.helpers as helpers
elastic_url = 'localhost:9200'
es = Elasticsearch(elastic_url)

index_name = 'denise-manual'
mapping = {
    "properties": {
        'accuracy': {
            "type": "integer"
        },
        "activity": {
            "type": "nested",
            "dynamic": False,
            "properties": {
                "activity": {
                    "type": "nested",
                    "dynamic": False,
                    "properties": {
                        "confidence": {
                            "type": "integer"
                        },
                        "type": {
                            "type": "keyword"
                        }
                    }
                },
                "timestampMs": {
                    "type": "keyword"
                }
            }
        },
        "point": {
            "type": "geo_point"
        },
        'latitude': {
            "type": "double"
        },
        'latitudeE7': {
            "type": "double"
        },
        'longitude': {
            "type": "double"
        },
        'longitudeE7': {
            "type": "double"
        },
        'timestamp': {
            "type": "date"
        },
        'timestampMs': {
            "type": "keyword"
        }
    }
}

arg_parser = ArgumentParser()
arg_parser.add_argument("input", help="Input File (JSON)")
args = arg_parser.parse_args()
locations = json.load(open(args.input))['locations']

es.indices.delete(index=index_name, ignore=404)
es.indices.create(index=index_name)
es.indices.put_mapping(index=index_name, body=mapping)

actions = []
for i, location in enumerate(locations):
    location["timestamp"] = datetime.fromtimestamp(int(location["timestampMs"]) / 1000)
    location["latitude"] = location['latitudeE7'] / 10000000
    location["longitude"] = location['longitudeE7'] / 10000000
    location["point"] = [location["longitude"], location["latitude"]]
    actions.append({
        "_index": index_name,
        "_id": i,
        "_source": location
    })

helpers.bulk(es, actions)

Samsung Health Data in Elasticsearch

Open Samsung Health App on the mobile phone.

Go to settings.

Scroll down and tap on download all personal data.

Confirm with your Samsung account password.

On the internal storage you find the data in the subfolder „Download“.

There you find the data splitted into CSV-files.

Bring the files up to a computer and there choose your relevant files (example: heartrate or sleepdata) to open them with Excel.
Crop the first line.

Navigate to your Kibana instance in browser.

There you can import the CSV-file. Choose a unique index name.

Then you can start visualize:

Check: 3PAR Storages Physical Disk State

Allgemein
Geht mit SSH. Keine zusätzlichen Pakete notwendig

Kopfzeilen des Checks für Quellreferenz
#!/bin/bash

# 3PAR Nagios check script v0.2
# Last update 2010/05/14 fredl@3par.com
# Last update 2011/03/03 ddu@antemeta.fr
Kommando deklarieren
# ARG1: URL to get
define command {
command_name check_3par_pd
command_line /opt/omd/versions/1.20/lib/nagios/plugins/check_3par $HOSTADDRESS$ $ARG1$ check_pd
}

Parametrieren mit legacy-checks
legacy_checks += [
(( „check_3par_pd!3paradm“, „3PAR Physical Devices“, True), [ „172.28.210.241“ ] ),
(( „check_3par_node!3paradm“, „3PAR Node“, True), [ „172.28.210.241“ ] ),
(( „check_3par_ld!3paradm“, „3PAR Logical Devices“, True), [ „172.28.210.241“ ] ),
(( „check_3par_vv!3paradm“, „3PAR Version“, True), [ „172.28.210.241“ ] ),
(( „check_3par_cap_fc!3paradm“, „3PAR FC CAP“, True), [ „172.28.210.241“ ] ),
(( „check_3par_cap_nl!3paradm“, „3PAR NL CAP“, True), [ „172.28.210.241“ ] ),
(( „check_3par_port_fc!3paradm“, „3PAR FC Port“, True), [ „172.28.210.241“ ] ),
]

Klingelton für SMS Kontakte beim Samsung Galaxy S10 einstellen

Die Samsuns Nachrichten (SMS) App öffen.

Dort einen Chat auswählen.

Über die 3 Punkte das Menü öffnen und einen anderen Benachrichtigungston auswählen.
Dort wird vielleicht noch nicht der gewünschte Klingelton angezeigt. Trotzdem muss hier einfach einer gewählt werden – z.B. Chaos (Standardbenachrichtigungston dar nicht ausgewählt werden).

Danach kann man unter den generellen Benachrichtigungseinstellungen von Android diese vorher gewählten Ton auch auf einen ganz eigenen Ton ändern.

Android Einstellungen öffnen.

Dann Benachrichtigungen öffnen.

Dann runterscrollen bis zur den Einstellungen der Nachrichten App (ggf. muss auf weitere anzeigen o.ä. geklickt werden).

Dort tauch nun der Kontakt als als eigene Kategorie auf und dort ist auch der Ton aus der vorherigen Einstellungen zu sehen (z.B. Chaos).

Da kann man nun endlich den Ton auf einen eigenen Stellen und dazu auch die normale Klingentonauswahl-App von Samsung nutzen.

Wird auch damit der gewünschte Ton nicht sichtbar, empfehle ich einen Blick auf die App „Zedge“ (ACHTUNG: leider sehr werbelastig).