Giter VIP home page Giter VIP logo

griffin's People

Contributors

dependabot[bot] avatar kasvith avatar sdglhm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

griffin's Issues

Time parser is buggy

Describe the bug
If you have a duration like 10hreouz its still accepted as hours

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Configuration for griffin

Griffin is supposed to be easily configurable, fast solution for monitoring external backend services.
It should be able to know the backends, their health check method(ping or GET), the interval of testing and notification methods

Since YAML is highly used in DevOps environments, it's better to stick with YAML syntax for the operation.

A sample config would be like

services:
  - name: Foo Web Service
    host: foo.example.com
    health:
      - method: http
        endpoint: /status
        interval: 10s
      - method: ping
        interval: 5s
  - name: Bar Web Service
    host: bar.example.com
    health:
      - method: http
        endpoint: /statuz
        interval: 15s
      - method: ping
        interval: 10s
alerts:
  - type: Email
    from: [email protected]
    to: [email protected]
  - type: Webhook
    url: https://mywebhook.com/abcd13345

Allow using params from environment variables

# Sample griffin file

services:
  - name: Foo Web Service
    host: $FOO_HOST
    health:
      - method: http
        endpoint: /status
        port: 4040
        interval: 1h
      - method: ping
  - name: Bar Web Service
    host: bar.example.com
    health:
      - method: http
        endpoint: /statuz
        interval: 15s
      - method: ping
        interval: 30ms
alerts:
  - type: Email
    from: [email protected]
    to: [email protected]
  - type: Webhook
    url: $WEBHOOK_URL

Need to expand the environment variables

Send notifications

  • Define a Notification Trait
  • Implement
    • Discord
    • Slack
    • Email

Notifications

Implementing HTTP health check

As per mentioned in #1 we want a way to check health from a given backend.

  • it should do a GET request if a path is not provided by the user
  • if the path is given request should be forwarded to it
  • the result will determine the state of the backend service(for now lets simply pick != 200)
  • it should be able to configure the interval

Expose API

  • Expose a REST API from griffin
    • Get server status in JSON format

Save up/down notifications into a database

Griffin should save collected information to a database like sqlite so we can later display the result

Something like following would be enough as a starting point,

service: service.example.com
datetime: utc_time_code
status: response_status

Handle time units with Serde

At the moment, we do not handle any time units with the application so this leads to errors when running the application. It would be best if we could handle time units using Serde.

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.