Giter VIP home page Giter VIP logo

astro_monitor's Introduction

Astro monitor

Your image title

A small program that can help you with your astro session. The main functionality is the watchdog; if astromonitor notices Kstars is dead il will send a request to notify you via telegram. The other cool feature is the backup, astromonitor can backup:

  • your INDI configuration for your devices
  • the profile containing your equipment and setup
  • PHD2 profile
  • generic Kstars option (theme, colors, etc.)

you can restore the backup on an other PC or when installing the suite again.

Have a look at how it works

astromonitor_gh.mp4

Install

you trust me? run the following command

wget -O - https://raw.githubusercontent.com/MattBlack85/astro_monitor/main/install.sh | sh

sudo will be needed as last step to move astromonitor to /usr/local/bin

How to use astromonitor

Using astromonitor is easy, just follow these instruction

First step - obtain a token using telegram

On telegram, look for @AstroMonitorBot (the icon is the bubble nebula from hubble) and send a /register command, it will answer with a token, store it in a safe place, that's your key for the backups.

Make a backup

Open a terminal and run astromonitor --do-backup XXXXXXXXXXXXXXXXXX paste your key obtained in the previous step instead of XXXXXXXXXX

Retrieve a previously made backup

Open a terminal and run astromonitor --retrieve-backup XXXXXXXXXXXXXXXXXX paste your key obtained in the previous step instead of XXXXXXXXXX

Monitor Kstars during a session

Open a terminal and run astromonitor --kstars XXXXXXXXXXXXXXXXXX paste your key obtained in the previous step instead of XXXXXXXXXX

This will start monitoring Kstars and if it crashes, it will send you a notification via telegram

List of all functionalities:

you can obtain the same list by running astromonitor --help, here what we actually support:

  • --kstars monitor Kstars and send a telegram notification if it crashes during a session
  • --do-backup make a backup of the Kstars database and INDI devices configuration and store it remotely
  • --retrieve-backup restore the previously saved backup
  • --fd-monitor monitor file descriptors used to check if there is any leak
  • --system-monitor monitor system resources (CPU and RAM) usage and log it

The main folder where you'll find the logs is ~/.local/share/astromonitor/logs

Compile it and run

If you want to compile it by yourself, the project is pure Rust, you just need the rust toolchain (see https://rustup.rs/), then clone this repo with git clone https://github.com/MattBlack85/astro_monitor or git clone [email protected]:MattBlack85/astro_monitor cd into the folder cd astro_monitor and then cargo build --release. You will find the compiled program then under target/release/astromonitor you can move the program around (for example /usr/local/bin)

astro_monitor's People

Contributors

m-molinari avatar mattblack85 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

astro_monitor's Issues

Multiplatform retrieve issue on Kstars preference path

Creating a backup from Linux and retrieving on macOS opening Kstars I get this error.

Unable to find INDI drivers directory: /usr/local/share/indi
Please make sure to set the correct path in KStars configuration

Before the backup on macOS in INDI general preferences the default paths was: *internal INDI Server* and *internal INDI Driver*; after the restore from Linux backup: /us/local/bin/indiserver and /us/local/share/indi

Backing up configurations is so convenient...
Proposals:

  1. specify in the readme that crossplatform restore is not supported
  2. specify in the readme which paths might need to be corrected
  3. add an option to the --retrieve_backup command to exclude certain files (eg. [--ignore kstars_option], etc.)

Before restore:
Screenshot 2024-03-11 alle 15 37 33

After restore:
Screenshot 2024-03-11 alle 15 33 35

move to ini-like config

This will allow first to store the token without asking for it every time and additionally it will allow for config based features.

Unfortunately this is a breaking change, so it will land in 2.x

Restart kstars/ekos?

Would the watchdog be able to restart kstars/ekos and have it pick up where it left off after a crash?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.