keithknott26/datadash

how do i get the datadash binary

Opened this issue · 4 comments

Hi. Sorry I don't know how to build a Go project. I'm used to traditional Linux programs that use ./configure ; make ; make install

The instructions here aren't very explicit on how to get the datadash binary. The install instructions says:

go get -u github.com/keithknott26/datadash

I ran that command but I still had no datadash binary. Matter of fact, the command had zero output at all. I wasn't sure if it did anything at all. I hunted around to see if I could find anything and luckily I stumbled across a go directory inside my home directory. Inside there I was able to find a datadash directory which had a datadash.a file and some other files that look like source code.

I was hoping to get instructions that were a little more clear about what to do after running the go get command and specifically how to build the datadash binary. The usage examples all seem pretty clear so I don't think I need help with usage, I just need the binary.

Can someone help please?

Hello,

Thanks for raising this issue, I'm in the process of refactoring the code a bit and will upload a binary release or perhaps set up support for homebrew when I can.

In the meantime you'll want to navigate to the directory where you downloaded the application and build the binary. If you have Go setup and installed on your machine you probably downloaded the package to:
$GOPATH/src/github.com/keithknott26/datadash/. The fact that you ran the command above and didn't get any output means you probably have a Go environment already setup , otherwise you would have gotten an error.

To build and then run the binary:

cd $GOPATH/src/github.com/keithknott26/datadash/cmd
go build datadash.go
./datadash

Hope this helps!
Keith

Thanks Keith! That worked! I spent a few hours trying to figure it out and I even started with the hello world Go tutorial on Google's site, which I was able to complete but still couldn't figure out what needed to be done to build this binary.

I could have spent a full 24 hours on this and not figured it out, but the steps above got it built in no time.

I now have a datadash binary and I could experiment with the example. Thanks for your help, I really appreciate the fast response.

Thanks to the help, I was able to pretty quickly construct a one-liner to get data from some sensors and pipe it to datadash and visualize the metrics from the sensor. Although, the "one-liner" approach may be stretching the limits of good taste and what qualifies as an actual one-liner.

My command is a while true loop, which runs curl to get JSON data from an endpoint on the sensor every second, piped to python which parses the JSON data and prints it, tab separated to the STDOUT so that datadash can ingest it. Seems to be working nicely.

Screenshot Sat Feb  1 14:44:56 PST 2020

FYI zinit users can use the following to install datadash:

zinit as"null" \
  sbin"datadash" \
  atclone"rm -f datadash; go build cmd/datadash.go" \
  atpull"%atclone" \
  for @keithknott26/datadash