Grafana
Interagir com dashboards, alertas e anotações do Grafana
Grafana é uma plataforma open-source líder em monitoramento, observabilidade e visualização. Ela permite que usuários consultem, visualizem, alertem e analisem dados de várias fontes, tornando-se uma ferramenta essencial para monitoramento de infraestrutura e aplicações.
Com o Grafana, você pode:
- Visualizar dados: Construir e personalizar dashboards para exibir métricas, logs e traces em tempo real
- Monitorar saúde e status: Verificar a saúde da sua instância Grafana e fontes de dados conectadas
- Gerenciar alertas e anotações: Configurar regras de alerta, gerenciar notificações e anotar dashboards com eventos importantes
- Organizar conteúdo: Organizar dashboards e fontes de dados em pastas para melhor gerenciamento de acesso
No ZippyVendas, a integração do Grafana capacita seus agentes a interagir diretamente com sua instância Grafana via API, habilitando ações como:
- Verificar o status de saúde do servidor Grafana, banco de dados e fontes de dados
- Recuperar, listar e gerenciar dashboards, regras de alerta, anotações, fontes de dados e pastas
- Automatizar o monitoramento da sua infraestrutura integrando dados e alertas do Grafana em suas automações de fluxo de trabalho
Essas capacidades permitem que agentes do ZippyVendas monitorem sistemas, respondam proativamente a alertas e ajudem a garantir a confiabilidade e visibilidade de seus serviços — tudo como parte de seus fluxos de trabalho automatizados.
Integre o Grafana nos fluxos de trabalho. Gerencie dashboards, alertas, anotações, fontes de dados, pastas e monitore status de saúde.
Obter um dashboard por seu UID
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (ex: https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
dashboardUid | string | Sim | O UID do dashboard a recuperar |
| Parâmetro | Tipo | Descrição |
|---|
dashboard | json | O objeto JSON completo do dashboard |
meta | json | Metadados do dashboard (versão, permissões, etc.) |
Buscar e listar todos os dashboards
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (ex: https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
query | string | Não | Consulta de busca para filtrar dashboards por título |
tag | string | Não | Filtrar por tag (separadas por vírgula para múltiplas tags) |
folderIds | string | Não | Filtrar por IDs de pasta (separados por vírgula) |
starred | boolean | Não | Retornar apenas dashboards favoritos |
limit | number | Não | Número máximo de dashboards a retornar |
| Parâmetro | Tipo | Descrição |
|---|
dashboards | array | Lista de resultados de busca de dashboards |
Criar um novo dashboard
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (ex: https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
title | string | Sim | O título do novo dashboard |
folderUid | string | Não | O UID da pasta para criar o dashboard |
tags | string | Não | Lista de tags separadas por vírgula |
timezone | string | Não | Fuso horário do dashboard (ex: browser, utc) |
refresh | string | Não | Intervalo de atualização automática (ex: 5s, 1m, 5m) |
panels | string | Não | Array JSON de configurações de painéis |
overwrite | boolean | Não | Sobrescrever dashboard existente com mesmo título |
message | string | Não | Mensagem de commit para a versão do dashboard |
| Parâmetro | Tipo | Descrição |
|---|
id | number | O ID numérico do dashboard criado |
uid | string | O UID do dashboard criado |
url | string | O caminho URL para o dashboard |
status | string | Status da operação (success) |
version | number | O número de versão do dashboard |
slug | string | Slug amigável para URL do dashboard |
Atualizar um dashboard existente. Busca o dashboard atual e mescla suas alterações.
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (ex: https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
dashboardUid | string | Sim | O UID do dashboard a atualizar |
title | string | Não | Novo título para o dashboard |
folderUid | string | Não | Novo UID de pasta para mover o dashboard |
tags | string | Não | Lista separada por vírgula de novas tags |
timezone | string | Não | Fuso horário do dashboard (ex: browser, utc) |
refresh | string | Não | Intervalo de atualização automática (ex: 5s, 1m, 5m) |
panels | string | Não | Array JSON de configurações de painéis |
overwrite | boolean | Não | Sobrescrever mesmo se houver conflito de versão |
message | string | Não | Mensagem de commit para esta versão |
| Parâmetro | Tipo | Descrição |
|---|
id | number | O ID numérico do dashboard atualizado |
uid | string | O UID do dashboard atualizado |
url | string | O caminho URL para o dashboard |
status | string | Status da operação (success) |
version | number | O novo número de versão do dashboard |
slug | string | Slug amigável para URL do dashboard |
Excluir um dashboard por seu UID
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (ex: https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
dashboardUid | string | Sim | O UID do dashboard a excluir |
| Parâmetro | Tipo | Descrição |
|---|
title | string | O título do dashboard excluído |
message | string | Mensagem de confirmação |
id | number | O ID do dashboard excluído |
Listar todas as regras de alerta na instância Grafana
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (ex: https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
| Parâmetro | Tipo | Descrição |
|---|
rules | array | Lista de regras de alerta |
Get a specific alert rule by its UID
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (e.g., https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
alertRuleUid | string | Sim | The UID of the alert rule to retrieve |
| Parâmetro | Tipo | Descrição |
|---|
uid | string | Alert rule UID |
title | string | Alert rule title |
condition | string | Alert condition |
data | json | Alert rule query data |
folderUID | string | Parent folder UID |
ruleGroup | string | Rule group name |
noDataState | string | State when no data is returned |
execErrState | string | State on execution error |
annotations | json | Alert annotations |
labels | json | Alert labels |
Create a new alert rule
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (e.g., https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
title | string | Sim | The title of the alert rule |
folderUid | string | Sim | The UID of the folder to create the alert in |
ruleGroup | string | Sim | The name of the rule group |
condition | string | Sim | The refId of the query or expression to use as the alert condition |
data | string | Sim | JSON array of query/expression data objects |
forDuration | string | Não | Duration to wait before firing (e.g., 5m, 1h) |
noDataState | string | Não | State when no data is returned (NoData, Alerting, OK) |
execErrState | string | Não | State on execution error (Alerting, OK) |
annotations | string | Não | JSON object of annotations |
labels | string | Não | JSON object of labels |
| Parâmetro | Tipo | Descrição |
|---|
uid | string | The UID of the created alert rule |
title | string | Alert rule title |
folderUID | string | Parent folder UID |
ruleGroup | string | Rule group name |
Update an existing alert rule. Fetches the current rule and merges your changes.
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (e.g., https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
alertRuleUid | string | Sim | The UID of the alert rule to update |
title | string | Não | New title for the alert rule |
folderUid | string | Não | New folder UID to move the alert to |
ruleGroup | string | Não | New rule group name |
condition | string | Não | New condition refId |
data | string | Não | New JSON array of query/expression data objects |
forDuration | string | Não | Duration to wait before firing (e.g., 5m, 1h) |
noDataState | string | Não | State when no data is returned (NoData, Alerting, OK) |
execErrState | string | Não | State on execution error (Alerting, OK) |
annotations | string | Não | JSON object of annotations |
labels | string | Não | JSON object of labels |
| Parâmetro | Tipo | Descrição |
|---|
uid | string | The UID of the updated alert rule |
title | string | Alert rule title |
folderUID | string | Parent folder UID |
ruleGroup | string | Rule group name |
Delete an alert rule by its UID
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (e.g., https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
alertRuleUid | string | Sim | The UID of the alert rule to delete |
| Parâmetro | Tipo | Descrição |
|---|
message | string | Confirmation message |
List all alert notification contact points
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (e.g., https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
| Parâmetro | Tipo | Descrição |
|---|
contactPoints | array | List of contact points |
Create an annotation on a dashboard or as a global annotation
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (e.g., https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
text | string | Sim | The text content of the annotation |
tags | string | Não | Comma-separated list of tags |
dashboardUid | string | Não | UID of the dashboard to add the annotation to (optional for global annotations) |
panelId | number | Não | ID of the panel to add the annotation to |
time | number | Não | Start time in epoch milliseconds (defaults to now) |
timeEnd | number | Não | End time in epoch milliseconds (for range annotations) |
| Parâmetro | Tipo | Descrição |
|---|
id | number | The ID of the created annotation |
message | string | Confirmation message |
Query annotations by time range, dashboard, or tags
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (e.g., https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
from | number | Não | Start time in epoch milliseconds |
to | number | Não | End time in epoch milliseconds |
dashboardUid | string | Não | Filter by dashboard UID |
panelId | number | Não | Filter by panel ID |
tags | string | Não | Comma-separated list of tags to filter by |
type | string | Não | Filter by type (alert or annotation) |
limit | number | Não | Maximum number of annotations to return |
| Parâmetro | Tipo | Descrição |
|---|
annotations | array | List of annotations |
Update an existing annotation
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (e.g., https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
annotationId | number | Sim | The ID of the annotation to update |
text | string | Sim | New text content for the annotation |
tags | string | Não | Comma-separated list of new tags |
time | number | Não | New start time in epoch milliseconds |
timeEnd | number | Não | New end time in epoch milliseconds |
| Parâmetro | Tipo | Descrição |
|---|
id | number | The ID of the updated annotation |
message | string | Confirmation message |
Delete an annotation by its ID
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (e.g., https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
annotationId | number | Sim | The ID of the annotation to delete |
| Parâmetro | Tipo | Descrição |
|---|
message | string | Confirmation message |
List all data sources configured in Grafana
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (e.g., https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
| Parâmetro | Tipo | Descrição |
|---|
dataSources | array | List of data sources |
Get a data source by its ID or UID
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (e.g., https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
dataSourceId | string | Sim | The ID or UID of the data source to retrieve |
| Parâmetro | Tipo | Descrição |
|---|
id | number | Data source ID |
uid | string | Data source UID |
name | string | Data source name |
type | string | Data source type |
url | string | Data source connection URL |
database | string | Database name (if applicable) |
isDefault | boolean | Whether this is the default data source |
jsonData | json | Additional data source configuration |
List all folders in Grafana
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (e.g., https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
limit | number | Não | Maximum number of folders to return |
page | number | Não | Page number for pagination |
| Parâmetro | Tipo | Descrição |
|---|
folders | array | List of folders |
Create a new folder in Grafana
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|
apiKey | string | Sim | Token de Conta de Serviço do Grafana |
baseUrl | string | Sim | URL da instância Grafana (e.g., https://your-grafana.com\) |
organizationId | string | Não | ID da organização para instâncias Grafana multi-org |
title | string | Sim | The title of the new folder |
uid | string | Não | Optional UID for the folder (auto-generated if not provided) |
| Parâmetro | Tipo | Descrição |
|---|
id | number | The numeric ID of the created folder |
uid | string | The UID of the created folder |
title | string | The title of the created folder |
url | string | The URL path to the folder |
- Categoria:
tools
- Tipo:
grafana