Skip to content

Proposal: allow generic REST service? #196

@bobfang1992

Description

@bobfang1992

Hi, this might be a bit naive but is it possible to allow the monitor to query against any generic REST service and then just display the response?

For example a config can look at this:

{
  "name": "REST",
  "domain": "mydoamin.com",
  "configuration": {
    "slugs": [
         {
            "url": "/api/v1/is_service_okay",
            "extractor": "status",
            "pattern": {
                "okay": "green",
                "error": "red"
             }
         }
    ]
  }
}

The the monitor will periodically hit mydomain.com/api/v1/is_service_okay and then check the return value. It extract the result using payload["status"] as specified by the extractor (there might be more suitable json extracting syntax out there, just an example" and then match the result with the pattern you specified, if it is okay then show green, if not then show red.

Do you think this is possible? If so I could contribute, where do I start?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions