GithubHelp home page GithubHelp logo

Comments (6)

peterbourgon avatar peterbourgon commented on May 26, 2024

I'm not against it, but it's not obvious to me how this would be encoded in Prometheus metrics. If someone has a good suggestion there, I can certainly take a shot at an implementation.

from fastly-exporter.

wosc avatar wosc commented on May 26, 2024

I guess the "Grafana annotations" part will need some additional jury-rigging ;), for the time being I'm mostly concerned with getting the information out of the API in the first place. Luckily, the version is a plain integer, so what do you think about something like this:

fastly_service_version{service_id="ABCxyz",service_name="www.example.com"} 123.0
fastly_service_version{service_id="DEFtuv",service_name="img.example.com"} 42.0

from fastly-exporter.

peterbourgon avatar peterbourgon commented on May 26, 2024

Generally it's a mistake to report data like that in the actual value, rather prefer to put everything in labels and allow the value to be constant 1.

from fastly-exporter.

wosc avatar wosc commented on May 26, 2024

Oh. What are the risks/downsides? I have not been using Prometheus for all that long, so I guess I haven't painted myself into that particular corner yet (since I don't see anything wrong with the approach ;).

But to be honest I'm not very particular about the format -- all I want is to be able to retrieve a set of "sevice x has version y" items, which should be easy either way. (And possibly query "which version does service x have".) Thanks!

from fastly-exporter.

peterbourgon avatar peterbourgon commented on May 26, 2024

@wosc Are you able to easily build and test the version in the branch associated with #30? If yes, please give it a shot and make sure it meets your requirements. If no, let me know and I'll cut a release for you.

from fastly-exporter.

wosc avatar wosc commented on May 26, 2024

Thanks to your Dockerfile building was very easy! (I did have to manually clone peterbourgon/usage to vendor/ first, probably because I know nothing about the golang build toolchain yet ;).

The resulting metrics look fine to me, they give me the currently active version, which is exactly what I wanted. Thank you so much for building it! :)

fastly_rt_service_info{service_id="...",service_name="[PROD] www.zeit.de",service_version="152"} 1
fastly_rt_service_info{service_id="...",service_name="[PROD] img.zeit.de",service_version="65"} 1

from fastly-exporter.

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.