Coder Social home page Coder Social logo

expvarmon's People

Contributors

divan avatar jgeiger avatar mschoch avatar vasilcovsky 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

expvarmon's Issues

Layout&rendering issues

Hi, great project!

I'm seeing some pretty severe rendering issues when I run expvarmon -ports="8000". It looks like this:

expvarmon-rendering

Resizing the window does not seem to fix it. Is there some terminal setting I should be aware of? The screenshot is from Ubuntu, running in an ssh session from a osx host (not sure if that's relevant at all).

Any ideas of what is going on?

Ability to use non-standard endpoint URL

The program I'm trying monitor exposes the expvars at the non-standard http://host:4985/_expvar endpoint rather than the standard http://localhost:4985/debug/vars endpoint.

I tried this but it didn't work:

expvarmon -ports="http://localhost:4985/_expvar"
no ports specified. Use -ports arg to specify ports of Go apps to monitor
Usage of expvarmon:
   .. etc

As a feature request, would it be possible to add a new arg like -endpoint which would customize how the endpoint URL is constructed?

Breaks if the map key contains "\x" string

Hi,

Given the following snippet:

package main

import (
    "expvar"
    "net/http"
)

func main() {
    m := expvar.NewMap("test")
    m.Add("\x00", 1)
    http.ListenAndServe(":1234", nil)
}

Expvarmon stops showing results all together. You can add a sleep time before the add and observe it only happens when the string is added.

Some values not be translated correctly

First up I love this tool, so thank you very much for providing it.

When I run --vars="mem:memstats.Alloc,mem:memstats.Sys,mem:memstats.HeapAlloc,mem:memstats.HeapInuse,duration:memstats.PauseNs,duration:memstats.PauseTotalNs,mem:memstats.HeapReleased,mem:memstats.TotalAlloc,mem:memstats.NumGC,mem:memstats.NextGC,mem:memstats.LastGC" the NextGC and LastGC I think should come out as time stamps. Also the NumGC should just be a number, I don't think it needs a unit as it is just a count.

https://cl.ly/5a681f89e0b3 is a screen shot of the output I currently get. If pointed in the right direction here I would happily make a change and open a PR.

Update Installation Guide

To install expvarmon it's mentioned in the documentation to use go get which belongs to the pre-modules era
Now a days (since 2018 and Go 1.11) you need to use

go install github.com/divan/expvarmon@latest

and of cource having $GOPATH/bin in $PATH
to be able to install this awesome app

serialize the expvar variable to file

hi, I have a question that does expvarmon have any way to serialize the expvar variable to file ? I want to save the variable from expvar and do analysis offline and generate chart based on there data.

Allow users to group expvars into custom TermUI lists

Would be nice to be able to group panels like this:

    ./expvarmon -vars="foo,bar"  -vars="fizz,buzz"

or even

    ./expvarmon -vars="Memory::foo,bar"  -vars="CPU::fizz,buzz" #single colons may collide with expvar names for some

Pass HTTP header "Authorization"

To connect to my remote API I have to provide a Token using the "Authorization" HTTP header:

curl -H 'Authorization: <my-secret-token>' https://api.example.com/v0/books

How can I provide such HTTP header to expvarmon?

Is this issue related to #23?

Allow keys to be specified using globs/pattern matching

We have some rather large and deeply nested expvars. As a user, I would love to use globs instead of commands like this:

./expvarmon -vars="cb.ops.Write(raw).count,cb.ops.Write(raw).p99,cb.ops.Write(raw).p95,cb.ops.Write(raw).p90,cb.ops.Write(raw).p75,cb.ops.Write(raw).p50,cb.ops.Write(raw).p25"

For example, it would be great to instead be able to simply type:

./expvarmon  -vars="cb.ops.Write(raw).*"

or even

./expvarmon  -vars="cb.ops.*"

Feature - Embedding inside existing app

I'm curious if there is any way to use expvarmon inside my own program.
I want to deploy one binary on the server and give admin view what's going on.

e.g.
When I'll run
./my -expvarmon
it should run expvarmon tool with all variables set

Which license applies to this repo

I'm wondering which license applies to this repo.

Could you specify any to avoid issues with Laws interpretations?

If there's one announced somewhere, my apologies, but I couldn't find it.

Thanks for considering

Can't run on MacOs

I'm trying to run it on MacOs.
recieving this:

โžœ  / expvarmon -ports="8181"

zsh: command not found: expvarmon

thanks

Custom vars show as "N/A"

I've added custom vars to the JSON and they appear when viewing them in a browser.

{
"cmdine": {...},
"latency.p50": 125248.5,
"latency.p90": 614798.4545454546,
"latency.p95": 1019194.25,
"latency.p99": 2460674,
"memstats": {...}
}

When running expvarmon -ports="8181" -vars="duration:latency.p50,duration:latency.p90,duration:latency.p95,duration:latency.p99" those values all appear as N/A in the UI.

Am I doing something weird when running the command?

vars: monitor the Nth object of an array

I can't find a way to monitor a variable located in an object inside an array, see the following JSON:

"Blah": {
    "DeviceStatus": [
        {
            "Descr": "Foo",
            "ConnectionStatus": false,
        },
        {
            "Descr": "Bar",
            "ConnectionStatus": false,
        }
    ]
}

I tried with:

expvarmon  -vars="Foo:Blah.DeviceStatus[0].ConnectionStatus"

but the UI gives me:

Blah.DeviceStatus[0].ConnectionStatus: N/A

Goroutines

I can't seem to have it report the number of goroutines in my running process? I am using the vars="Goroutines". I do see memory stats

expvarmon -ports="4000" -vars="Goroutines,mem:memstats.HeapInuse"

No data collected

Hi, really liked this project.
It has a future indeed. I have a Go server app running with a routing middleware that is not the net/http. After setting the import and "go get" the project, no data is collected within expvarmon. Is it because is not http routing ?

Many thanks

Feature - duration string var type

I have a number of stats that export as a duration string, such as:

"uptime": "32m48.4137762s"
or
"averagerequesttime": "67.6394ms"

These don't generate spark lines, nor are their max really valid. How about an additional var type, durationstr, that parses the duration back into an int64 for comparison/sparkline, but still displays with the duration string representation for labeling?

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.