1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-05-02 22:17:10 +08:00
Dejan Mijic c966a7802d
Integrate manager service
Setup top-level glide dependencies file. Migrated all of the manager
service code into this repository. Fixed docker build procedure.
Extracted executable to the top-level.

Signed-off-by: Dejan Mijic <dejan@mainflux.com>
2017-09-23 01:03:27 +02:00
..
2017-09-23 01:03:27 +02:00
2017-09-23 01:03:27 +02:00
2017-09-23 01:03:27 +02:00
2017-09-23 01:03:27 +02:00
2017-09-23 01:03:27 +02:00
2017-09-23 01:03:27 +02:00

Prometheus Ruby client model

Data model artifacts for the Prometheus Ruby client.

Installation

gem install prometheus-client-model

Usage

Build the artifacts from the protobuf specification:

make build

While this Gem's main purpose is to define the Prometheus data types for the client, it's possible to use it without the client to decode a stream of delimited protobuf messages:

require 'open-uri'
require 'prometheus/client/model'

CONTENT_TYPE = 'application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=delimited'

stream = open('http://localhost:9090/metrics', 'Accept' => CONTENT_TYPE).read
while family = Prometheus::Client::MetricFamily.read_delimited(stream)
  puts family
end