Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

707
Visualizações
Grafana prometheus with fastapi

I'm curious about this Prometheus, can I develop a Grafana with Prometheus as a data source with fastapi URL? Right now I'm developing on Grafana monitoring dashboard and I have an API using fastapi and I'm using this API as a data source with SimpleJSON plugin on Grafana. But now I'm a little curious about this Prometheus, is it possible to use my API as a Prometheus data source? If so, what endpoint that I should provide? For now for SimpleJSON Plugin it required /, /search and /query. How about Prometheus data sources?

Many Thanks

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

"Data source" means something specific in Grafana. Prometheus data source has a well defined path for its queries; you can't modify that. There is an HTTP JSON+API datasource for Grafana if you search its plugins - https://marcus.se.net/grafana-json-datasource/

However, that's completely bypassing Prometheus longer-term storage. Prometheus reads scrape targets, then collects and aggregates that.

To do so, your API would need to expose any route that returns Prometheus "exposition format", not JSON. This route is put in the Prometheus config file, not into Grafana anywhere.

While Prometheus can load random data, it's better to use Counter, Guage, etc types it expects

The OpenTelemetry project should be able to be used in any framework, and there are examples in their documentation for the Python module.

If your goal is to just get any data, not metrics, into Grafana, using an RDBMS or Mongodb, or other supported data sources might be better

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda