E2E Integration with Prometheus #38
Replies: 2 comments 2 replies
-
|
This is an excellent idea @pazbardanl! I wonder if the Prometheus protocol is open, as in maybe Prometheus is so popular that other non-Prometheus databases will allow you to query using the Prometheus protocol. If so this would be even more useful. The approach we took in the azure-importer required us to store certain sensitive data in env variables (for making the API calls etc...) I think we'd need something like that here also. The approach we took in azure-importer was to put the query params as the first input in the child component rather than the config. Not sure if that was the right approach but the reasoning was then you could have a shared pipeline at a higher level node and then customise the query at the component level, like so: graph:
children:
child: # an advanced grouping node
pipeline:
- prometheus-importer
...
...
...
- prometheus-exporter
config:
prometheus-importer:
{prometheus connection info}
...
...
...
prometheus-exporter:
{prometheus connection info}
children:
child-1:
inputs: {data source / table from which to fetch input data}
child-2:
inputs: {data source / table from which to fetch input data}
child-2:
inputs: {data source / table from which to fetch input data} |
Beta Was this translation helpful? Give feedback.
-
|
ok so as far as i could gather there is no way to directly query a different / non-Prometheus database using PromQL (Prometheus query language). There is a way to do that indirectly by "hooking" Prometheus to a DB and then reading/writing to that DB via Prometheus using PromQL. What i can propose here, similar to our thread on Wrapper / Template for non-Typescript models Also, I've filled in some of the blanks in the impl / manifest example you provided above. graph:
children:
child: # an advanced grouping node
pipeline:
- prometheus-importer
...
...
...
- prometheus-exporter
config:
prometheus-importer:
targets: ['prometheus:9090']
...
...
...
prometheus-exporter:
- job_name: 'pushgateway_metrics'
honor_labels: true
static_configs:
- targets: ['pushgateway:9091']
children:
child-1:
inputs:
metric: cpu_util
instance: some-instance-1
start: 2023-11-02T10:35:31
end: 2023-11-02T10:42:01
child-2:
inputs:
metric: cpu_util
instance: some-instance-2
start: 2023-11-02T10:00:31
end: 2023-11-02T10:05:01 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Prize category
User Story
Rationale
Carbon emissions are a metric. It's data we produce using the Impact Framework. As such, we would want it to be stored and ready to use just like any other metric that is being monitored by Devops, Site Reliability Engineers an others.
On the same note: we should be able to fetch (import) metric data from the same storage to use as input to IF.
Impact
Looking forward to stuff being built on top of IF (Beta?), successfully implementing this idea will put it in a great starting point for being used to enhance observability.
A ready-to-use manifest file, backed by proper Prometheus importer and exported models, will:
(1) Encourage people to look at carbon emission as a metric to monitor, alert and make decisions based-of.
(2) Show how IF caters to the common use case of Observability.
Implementation guidelines
Difficulty
4/5
Scope Of Work
2 new models: Prometheus importer and exporter
A local instance of Prometheus with CPU data (could be random/fake static data)
A manifest file where the pipeline starts with the Prometheus importer and closes with the Prometheus exporter
IDEALLY a demo, visualizing inputs (like CPU util) and output (carbon) on the same dashboard, emphasizing that data for both was extracted from the same Prometheus instance
A new model plugin
A new feature in an existing model plugin
A manifest file will have to be written
Implement test cases
A new feature to the framework itself (the cli tool)
It will require changes to the documentation
Examples and resources
getting started with Prometheus
Manifest File
Beta Was this translation helpful? Give feedback.
All reactions