Coder Social home page Coder Social logo

smile-sa / rating-operator-engine Goto Github PK

View Code? Open in Web Editor NEW
15.0 7.0 1.0 64.17 MB

Kubernetes Operator to transform metrics into KPIs. Support for custom transformations rules. - manages workloads for Rating Operator

Dockerfile 1.25% Shell 1.05% Go 71.14% Makefile 26.56%
rating-operator rating operator kpi kubernetes-operator kubernetes bi-ops

rating-operator-engine's Introduction

rating-operator-engine

DISCLAIMER This component is part of the rating-operator application and is not designed to work as a standalone program.

Rating-operator-engine uses custom resources to configure its workers and trigger rating workloads, with a variable timeframe. Each workers holds their own configuration, that can be updated at runtime, and query, rate and store data in PostgreSQL through the rating-operator-api.

Configuration

The configuration, named RatingRuleInstances, can be sumed up as follow:

  • Name

The name of the rated metric. It is the name by which you'll be able to query your metric afterward.

  • Timeframe (Base value of 60s)

This parameters control the time between each data query, in seconds. Depending on the precision or reactivity need of a given metric, you can adapt this parameter to suit your need. Considering Prometheus expose datapoints for each seconds, "timeframe" imply the size of the metric set you receive. By using, for example, 3600s as the timeframe, you will receive, every hour, 3600 datapoints that will then be sumed into one.

  • Metric

A prometheus query expression (promQL) to be executed every "timeframe". It can be enhanced with variables, defined in the RatingRules configuration, and made available through Prometheus. More information on RatingRules can be read in the rating-operator (Custom Resources) document.

Below an example of a RatingRuleInstance:

apiVersion: rating.smile.fr/v1
kind: RatingRuleInstances
metadata:
  name: my-test-rule # The name of the RatingRuleInstances object
spec:
  metric: sum(kube_pod_container_resource_requests_cpu_cores) by (pod, namespace, node) # The prometheus query to execute
  name: pods_usage_cpu # The name of the metric
  timeframe: 60s # The time between each query

Usage

For more informations on how to configure and use the component, please refer to the rating-operator documentation.

rating-operator-engine's People

Contributors

boumedienne7 avatar hongphuc95 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

hemi8715

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.