-
Notifications
You must be signed in to change notification settings - Fork 19
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
Missing packages #20
Comments
Hey @bogski87! Did you run |
Hi @gpestana thanks for getting back to me. No, if i try to run that i get a permission denied error. Running it through sudo doesn't work either (i tried sudo -E which used to work). I'm quite new to the go language and environment so it is probably i've made a mistake somewhere, i did the following:
This created a folder 'kapacitor-unit'
Then i get the error messages: philb@KapacitorUnitTest:~/go_projects/src$ go install github.com/gpestana/kapacitor-unit IF i CD into the kapacitor-unit directory and run go install then i get more error messages > if i run go install github.com/gpestana/kapacitor-unit from within the directory i get the same issue also, I realise that in the output i have up top the go path is looking for gp_projects - I've updated this to the right path now though with the same result. Any other information please ask PhilB |
Hi again, I did a bit of digging about go lang and in the end i gave up. I think there is a problem with go and ubuntu 17 or something because i've just done this on an older box and it worked. Could i ask for some clarification though please? I'm running the unit test from one VM and connecting to my Kapacitor and InfluxDB instance on another machine. I'm using this line: kapacitor-unit -dir /etc/kapacitor/ -kapacitor 192.168.1.12 --influxdb 192.168.1.12 --tests ./sample/test_cpu.yaml Is this correct? because I'm getting an error message I've read that it is related to the HTTP package for GO but i'm reluctant to start messing with files. Thanks @gpestana EDIT: I worked it out, i was adding the http part to the URL but forgetting to include the ports. However the test fails when it runs and i'm not sure why :( |
@bogski87 Ok, cool to know that you managed to get it going. Can you print the output of the tests? The tests that come in the repo (samples) are failing on purpose -- as an example. But could you paste the output of the tests so we verify it? |
Hi @gpestana If they're designed to fail on purpose then fair enough. I'd not realised. The error message was about parsing the configuration. I'm thinking though after some hindsight that that could be down to me neglecting to make sure my tick scripts and the tests had the same values/fields. At this point i think the issue is definitely between keyboard and chair. I'm going to try again this morning from scratch but if i continue to get error messages I'll come back with the ouput! Thank you for your time! I like the idea of this unit tester. I'm trying to write alerts for a citrix environment and it's difficult to test with real data because of the timing. I think if i can create some dummy data with this i should be able to get my scripts working! |
Sounds good! Let me know if you run into any problems related to the configuration parsing or anything else. If so, please paste the output and the command you ran for me to try to recreate it. And let me know if we can close this issue 👌 |
HI @gpestana I managed to get this going yesterday but am struggling to get it working again. I've tried a couple of different scripts now and i can't see why the config wont parse. yaml file:
TICK Script:
I've replaced the DB name (can't include real ones) I'm expecting a CRITICAL and a WARNING alert when i run this, but it fails to parse the config file. Commands:
Output:
I'm uploading the files to my home directory and copying them into the sample/disk/ directory. I haven't used sudo to move the files. I was having the same issue before i started putting the different alerts/scripts in folders. I can't see anything obvious that stands out from the config file. I did notice yesterday i was having trouble with one script, but once i removed the |window node from my TICK script it worked. So i don't know if that is a separate issue? The TICK scripts i use are generally built using Chronograf's TICK script editor then copied into Visual Studio. Any idea's? i'd love to get this working so i can start some proper testing. Thanks, PhilB EDIT: I'm putting my scripts in sample/cpu and using ./sample/ for the --dir and --tests this always gives a parse error. If i run the unit tests and specify the full path --dir /home/philb/go_projects/src/github.com/kapacitor-unit/sample/cpu/ it works, prcoessing the config Thanks. |
Hello,
I don't know if I've missed something here or not but the unit test package won't install. I followed the documentation on this repository to no avail.
Expected result: i run the commands listed on the documentaion, the Kapacitor unit test installs and i use it for testing.
Actual result:
kapacitorunit.go:5:2: cannot find package "github.com/fatih/color" in any of:
/usr/local/go/src/github.com/fatih/color (from $GOROOT)
/home/philb/gp_projects/src/github.com/fatih/color (from $GOPATH)
kapacitorunit.go:6:2: cannot find package "github.com/gpestana/kapacitor-unit/cli" in any of:
/usr/local/go/src/github.com/gpestana/kapacitor-unit/cli (from $GOROOT)
/home/philb/gp_projects/src/github.com/gpestana/kapacitor-unit/cli (from $GOPATH)
kapacitorunit.go:7:2: cannot find package "github.com/gpestana/kapacitor-unit/io" in any of:
/usr/local/go/src/github.com/gpestana/kapacitor-unit/io (from $GOROOT)
/home/philb/gp_projects/src/github.com/gpestana/kapacitor-unit/io (from $GOPATH)
kapacitorunit.go:8:2: cannot find package "github.com/gpestana/kapacitor-unit/task" in any of:
/usr/local/go/src/github.com/gpestana/kapacitor-unit/task (from $GOROOT)
/home/philb/gp_projects/src/github.com/gpestana/kapacitor-unit/task (from $GOPATH)
kapacitorunit.go:9:2: cannot find package "github.com/gpestana/kapacitor-unit/test" in any of:
/usr/local/go/src/github.com/gpestana/kapacitor-unit/test (from $GOROOT)
/home/philb/gp_projects/src/github.com/gpestana/kapacitor-unit/test (from $GOPATH)
kapacitorunit.go:10:2: cannot find package "gopkg.in/yaml.v2" in any of:
/usr/local/go/src/gopkg.in/yaml.v2 (from $GOROOT)
/home/philb/gp_projects/src/gopkg.in/yaml.v2 (from $GOPATH)
As far as i know the environment is set up correctly.
Go ENV:
GOARCH="amd64"
GOBIN="/home/philb/gp_projects/bin"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/philb/gp_projects"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
Go Version is 1.9
If other packages are required to install this, then it should be listed in the installation instructions.
Have i missed something or is it broken?
Thanks,
Phil
The text was updated successfully, but these errors were encountered: