Code Monkey home page Code Monkey logo

prometheus-metric-tester's Introduction

prometheus-metric-tester

A test-bed application that lets you update a custom metric to test your horizontal scaling logic on top of Kubernetes

Deployment diagram

Resources

In the resources we have a application.properties file were we configure context route, logs and port for the app and management settings for Prometheus.

This particular line can be customized to include what will appear in the monitoring page of Prometheus:

management.endpoints.web.exposure.include=*

This line, instead, is used to set of the initial value of the variable that control the scaling system:

meter.initial.value=0

Config

In the config directory we create two classes: MicrometerConf and SwaggerConf. In the first one we add configuration to customize the logs and graph we will be receiving in Prometheus different monitoring views and the second class is to configure our Swagger page for the application.

Models

Controller Setup

To access Prometheus monitoring page

Go to your localhost:

http://localhost:8102/metric-test/actuator/prometheus

You should see various paramenters monitored by Prometheus.

To view all metrics information

http://localhost:8102/metric-test/actuator/metrics

or to see a specific metric just add after metrics the specific metric name, for example:

http://localhost:8102/metric-test/actuator/metrics/value_gauge

To access into Swagger

http://localhost:8102/metric-test/swagger-ui/

To update gauge value

$ curl -vvv \
    -X POST \
    -H "Content-Type: application/json" \
    --data '{"value":"5"}' \
    localhost:8102/metric-test/api/v2/updateValue

prometheus-metric-tester's People

Contributors

alessandrocanuits avatar denismaggior8 avatar stefanofiore15 avatar

Watchers

 avatar

Forkers

mattiamarteddu

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.