fix(observabilidade): corrigir labels e migrar dashboard MongoDB para Grafana v2#25
Merged
Merged
Conversation
…s incorretas Labels do mongodb_exporter 0.44 diferem da versão anterior: - conn_type substitui state em mongodb_ss_connections - legacy_op_type substitui type em mongodb_ss_opcounters - doc_op_type substitui state em mongodb_ss_metrics_document - csr_type substitui state em mongodb_ss_metrics_cursor_open - mongodb_ss_network_bytesIn substitui mongodb_ss_network_bytes_in_total - mongodb_ss_globalLock_currentQueue substitui a versão _total Reorganiza layout em quatro seções: Status Geral, Memória e Rede, Documentos e Cursores, Logs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
schemaVersion: 38, flatpanels[]) to Grafana v2 API format (apiVersion: dashboard.grafana.app/v2,elements{}+RowsLayout)percona/mongodb_exporterupgrade to v0.44Root cause
The dashboard was built targeting an older exporter version. After upgrading to
percona/mongodb_exporter:0.44.0, all label names changed and every panel returned "No data":mongodb_ss_connectionsstateconn_typemongodb_ss_opcounters_total, labeltypelegacy_op_typemongodb_ss_metrics_document_total, labelstatedoc_op_typemongodb_ss_metrics_cursor_openstatecsr_typemongodb_ss_globalLock_currentQueue_totalcount_typemongodb_ss_network_bytes_*mongodb_ss_network_bytes_in_totalmongodb_ss_network_bytesInChanges
observabilidade/grafana/dashboards/mongodb.jsonpanels[]to v2elements{}+RowsLayoutrequired by Grafana 13mongodb_up, conexões ativas/disponíveis, memória residente, fila bloqueada, taxa de operaçõesmongodb_ss_mem_resident+virtualover time,mongodb_ss_network_bytesIn/Outratemongodb_ss_metrics_documentbydoc_op_type, cursores abertos (csr_type="total"), conexões over time{container="bv-mongodb"}via Loki datasourceloki-bvTest plan
docker compose ps— all servicesUp (healthy)curl localhost:9216/metrics | grep mongodb_upreturns1curl localhost:9090/api/v1/query?query=mongodb_upreturnsresult[0].value = "1"http://localhost:3001— all panels show data, no "No data" bannersbv-mongodbcontainer log stream🤖 Generated with Claude Code