moooofly / hunter-agent

This is an agent for hunter system as a proxy.
MIT License
2 stars 0 forks source link

hunter-agent

 __ __  __ __  ____   ______    ___  ____          ____   ____    ___  ____   ______
 |  |  ||  |  ||    \ |      |  /  _]|    \        /    | /    |  /  _]|    \ |      |
 |  |  ||  |  ||  _  ||      | /  [_ |  D  )_____ |  o  ||   __| /  [_ |  _  ||      |
 |  _  ||  |  ||  |  ||_|  |_||    _]|    /|     ||     ||  |  ||    _]|  |  ||_|  |_|
 |  |  ||  :  ||  |  |  |  |  |   [_ |    \|_____||  _  ||  |_ ||   [_ |  |  |  |  |
 |  |  ||     ||  |  |  |  |  |     ||  .  \      |  |  ||     ||     ||  |  |  |  |
 |__|__| \__,_||__|__|  |__|  |_____||__|\_|      |__|__||___,_||_____||__|__|  |__|

This is an agent for hunter system as a proxy.

The related exporter is opencensus-go-exporter-agent.

Design

whole

callchain

protocol

Feature

Config

You can put agent.json.template into /etc/hunter/ with name agent.json.

Config sample:

{
    "debug": true,
    "shutdown-timeout": 15,
    "queue-size":10,

    "log-level": "debug",
    "pidfile": "/var/run/hunter-agent.pid",
    "data-root": "/var/lib/hunter",
    "raw-logs": false
}

Document

Signal Usage

signal function
SIGHUP Reload config file
SIGUSR1 Dump stacks of all goroutines
SIGPIPE Ignored
SIGINT/SIGTERM Call your custom cleanup function, then terminate the process.
SIGQUIT Cause an exit without cleanup, with a goroutine dump preceding exit.