Giter Club home page Giter Club logo

Comments (5)

jingzhao-self avatar jingzhao-self commented on August 10, 2024 1

ok,试了一下input.prometheus,确实可以抓取指标并推送给远端,简单记录一下:

vim conf/input.prometheus/prometheus.toml #单服务器中的配置
[[instances]] urls = [ "http://localhost:9104/metrics" ] url_label_key = "instance" url_label_value = "{{.Host}}"
./categraf --test --inputs prometheus

from categraf.

UlricQin avatar UlricQin commented on August 10, 2024

Springboot程序是怎么暴露指标的?用的类似micrometer那样的库?通过/metrics接口暴露的?那就直接用prometheus插件来抓就行了

from categraf.

jingzhao-self avatar jingzhao-self commented on August 10, 2024

是的,会暴露/metrics接口,但由于被监控的服务器在远端,无法通过prometheus pull到远端内网服务器的metrics。Categraf使用了push的模式,是否有方法可以拉取自定义的API呢?

from categraf.

UlricQin avatar UlricQin commented on August 10, 2024

使用categraf的prometheus采集器,作为sidecar和业务进程部署在一起,抓取本机的业务指标,抓到之后categraf会推给远端夜莺server

from categraf.

UlricQin avatar UlricQin commented on August 10, 2024

使用 categraf 0.1.11 版本以上的版本:https://github.com/flashcatcloud/categraf/releases/tag/v0.1.11

from categraf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.