Giter Club home page Giter Club logo

uptimeagent's Introduction

UptimeAgent

Latest Release Docker Hub All Releases Issues GitHub Donate

UptimeAgent is a docker image written in Python to push the status of another docker container to an external server.

Installation

Simplest way to use the image is through docker compose.

docker-compose.yml

services:
  uptimeagent:
    container_name: uptimeagent
    image: tiuub/uptimeagent
    command: celery -A uptime_agent beat --loglevel=info
    environment:
      - "BROKER_URL=redis://uptimeagent-redis:6379/0"
      - "REDBEAT_REDIS_URL=redis://uptimeagent-redis:6379/1"
  uptimeagent-worker:
    container_name: uptimeagent-worker
    image: tiuub/uptimeagent
    command: celery -A uptime_agent worker --loglevel=info
    environment:
      - "BROKER_URL=redis://uptimeagent-redis:6379/0"
      - "REDBEAT_REDIS_URL=redis://uptimeagent-redis:6379/1"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
  uptimeagent-redis:
    container_name: uptimeagent-redis
    image: redis:6.2-alpine
    restart: always

Usage

The agent can be started through the labels of a container. These you can easily add in the docker-compose.yml of a container.

Example

services:
  whoami:
    image: "containous/whoami"
    container_name: "whoami"
    healthcheck:
      test: timeout 10s bash -c ':> /dev/tcp/127.0.0.1/80' || exit 1
      interval: 30s
      timeout: 15s
      retries: 3
    labels:
      - "uptime-agent.enable=true"
      - "uptime-agent.healthcheck.docker.enable=true"
      - "uptime-agent.healthcheck.docker.interval=12"
      - "uptime-agent.healthcheck.docker.pusher.0.url=https://uptime-kuma.de/api/push/FFFFFF?status=up&msg=OK&ping="
      - "uptime-agent.healthcheck.docker.pusher.0.method=GET"
      - "uptime-agent.healthcheck.docker.pusher.0.trigger=healthy,unhealthy,starting"

      - "uptime-agent.healthcheck.ping.0.enable=true"
      - "uptime-agent.healthcheck.ping.0.url=http://whoami/"
      - "uptime-agent.healthcheck.ping.0.method=GET"
      - "uptime-agent.healthcheck.ping.0.status_codes=500"
      - "uptime-agent.healthcheck.ping.0.pusher.0.url=https://uptime-kuma.de/api/push/FFFFFF?status=up&msg={status}&ping="
      - "uptime-agent.healthcheck.ping.0.pusher.0.method=GET"
      - "uptime-agent.healthcheck.ping.0.pusher.0.trigger=healthy,unhealthy,starting,none"
      - "uptime-agent.healthcheck.ping.1.enable=true"
      - "uptime-agent.healthcheck.ping.1.url=http://whoami/"
      - "uptime-agent.healthcheck.ping.1.method=GET"
      - "uptime-agent.healthcheck.ping.1.pusher.0.url=https://uptime-kuma.de/api/push/FFFFFF?status=up&msg={status}&ping="

License

GitHub

uptimeagent's People

Contributors

tiuub avatar

Watchers

 avatar

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.