Coder Social home page Coder Social logo

Comments (6)

gjasny avatar gjasny commented on June 18, 2024

Sorry, Windows is not our most loved target platform. There's an open ticket to add prometheus-cpp to vcpkg: #130. If you need the missing functionality (or convenience) maybe you can take a look?

Google Benchmark is an optional dependency used only for benchmarks that are used by prometheus-cpp developers. It is not part of any library and usually end users should not need those. So just ignore the message.

The curl dependency is solely used for the Push Gateway support. If you don't run short-lived micro services the prometheus pull exposer might better serve your needs. Just disable the push library by setting the ENABLE_PUSH=OFF CMake option. If the option is not enabled, the curl lookup will be omitted.

from prometheus-cpp.

jupp0r avatar jupp0r commented on June 18, 2024

Even short lived microservices are well supported to be dynamically added/removed from your config if you are using one of the service discovery mechanisms (Azure/AWS/GCE/Kubernetes/Consul/Mesos/...) described in https://prometheus.io/docs/prometheus/latest/configuration/configuration/. You really shouldn't use the push gateway except in some edge cases (mainly a NAT being between your services and prometheus, but why would you ... ). See https://prometheus.io/docs/practices/pushing/ for details.

from prometheus-cpp.

jmin911 avatar jmin911 commented on June 18, 2024

If push is not recommended, should it be disabled by default?
option(ENABLE_PUSH "Build prometheus-cpp push library" OFF)

from prometheus-cpp.

mathijs727 avatar mathijs727 commented on June 18, 2024

There is a bug in cmake/cpr-config.cmake on line 50:
target_include_directories(cpr PUBLIC ${CPR_INCLUDE_DIR})
This should also include the curl header file libraries:
target_include_directories(cpr PUBLIC ${CPR_INCLUDE_DIR} ${CURL_INCLUDE_DIR})
Without this, the build will only succeed if the curl header files are in the system include directory (/usr/local/include on Linux IIRC) instead of using the include directory found by CMake's find_package.

With this change I was able to install and run the prometheus-cpp demo on my Windows machine (curl was installed through vcpkg).
Google Benchmark is not required, ignore the error if you are not interested in building the benchmarks.

from prometheus-cpp.

vyacheslav-skvortsov avatar vyacheslav-skvortsov commented on June 18, 2024

Now it demands ZLIB:
Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) C:/Program Files/CMake/share/cmake-3.13/Modules/FindZLIB.cmake:114 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) pull/CMakeLists.txt:10 (find_package)
I tried setting ENABLE_PUSH=OFF but it did not help.

When I set ENABLE_COMPRESSION=OFF
Could NOT find CURL (missing: CURL_LIBRARY) (found version "7.60.0") Call Stack (most recent call first): C:/Program Files/CMake/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE) C:/Program Files/CMake/share/cmake-3.13/Modules/FindCURL.cmake:74 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) push/CMakeLists.txt:2 (find_package)
When I set ENABLE_COMPRESSION=OFF and ENABLE_PUSH=OFF generating was successful.

from prometheus-cpp.

gjasny avatar gjasny commented on June 18, 2024

Once #130 is resolved it will provide a convenient way to install prometheus-cpp on Windows.

from prometheus-cpp.

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.