Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prometheus HTTP API support more endpoints #1016

Closed
yuanbohan opened this issue Feb 15, 2023 · 3 comments
Closed

Prometheus HTTP API support more endpoints #1016

yuanbohan opened this issue Feb 15, 2023 · 3 comments
Assignees
Labels
C-enhancement Category Enhancements
Milestone

Comments

@yuanbohan
Copy link
Contributor

What type of enhancement is this?

API improvement

What does the enhancement do?

In addition to query and query_range endpoints, as Prometheus HTTP API describes, there are some other useful endpoints which will help Prometheus users to explore the metadata or details of the datasets. And these endpoints will help greptimedb to be integrated into other systems more smoothly as a Prometheus service.

One example:

curl 'localhost:9090/api/v1/labels'
{
    "status": "success",
    "data": [
        "__name__",
        "call",
        "code",
        "config",
        "dialer_name",
        "endpoint",
        "event",
        "goversion",
        "handler",
        "instance",
        "interval",
        "job",
        "le",
        "listener_name",
        "name",
        "quantile",
        "reason",
        "role",
        "scrape_job",
        "slice",
        "version"
    ]
}

Implementation challenges

There are so many challenges to implement these endpoints as Prometheus describes, such as:

  • metadata. greptimedb store no metadata at all.
  • targets. greptimedb has no target concept.
@yuanbohan yuanbohan added the C-enhancement Category Enhancements label Feb 15, 2023
@yuanbohan
Copy link
Contributor Author

#596 needs to consider this issue carefully.

@yuanbohan
Copy link
Contributor Author

yuanbohan commented Feb 15, 2023

SHOULD

NO NEED

  • GET /api/v1/targets
  • GET /api/v1/rules
  • GET /api/v1/alerts
  • GET /api/v1/targets/metadata
  • GET /api/v1/metadata
  • GET /api/v1/alertmanagers
  • GET & POST /api/v1/query_exemplars

status

  • GET /api/v1/status/config
  • GET /api/v1/status/flags
  • GET /api/v1/status/runtimeinfo
  • GET /api/v1/status/buildinfo
  • GET /api/v1/status/tsdb
  • GET /api/v1/status/walreplay

admin

  • POST & PUT /api/v1/admin/tsdb/snapshot
  • POST & PUT /api/v1/admin/tsdb/delete_series
  • POST & PUT /api/v1/admin/tsdb/clean_tombstones

@waynexia
Copy link
Member

Close as completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category Enhancements
Projects
Status: Done
Status: Todo
Development

No branches or pull requests

3 participants