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

Integrate with an external Prometheus data source #979

Open
morucci opened this issue Oct 26, 2022 · 1 comment
Open

Integrate with an external Prometheus data source #979

morucci opened this issue Oct 26, 2022 · 1 comment

Comments

@morucci
Copy link
Collaborator

morucci commented Oct 26, 2022

This story shares some idea about feasibility.

The general Idea is to display data results from a Prometheus query into a Monocle widget by having some part of a Monocle query that adapt the Prometheus query API call.

The need came from a discussion about how to Integrate Pelorus 1 metrics w/ the Monocle UI.

How this could work:

  • A list of PromQL queries are listed in a specific section of the Monocle configuration file. Each query provide metadata like: query-name, query-type (instant or range) 2.
  • A new Monocle query endpoint takes as input a Monocle Query and the name of the PromQL query then performs the request on the Prometheus API and returns either a structured JSON data (rendered by JS) or a ready to display graph (rendered server side) to the Monocle UI.

Some part of the Monocle query could be extracted to specialize the promQL query and the API call to the query or query_range endpoint. For instance:

  • from/to keywords should be extracted from the Monocle query to specify start/end prometheus parameters.
  • repo/author should be extracted and update the promQL query by adding a metadata selector such as failure_creation_timestamp{repo="todolist",issue_number="1"} where repo="todolist" is extracted from the Monocle query.
@morucci
Copy link
Collaborator Author

morucci commented Oct 26, 2022

@mpryc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant