Giter Club home page Giter Club logo

up's Introduction

UP

UP is a simple client for testing Prometheus remote-write and Loki write requests.

For a specified metric the client writes the metric at a chosen interval, where the value of the metric is always the current timestamp in milliseconds.

It can also read the metric back from a specified endpoint and compare its value against the current time to determine the total write-read latency.

For a specified log entry the client writes the log entry at a chosen interval for the value given.

It can also read the log back from a specified endpoint and compare the number of results.

When the given duration is greater than 0s, UP will evaluate number of errors and will exit with a non-zero code if the ratio is greater than the specified threshold.

Build Status

Getting Started

The easiest way to begin making remote write requests is to run the UP container. For example, to report an up metric every 10 seconds, run:

docker run --rm -p 8080:8080 quay.io/observatorium/up --endpoint-write=https://example.com/api/v1/receive --period=10s

Note that the metric name and labels are customizable. For example, to report a metric named foo with a custom bar label, run:

docker run --rm -p 8080:8080 quay.io/observatorium/up --endpoint-write=https://example.com/api/v1/receive --period=10s --name foo --labels 'bar="baz"'

Usage

Usage of ./up:
  -duration duration
    	The duration of the up command to run until it stops. If 0 it will not stop until the process is terminated. (default 5m0s)
  -endpoint-read string
    	The endpoint to which to make query requests.
  -endpoint-type string
    	The endpoint type. Options: 'logs', 'metrics'. (default "metrics")
  -endpoint-write string
    	The endpoint to which to make remote-write requests.
  -initial-query-delay duration
    	The time to wait before executing the first query. (default 10s)
  -labels value
    	The labels in addition to '__name__' that should be applied to remote-write requests.
  -latency duration
    	The maximum allowable latency between writing and reading. (default 15s)
  -listen string
    	The address on which internal server runs. (default ":8080")
  -log.level string
    	The log filtering level. Options: 'error', 'warn', 'info', 'debug'. (default "info")
  -logs value
    	The logs that should be sent to remote-write requests.
  -logs-file string
    	A file containing logs to send against the logs write endpoint.
  -name string
    	The name of the metric to send in remote-write requests. (default "up")
  -period duration
    	The time to wait between remote-write requests. (default 5s)
  -queries-file string
    	A file containing queries to run against the read endpoint.
  -step duration
    	Default step duration for range queries. Can be overridden if step is set in query spec. (default 5m0s)
  -tenant string
    	Tenant ID to used to determine tenant for write requests.
  -tenant-header string
    	Name of HTTP header used to determine tenant for write requests. (default "tenant_id")
  -threshold float
    	The percentage of successful requests needed to succeed overall. 0 - 1. (default 0.9)
  -tls-ca-file string
    	File containing the TLS CA to use against servers for verification. If no CA is specified, there won't be any verification.
  -tls-client-cert-file string
    	File containing the default x509 Certificate for HTTPS. Leave blank to disable TLS.
  -tls-client-private-key-file string
    	File containing the default x509 private key matching --tls-cert-file. Leave blank to disable TLS.
  -token string
    	The bearer token to set in the authorization header on requests. Takes predence over --token-file if set.
  -token-file string
    	The file from which to read a bearer token to set in the authorization header on requests.

up's People

Contributors

bill3tt avatar brancz avatar bwplotka avatar douglascamata avatar jmichalek132 avatar jpkrohling avatar kakkoyun avatar matej-g avatar metalmatze avatar moadz avatar periklis avatar philipgough avatar rollandf avatar spaparaju avatar squat avatar thibaultmg avatar yeya24 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

Watchers

 avatar  avatar  avatar

up's Issues

Support setting cache control header for metrics queries

Thanos already supports cache control headers for requests. Then it is doable here to support it here.

The problem I see is that the client_golang library doesn't support setting additional HTTP headers. So we have 2 options:

  1. Write HTTP query requests on our own to support setting HTTP headers.
  2. Use Thanos's promclient package. It doesn't support HTTP headers as well now but I have a plan to add a bool disableCache bool value to https://github.com/thanos-io/thanos/blob/master/pkg/promclient/promclient.go#L339.

Remote Write to Thanos with User ID and Password tags with values

As we see this command as an example.
docker run --rm -p 8080:8080 quay.io/observatorium/up --endpoint-write=https://example.com/api/v1/receive --period=10s --name foo --labels 'bar="baz"'

I see something for tenant IDS which I can use.
-tenant string
Tenant ID to used to determine tenant for write requests.
-tenant-header string
Name of HTTP header used to determine tenant for write requests. (default "tenant_id")

Question:

How to send user ID and password as part string for connecting Thanos.
under usage section, couldn't find the values for authentication.
Please help to find the same.
headers:
basic_auth:
username:
password:

No option to set the CA (or disable CA verification) for OAuth

Hello,

When deploying the dev example configuration on EKS, up complains with the following errors:

caller=level.go:63 ts=2021-09-30T13:58:58.295417174Z name=up level=error caller=main.go:113 component=writer msg="failed to make request" err="making request: Post "https://dex.dex.svc.cluster.local:5556/dex/auth?client_id=test&response_type=code&scope=openid+profile+email+groups&state=I+love+Observatorium\": x509: certificate signed by unknown authority"

The documentation says that If no CA is specified, there won't be any verification, but this only seems to apply to the endpoint, not to the eventual OAuth part

Either the existing TLS configuration options should be reused or new one should be added for that case

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.