GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - openshift/prometheus-alert-buffer-client-ruby: A Ruby library for reading alerts stored on a Prometheus Alert Buffer server

This repository was archived by the owner on Sep 29, 2021. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

17 Commits
17 Commits

Folders and files

NameName
Last commit message
Last commit date
examples
examples
 
 
lib
lib
 
 
spec
spec
 
 
.codecov.yml
.codecov.yml
 
 
.coveralls.yml
.coveralls.yml
 
 
.gitignore
.gitignore
 
 
.rubocop.yml
.rubocop.yml
 
 
.travis.yml
.travis.yml
 
 
Gemfile
Gemfile
 
 
LICENSE
LICENSE
 
 
MAINTAINERS.md
MAINTAINERS.md
 
 
README.md
README.md
 
 
Rakefile
Rakefile
 
 
prometheus-alert-buffer-client.gemspec
prometheus-alert-buffer-client.gemspec
 
 

Repository files navigation

Prometheus Alert Buffer Ruby Client

A Ruby library for reading alerts stored on a Prometheus Alert Buffer server.

Usage

Overview

require 'prometheus/alert_buffer_client'

# return a client for host http://example.com:9099/topics/alerts

prometheus = Prometheus::AlertBufferClient.client(url: 'http://example.com:9099')

Changing alerts path

# return a client for host http://example.com:9099/topics/topic1

prometheus = Prometheus::AlertBufferClient.client(url: 'http://example.com:9090', path: '/topics/topic1')

Authentication proxy

If an authentication proxy ( e.g. oauth2 ) is used in a layer above the prometheus-alert-buffer REST server, this client can use ssl and authentication headers.

# return a client for host https://example.com/topics/alerts using a Bearer token "TopSecret"

prometheus = Prometheus::AlertBufferClient.client(url: 'https://example.com:443', credentials: { token: 'TopSecret' })

Api calls

Reading alerts

# get all the alerts from server

alerts = prometheus.get()

Reading latest alerts

# get all the alerts with generation_id='12497ca8-b597-4590-ac5d-d55af7f3d185' and index >= 34

alerts = prometheus.get(generation_id: '12497ca8-b597-4590-ac5d-d55af7f3d185', from_index: 34)

Alerts will be returned in a Hash with following keys:

  • generationID
  • messages

Posting alerts

# post an alert JSON to server

alerts = prometheus.post('{"alertId":12}')

About

A Ruby library for reading alerts stored on a Prometheus Alert Buffer server

Topics

alert-clientauthentication-proxyprometheus-alert-bufferprometheus-alertsprometheus-clientrubyruby-client

Resources

Readme
Apache-2.0 license

Security policy

Security policy
Activity
Custom properties

Stars

1 star

Watchers

8 watching

Forks

4 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.