Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nomad Monitor #6499

Merged
merged 34 commits into from
Nov 5, 2019
Merged

Nomad Monitor #6499

merged 34 commits into from
Nov 5, 2019

Commits on Nov 5, 2019

  1. Update gziphandler to latest version

    This version of gziphandler includes a fix that fixes GzipResponseWriter
    to implement CloseNotifier
    
    nytimes/gziphandler#63
    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    5e03fec View commit details
    Browse the repository at this point in the history
  2. Adds AgentMonitor Endpoint

    AgentMonitor is an endpoint to stream logs for a given agent. It allows
    callers to pass in a supplied log level, which may be different than the
    agents config allowing for temporary debugging with lower log levels.
    
    Pass in logWriter when setting up Agent
    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    91c0184 View commit details
    Browse the repository at this point in the history
  3. Add Agent Monitor to receive streaming logs

    Queries /v1/agent/monitor and receives streaming logs from client
    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    dc32864 View commit details
    Browse the repository at this point in the history
  4. Adds nomad monitor command

    Adds nomad monitor command. Like consul monitor, this command allows you
    to stream logs from a nomad agent in real time with a a specified log
    level
    
    add endpoint tests
    
    Upgrade go-hclog to latest version
    
    The current version of go-hclog pads log prefixes to equal lengths
    so info becomes [INFO ] and debug becomes [DEBUG]. This breaks
    hashicorp/logutils/level.go Check function. Upgrading to the latest
    version removes this padding and fixes log filtering that uses logutils
    Check
    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    74cfdf5 View commit details
    Browse the repository at this point in the history
  5. Display error when remote side ended monitor

    multisink logger
    
    remove usage of logwriter
    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    a828c92 View commit details
    Browse the repository at this point in the history
  6. remove log_writer

    prefix output with proper spacing
    
    update gzip handler, adjust first byte flow to allow gzip handler bypass
    
    wip, first stab at wiring up rpc endpoint
    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    1281997 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    890b8a4 View commit details
    Browse the repository at this point in the history
  8. New monitor pkg for shared monitor functionality

    Adds new package that can be used by client and server RPC endpoints to
    facilitate monitoring based off of a logger
    
    clean up old code
    
    small comment about write
    
    rm old comment about minsize
    
    rename to Monitor
    
    Removes connection logic from monitor command
    
    Keep connection logic in endpoints, use a channel to send results from
    monitoring
    
    use new multisink logger and interfaces
    
    small test for dropped messages
    
    update go-hclogger and update sink/intercept logger interfaces
    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    8095b48 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e758930 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    2362008 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    3c0082f View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    735530c View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    cd60628 View commit details
    Browse the repository at this point in the history
  14. only look up rpchandler for node if we have nodeid

    fix some comments and nomad monitor -h output
    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    c8d60dd View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    92d6a30 View commit details
    Browse the repository at this point in the history
  16. update go-hclog dep

     remove duplicate lock
    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    9bb606a View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    a72bd5c View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    1176fc0 View commit details
    Browse the repository at this point in the history
  19. rename function, initialize log level better

    underscores instead of dashes for query params
    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    6bf8617 View commit details
    Browse the repository at this point in the history
  20. return 400 if invalid log_json param is given

    Addresses feedback around monitor implementation
    
    subselect on stopCh to prevent blocking forever.
    
    Set up a separate goroutine to check every 3 seconds for dropped
    messages.
    
    rename returned ch to avoid confusion
    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    873969c View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    58117c0 View commit details
    Browse the repository at this point in the history
  22. lock in sub select

    rm redundant lock
    
    wip to use framing
    
    wip switch to stream frames
    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    f8eaf1f View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    9a96c10 View commit details
    Browse the repository at this point in the history
  24. monitor command takes no args

    rm extra new line
    
    fix lint errors
    
    return after close
    
    fix, simplify test
    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    f74bd99 View commit details
    Browse the repository at this point in the history
  25. allow more time for streaming message

    remove unused struct
    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    8423ccf View commit details
    Browse the repository at this point in the history
  26. address feedback

    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    676800f View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    dc977dc View commit details
    Browse the repository at this point in the history
  28. simplify assert message

    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    4f618eb View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    bb2a7f4 View commit details
    Browse the repository at this point in the history
  30. log-json -> json

    fix typo command/agent/monitor/monitor.go
    
    Co-Authored-By: Chris Baker <1675087+cgbaker@users.noreply.github.com>
    
    Update command/agent/monitor/monitor.go
    
    Co-Authored-By: Chris Baker <1675087+cgbaker@users.noreply.github.com>
    
    address feedback, lock to prevent send on closed channel
    
    fix lock/unlock for dropped messages
    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    33ba36a View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    79411c5 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    1585179 View commit details
    Browse the repository at this point in the history
  33. simplify logch goroutine

    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    8ccb770 View commit details
    Browse the repository at this point in the history
  34. unlock before returning, no need for label

    comment, trigger build
    
    return length written
    drewbailey committed Nov 5, 2019
    Configuration menu
    Copy the full SHA
    03f0aff View commit details
    Browse the repository at this point in the history