Giter VIP home page Giter VIP logo

polly's Introduction

polly is a specification for parameterized packages of observability-related config objects such as dashboards, alerts and more.

Get started via our project docs site!

polly's People

Contributors

metalmatze avatar mhausenblas avatar paulfantom avatar sdboyer avatar sh0rez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

polly's Issues

Defining and referencing datafaces

The initial pass at datafaces defines them as lists of signals, then declares the world's simplest possible definitions of RED and USE. This immediately leads to two related questions:

  • Who gets to define a dataface?
  • How does a polly package refer to a dataface when implementing it?

The initial pass allows polly itself to define datafaces, but polly packages can't really do so - they can only implement them. This is a bit like only allowing the standard library of a programming language to define interfaces, and clearly has to change.

But, limiting dataface references to only those defined by the "stdlib" has the advantage of making imports quite simple - we can restrict to only importing github.com/pollypkg/polly/schema, and then a pop can just reference the dataface definitions directly (e.g. pollyschema.USE, here)

Need a viable approach here that:

  • Allows datafaces to be defined outside polly itself/stdlib
  • Keeps references sane, ideally without needing to rely directly on CUE package management for arbitrary packages

Define scuemata for Prometheus alerts and rules

We need scuemata definitions for Prometheus alerts and rules.

The most sensible place to put them, for now, is cue.mod/pkg/github.com/prometheus/prometheus. Once everything's properly up and running with Polly, we'll expect the scuemata definitions for upstream objects to live outside of the Polly repo. We're making an exception here because a) parity with mixins, and b) we're bootstrapping, and it's not reasonable to expect Prometheus to just take this on without us having demonstrated utility first.

Defining these objects is going to be a bit interesting. Existing mixins follow pretty directly on the structure of rules/alerts themselves - a name, with an array of individual objects. They're defined as collections, rather than individual objects. And i'm reasonably certain that what we want to scuematize is the individual object, and treat the grouping of them as a separate concern. And, wherever we deal with that concern - which i suspect will be in how we define them within PollyPackage - we absolutely want to use a map structure, rather than a list structure, to make addressing and manipulating them easier by consumers.

Switch Signals to a map structure

Currently, signals are defined in PollyPackage as a list, for the reasons in the comment:

// NOTE This is a list instead of a struct so that we can allow duplication
// in the future. That would permit implementations of the "same" signal in
// different query languages. This would be somewhat analogous to
// function/method overloading - the consumer's value context can determine
// whether to use the e.g. promql or flux implementation (assuming both
// exist).
//
// TODO constrain name uniqueness within the list.
//
// @doc(metaschema)
signals?: [Signal, ...Signal]

Addressing list elements in CUE is just...super annoying. I already wrestled with it months ago with scuemata. It may get better, but i don't want to wait, and the justification in the comment is flimsy at best. So, better to use a map structure.

Create docs

We should have a GH pages-based docs site with examples etc. I suggest using mkdocs and offer to set up things incl. publishing automation.

Create a very basic library/CLI for loading PollyPackage/validating pops

Starting with the Go CUE SDK is pretty intimidating. I've done it a few times already. To help bridge that gap for others/start bridging the gap between polly and other existing toolchains, i'll make a very simple library for interacting with pops, and a corresponding CLI that will validate a pop against the PollyPackage schema.

First pass at it is gonna be really, really sloppy. Lots of fodder for issues and requests for improvement :)

Jsonnet -> polly converter

I believe it would help with adoption in new projects if we could somehow import existing jsonnet mixins as a polly pkg.

I hit this issue when rewriting parts of kube-prometheus into cue as all upstream monitoring mixins are written in jsonnet.

Pull in mature schema for Grafana dashboards, plugins

To get to the point where we can make minimal use of polly, we absolutely have to have sufficiently mature schema for all of our key object types. Prometheus is good enough - thankfully, rules and alerts aren't complicated - but Grafana dashboards are, of course, the hard one.

We're pushing hard on getting this done (now that everyone's back from summertime vacations). Issue to track it is here: grafana/grafana#36844

Schema limitation in prometheus alerts

While playing around with converting node_exporter mixin to pollypkg I found a limitation of the current polly alerts schema - there cannot be a duplicate alert with different severity.

For example, node_exporter mixin is shipping 2 alerts named NodeFilesystemSpaceFillingUp with different expressions and severities. It's useful to have them share names when we consider how inhibition rule can be written for such alerts (example in kube-prometheus)

Am I missing something, or current schema makes it mandatory to have unique alert names?

Add CoC

Repo needs a code of conduct.

Add About

On our project website we should have an About entry, introducing folks and companies behind this initiative.

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.