These are chat archives for juttle/juttle

3rd
Feb 2016
Phil Rzewski
@philrz
Feb 03 2016 21:53

I'm making my way through install & initial use steps in what I think is an "a la carte" way. That is, up to now I just did the easy steps at https://gist.github.com/mstemm/49755d491e88a2cf9ed9 that installed it all in one shot, but now I started from just the Juttle README and then the README of the adapters I need, of which InfluxDB is the first. Well, I did the:

npm install juttle
npm install juttle-influx-adapter

And then I populated my ~/.juttle/config.json with:

{
    "adapters": {
        "influx": {
            "url": "http://localhost:8086/"
        }
    }
}

And yet I get:

# juttle -e "read influx -db 'mydb' name='cpu.core0' | view logger"
[2016-02-03 13:51:52.969] [ERROR] juttle-adapter - error loading adapter [object Object]: Cannot find module 'juttle-influx-adapter'
Error: Cannot find module 'juttle-influx-adapter'

Any ideas?

Daria Mehra
@dmehra
Feb 03 2016 21:55
it would be helpful to run juttle -adapters but not sure if the PR with that feature has merged
not yet… juttle/juttle#314
Phil Rzewski
@philrz
Feb 03 2016 21:55
Mmm. Doesn't seem to work on mine yet.
# juttle -adapters
Error: input.charCodeAt is not a function
Rodney Lopes Gomes
@rlgomes
Feb 03 2016 21:55
you did npm install juttle with -g ? or just locally ?
Daria Mehra
@dmehra
Feb 03 2016 21:55
it’s meant to help this situation, as it would show where you’re pulling adapters from.
Phil Rzewski
@philrz
Feb 03 2016 21:56
Fine question, rlgomes. :) At first I had done both with -g. When that didn't work, I repeated without -g. Same error.
Daria Mehra
@dmehra
Feb 03 2016 21:56
otherwise let’s do npm list | grep juttle and look at the tree, to see which installation of the adapter is being used under your juttle CLI.
(and separately npm list -g | grep juttle to see how your global installation got put together)
Rodney Lopes Gomes
@rlgomes
Feb 03 2016 21:58
@philrz to be sure the config file is being picked up make a typo in it... i suspect its not being read
Phil Rzewski
@philrz
Feb 03 2016 22:00
@rlgomes: Ok, tried that. It did barf with a different error on the typo. ("Error parsing"...) so it does seem to be seeing it at least.
Rodney Lopes Gomes
@rlgomes
Feb 03 2016 22:00
ok at least we know its reading it then
Phil Rzewski
@philrz
Feb 03 2016 22:01
@dmehra:
phil@phil-ubuntu1:~$ npm list | grep juttle
├─┬ juttle@0.4.0
└─┬ juttle-influx-adapter@0.4.0
phil@phil-ubuntu1:~$ npm -g list | grep juttle
├─┬ juttle@0.4.0
  ├─┬ juttle@0.3.1
  ├─┬ juttle-client-library@0.2.1
  │ ├─┬ juttle-viz@0.3.1
  ├─┬ juttle-elastic-adapter@0.3.0
  │ ├─┬ aws-es@1.5.2 (git://github.com/juttle/aws-es.git#3dc39b04b02b0f471718b8aff62532cfacc0c658)
  │ │ ├─┬ aws4@1.1.0 (git://github.com/juttle/aws4.git#99791aa2ef47ce158f13f762430aebebb12bcbaa)
  ├─┬ juttle-gmail-adapter@0.4.2
  ├─┬ juttle-graphite-adapter@0.3.0
  ├─┬ juttle-influx-adapter@0.3.0
  ├─┬ juttle-jsdp@0.1.1
  ├─┬ juttle-mysql-adapter@0.2.0
  │ ├─┬ juttle-sql-adapter-common@0.2.2
  ├─┬ juttle-opentsdb-adapter@0.1.0
  ├─┬ juttle-postgres-adapter@0.2.3
  │ ├─┬ juttle-sql-adapter-common@0.2.2
  ├─┬ juttle-sqlite-adapter@0.2.0
  │ ├── juttle-sql-adapter-common@0.2.2
  ├─┬ juttle-twitter-adapter@0.2.2
The fact the global ones are a mess doesn't shock me, since I did all that a week ago.
Daria Mehra
@dmehra
Feb 03 2016 22:01
when you do juttle you’re running the global one
local one is ./bin/juttle from where you ran npm install.
Rodney Lopes Gomes
@rlgomes
Feb 03 2016 22:02
./node_modules/.bin/juttle @dmehra
Daria Mehra
@dmehra
Feb 03 2016 22:03
eh? i have, for example, ~/git/juttle/bin/juttle
Rodney Lopes Gomes
@rlgomes
Feb 03 2016 22:03
thats your source code
not an npm install
@philrz giving this a quick shot locally (to be sure its not some juttle with influx adapter issue)
Daria Mehra
@dmehra
Feb 03 2016 22:06
i’m utterly unhelpful here as for me, the attempt to npm install juttle gives
npm ERR! Refusing to install juttle as a dependency of itself
only global install works for me.
Rodney Lopes Gomes
@rlgomes
Feb 03 2016 22:06
you're inside the /src/juttle directory of your checked out juttle repo
so you're attempting to install juttle inside of juttle/node_modules
Daria Mehra
@dmehra
Feb 03 2016 22:08
i’m in the root of my juttle repo clone.
Rodney Lopes Gomes
@rlgomes
Feb 03 2016 22:08
yes
you can not install juttle inside of that
you must be somewhere else
Daria Mehra
@dmehra
Feb 03 2016 22:08
“somewhere else” it can’t find package.json
Rodney Lopes Gomes
@rlgomes
Feb 03 2016 22:08
what !?
no
you're doing npm install xyz
not npm install
Daria Mehra
@dmehra
Feb 03 2016 22:09
so why npm WARN enoent ENOENT: no such file or directory, open '/Users/dmehra/package.json’
Rodney Lopes Gomes
@rlgomes
Feb 03 2016 22:10
its a warning but I have no clue why npm would even bother to complain about that
it doesn't need the package.json but then again npm install xyz without -g is intended to be used for adding packages to an existing project but can also be used for simply isolating a set of packages from your global scope for something other than creating another npm package from
Daria Mehra
@dmehra
Feb 03 2016 22:11
but, yes, after that install the juttle CLI binary is ~/node_modules/.bin/juttle
Rodney Lopes Gomes
@rlgomes
Feb 03 2016 22:15
just tried with the latest and things "just worked" so for phil cd somewhere else instead of your current directory that has a node_modules directory and then simply do
juttle -e "read influx -db 'bananas' -from :1 hour ago: -to :now:"
and for good measure lets see what version juttle thinks its running juttle -version