首页 > 其他分享 >grafana agent metrics 使用简单使用

grafana agent metrics 使用简单使用

时间:2022-11-06 22:01:36浏览次数:58  
标签:docs agent grafana metrics https configuration

grafana agent 的能力还是比较强大的,支持log,metrics,trace,以下简单说明下

简单模式

只包含了metrics,不包含集成模式
核心点是metrics 配置,包含了remote write 以及静态或者动态配置(比喻基于文件的服务发现以及基于k8s 的服务发现)

 
server:
  log_level: info
 
metrics:
  global:
    scrape_interval: 1m
  configs:
    - name: agent
      scrape_configs:
        - job_name: agent
          static_configs:
            - targets: ['127.0.0.1:12345']
      remote_write:
        - url: http://localhost:9009/api/prom/push

包含集成的模式

因为agent 嵌入了不少开源exporter,我们可以直接拿来使用,此中模式是一个比较强大而且灵活的能力,我们就了不用安装那个多的exporter 了

server:
  log_level: info
 
metrics:
  global:
    scrape_interval: 1m
    remote_write:
      - url: http://localhost:9009/api/prom/push
  configs:
    - name: default
      scrape_configs:
        - job_name: agent
          static_configs:
            - targets: ['127.0.0.1:12345']
 
integrations:
  node_exporter:
    enabled: true

说明

目前grafana agent 支持一种基于remote 配置的模式,可以通过使用远端http(s) 的配置,这样就比较方便了,可以简化我们不少配置管理的问题,目前处于体验状态
可以开启使用,此中模式就很不错了,我们可以基于http server 管理配置,可以做到灵活的配置管理,特别适合大量服务管理的时候,期待ga
同时官方目前也在测试一种动态配置模式(基于了gomplate)可以支持不少数据源模式的配置管理,比remote 更加强灵活,也期待ga

参考资料

https://grafana.com/docs/agent/latest/configuration/metrics-config/
https://grafana.com/docs/agent/latest/configuration/logs-config/
https://grafana.com/docs/agent/latest/configuration/traces-config/
https://grafana.com/docs/agent/latest/configuration/dynamic-config/
https://grafana.com/docs/agent/latest/configuration/integrations/
https://grafana.com/docs/agent/latest/configuration/create-config-file/
https://grafana.com/docs/agent/latest/configuration/
https://docs.gomplate.ca/datasources/

标签:docs,agent,grafana,metrics,https,configuration
From: https://www.cnblogs.com/rongfengliang/p/16864290.html

相关文章

  • spring 6.0 构建报错 找不到符号 InstrumentationSavingAgent
    解决:将spring-context.​​gradle​​文件的​​下面这一行optional(project(":spring-instrument"))修改为api(project(":spring-instrument"))​​......
  • grafana jpprof 使用的一些问题
    容器运行版本问题如下图  可以看出使用的也是基于libasyncProfiler所以容器运行环境本地比较重要,parcajava解决方案也是使用了类似的技术(alpine镜像就比较费......
  • grafana phlare 试用
    主要是简单试用下grafanaphlare环境准备docker-compose文件version:'3'services:phlare:image:grafana/phlare:latestports:......
  • grafana jpprof jdk 8 支持探索
    问题运行问题java.lang.NoSuchMethodError:java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer;atjpprof.one.jfr.JfrReader.<init>(JfrReader.ja......
  • grafana jpprof 试用
    grafanajpprof是为了方便grafanaphlare对于java语言支持开发的一个包,可以让java语言方便的自持pprof格式的内容,进行持续性能优化以下是一个简单的试用环境准备......
  • grafana phlare 开源持续优化平台
    对于持续优化我以前介绍过几个开源工具,目前grafana也开源了一个自己的,还是很不错的参考架构  支持的语言目前支持java,golang,rust,python说明parca也是一个不错......
  • prometheus 监控案例-kube-state-metrics
    kube-state-metrics组件介绍  github项目地址:https://github.com/kubernetes/kube-state-metrics  Kube-state-metrics:通过监听APIServer生成有关资源对象的......
  • grafana faro-web-sdk web 可观测性sdk
    最近grafan大会开源了不少好东西,faro-web-sdk就是一个很不错的前端监控方案参考架构  说明phlare也是grafana开源的一些持续profle的一个方便工具,faro-web-sd......
  • Scalable Evaluation of Multi-Agent Reinforcement Learning with Melting Pot
    提出的问题:现有的对多智能体强化学习的评估工具没有将多智能体强化学习泛化的新情况评估作为主要目标。传统的监督学习和受益于明确的实验环境和存在的评价基准,能够较为......
  • Dubbo 可观测性实践之 Metrics 功能解析
    作者:姚辉在2018年,Observability(即可观测性)首次被引入IT领域,并逐渐取代只关注系统整体可用性的传统监控。随着云原生技术的不断发展,企业从单体架构发展到分布式架构,使......