Skip to content

Fetch health condition (enhancement) #27

@MichelDiz

Description

@MichelDiz

Is it possible to add a fetch to the health condition of the instance?

I would like to make routine checks within my application.
Without having to turn to Prometheus / Grafana.

In my case, the Dgraph Server instance and Zero are behind an API. I do not expose them. I've tried using isomorphic-fetch but the result format is not compatible. And as I'm using Rancher, it gets tricky to keep exact internal domainname.

fetch('http://192.168.1.200:8089/health')
  .then(function(response) {
    if (response.status >= 400) {
      throw new Error('Bad response from server');
    }
    return response.json();
  })
  .then(function(response) {
    console.log(response.json());
  });

It would be possible?

Thanks.

Cheers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions