Giter VIP home page Giter VIP logo

heagent's Introduction

Heagent

How to Build (Maven)

./mvnw clean package

How to Build (Gradle)

./gradlew clean shadowJar

How to Use

Standard launch

curl -L -o /agent/jar/file/path/heagent.jar \
  https://github.com/yo1000/heagent/releases/download/v1.0.1/heagent-1.0.1.jar

java \
  -javaagent:/agent/jar/file/path/heagent.jar \
  -jar /main/jar/file/path/main.jar

Launch with parameters

The order of priority between parameters is as follows.

  1. agentArgs (Highest)
  2. jvm-system-props
  3. OS_ENV_VARS

The parameters that can be set are as follows.

  • heagent-hostname
  • heagent-port
  • heagent-path
  • heagent-max-used-heap-size
  • heagent-max-used-heap-ratio
  • heagent-min-available-heap-size
  • heagent-min-available-heap-ratio
curl -L -o /agent/jar/file/path/heagent.jar \
  https://github.com/yo1000/heagent/releases/download/v1.0.1/heagent-1.0.1.jar

export HEAGENT_PATH=/env-var-test

java \
  -Dheagent-path=/system-props-test \
  -Dheagent-max-used-heap-size=500000000 \
  -Dheagent-min-available-heap-ratio=0.2 \
  -javaagent:/agent/jar/file/path/heagent.jar=heagentPort=8889,heagentPath=/metrics/health \
  -jar /main/jar/file/path/main.jar

And, Requesting suspend={1|0} for an endpoint will force the health check state to switch.

  • http://127.0.0.1/metrics/health?suspend=1 .. Health check status to Unhealthy.
  • http://127.0.0.1/metrics/health?suspend=0 .. Returning health check decisions to dependence on metrics results.

heagent's People

Contributors

yo1000 avatar moremagic avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

moremagic

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.