Skip to content

mathislindner/phonetrack2prometheus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phonetrack2prometheus

A flask based server that will exposes a route (with authentication) for a user to send their live location from the nextcloud phonetrack app that is maintaned by the kind @julien-nc

get started

  1. the .env should look sth like this:
FLASK_USERNAME=USERNAME
FLASK_PASSWORD=YOURWELLSECUREDPW
FLASK_HOST=0.0.0.0
FLASK_PORT=5000
  1. make sure you configure prometheus accordingly:
- job_name: 'phonetrack'
    scheme: https
    static_configs:
      - targets: ['address.to.server.that.hosts.phonetrack2prometheus']
    basic_auth:
      username: 'USERNAME'
      password: 'YOURWELLSECUREDPW'

  1. (optional) use grafana to display the metrics (I may publish my dashboard sometime)
  2. configure phontrack on your phone with authentication

Notes

  • DISCLAIMER: there are a few things that are not best practice, make sure your know what you are doing. This is just a boilerplate for people who are too lazy to reverse engineer the readings of the phonetrack json
  • Will only work when the phone is online, does not store the time when stat was sent from phone
  • With this setup, we only handle local network incoming requests obvs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published