Luna is a simple monitoring system for invisible devices or services, like a RaspberryPi in your home or a scheduled task. It checks whether a monitored item is able to send requests during the required interval.
- checking a RaspberryPi is running with internet connection
- checking a scheduled task is triggered regularly
- checking an application not listening ports is up
When Luna finds a monitored item missing, she will send you a notification. You can specify your notification info when adding or changing a monitored item.
- Slack
- the monitored item can send HTTP GET requests at a regular interval
- the monitored item can reach the Luna server
- the Luna server has Internet access
Luna is developed using Django, the development and deployment process is just like normal Django apps. However,there are a few things that need to be taken special care of.
- Luna uses production settings if an environment variable DJANGO_PRODUCTION is set , otherwise she uses development settings.
- add
luna/settings_prod.py
file to add or override settings for production (Required). An example ofsettings_prod.py
(settings_prod.py.example
) is included for ease of use. - add
luna/settings_dev.py
file to add or override settings for development (Optional).
Luna uses a Django management command checkpony
to check monitored items and send notifications. In production, you need to run this command every 5 minutes(using crontab under unix like system or Task Scheduler under Windows).
A Linux crontab example:
*/5 * * * * DJANGO_PRODUCTION=1 python management.py checkpony
(don't forget to set environment variable DJANGO_PRODUCTION ,if you are using it in production deployment. )
3. If you are not familiar with Django, you can follow this step-to-step guide to set up Luna in production(though basic Linux and database skills needed).
After deployment, navigate to Luna's index page in your browser. The index page will show the necessary steps and detailed api info for you to start monitoring.
If you are a fan of My Little Pony, you must have been familiar with Princess Luna. In Equestria, Princess Luna manages the Moon and the night, she protects little ponies from nightmares.She will find ponies who are in a nightmare, go into that dream and help the pony get out of it.