Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/riotkit-org/riothealthflux
Collects healthcheck statuses from UptimeRobot and Infracheck as sources, then pushes to InfluxDB
https://github.com/riotkit-org/riothealthflux
anarchist anarchist-federation dashboard devops docker healthcheck healthchecks influxdb monitoring php8 riotkit server server-monitoring sysadmin sysadmin-tool uptime-robot uptimerobot uptimerobot-api
Last synced: 28 days ago
JSON representation
Collects healthcheck statuses from UptimeRobot and Infracheck as sources, then pushes to InfluxDB
- Host: GitHub
- URL: https://github.com/riotkit-org/riothealthflux
- Owner: riotkit-org
- License: apache-2.0
- Created: 2018-04-28T18:23:06.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-08T19:19:41.000Z (about 4 years ago)
- Last Synced: 2023-03-03T21:54:25.330Z (almost 2 years ago)
- Topics: anarchist, anarchist-federation, dashboard, devops, docker, healthcheck, healthchecks, influxdb, monitoring, php8, riotkit, server, server-monitoring, sysadmin, sysadmin-tool, uptime-robot, uptimerobot, uptimerobot-api
- Language: PHP
- Homepage:
- Size: 699 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
RiotKit HealthFlux
==================Pushes information about healthchecks status into InfluxDB 1.8+/2.0+ basing on data from UptimeRobot service and Infracheck endpoints.
![.github/img.png](.github/img.png)
Hardware requirements
---------------------- CPU: 1vCPU (almost does not use CPU, any will be ok)
- Memory: 64MB RAM
- Disk space: 60MB (in docker 100 MB)InfluxDB 1.8+ query
-------------------```sql
SELECT last("up_int") FROM "riothealthflux" WHERE $timeFilter GROUP BY "name"
```Metrics + example values
------------------------- checked_by: "Infracheck" / "UptimeRobot"
- name: "SSL Certificate: iwa-ait.org"
- url: "https://infracheck.my-network.local/my-strong-secret-code/"
- ident: "SSL Certificate: iwa-ait.org_https://infracheck.my-network.local/my-strong-secret-code/"
- up: "true" / "false"- tag(up): "true" / "false"
- tag(up_int): "1" / "0"
- tag(id): "md5-hash-there"
- tag(url): "https://infracheck.my-network.local/my-strong-secret-code/"
- tag(name): "SSL Certificate: iwa-ait.org"Usage with docker
-----------------```yaml
version: "2.4"
services:
healthflux:
image: quay.io/riotkit/riothealthflux:3.0.0
environment:
INFLUXDB_URL: "http+influxdb://${INFLUXDB_USER}:${INFLUXDB_USER_PASSWORD}@influxdb:8086/${STATS_DB_NAME}"
# list of providers, separated by ";"
# Supported providers: Infracheck, UptimeRobot
#
# Infracheck with a secret code:
# Infracheck://http://health.my-network.somewhere/infracheck-secret-code-there
#
# Infracheck without secret code:
# Infracheck://http://health.my-network.somewhere/
#
# UptimeRobot (token you can generate in UptimeRobot web user interface in dashboard settings):
# UptimeRobot://your-token-there
#
RIOT_PROVIDERS: "UptimeRobot://aaaaa-bbbbbb;UptimeRobot://xxxx-yyyyyy;Infracheck://cccccc-ddddddd"
# time interval in seconds how often to write data to InfluxDB
# (consider fact that eg. UptimeRobot in free plan is running checks every 5 minutes.
# Infracheck is open and free, and can run checks more often as you wish)
SLEEP_TIME: "60"# allows to customize the measurement name that is pushed to the InfluxDB
INFLUXDB_MEASUREMENT_NAME: "riothealthflux"
```Usage without docker
--------------------**Requirements:**
- PHP 8.0+
- Composer
- php-curl (PHP extension)
- php-json (PHP extension)```bash
composer installexport RIOT_PROVIDERS="Infracheck://http://127.0.0.1:8000;UptimeRobot://..."
export INFLUXDB_URL="http+influxdb://bakunin:bakunin@localhost:8086/hulajpole"# optional: Configure measurement name
export INFLUXDB_MEASUREMENT_NAME="riothealthflux"# run each time you want to push the data to InfluxDB
# put it in a loop with a sleep, or schedule with a crontab
./bin/console background-process
```Releasing
---------1. Create a release in Github releases
2. Wait for pipeline to build and publish to docker registryKeywords
--------UptimeRobot to InfluxDB. Healthchecks in Grafana.
From authors
------------We are grassroot activists for social change, so we created RKD especially in mind for those fantastic initiatives:
- RiotKit (https://riotkit.org)
- International Workers Association (https://iwa-ait.org)
- Anarchistyczne FAQ (http://anarchizm.info) a translation of Anarchist FAQ (https://theanarchistlibrary.org/library/the-anarchist-faq-editorial-collective-an-anarchist-faq)
- Federacja Anarchistyczna (http://federacja-anarchistyczna.pl)
- Związek Syndykalistów Polski (https://zsp.net.pl) (Polish section of IWA-AIT)
- Komitet Obrony Praw Lokatorów (https://lokatorzy.info.pl)
- Solidarity Federation (https://solfed.org.uk)
- Priama Akcia (https://priamaakcia.sk)Special thanks to `Working Class History `_ for very powerful samples that we could use in our unit tests.