00:00:39  * madninjajoined
00:55:28  * madninjaquit (Quit: My Mac has gone to sleep. ZZZzzz…)
01:34:39  * dg__quit (Ping timeout: 248 seconds)
01:44:04  * dan336joined
01:47:50  <rphillips>rje: around?
01:49:25  <rje>rphillips, yup
01:49:34  <rphillips>rje: quick vidyo?
01:49:38  <rje>sure
01:53:50  * dan336quit (Quit: Leaving.)
02:07:28  * quakephilquit (Ping timeout: 255 seconds)
02:52:16  <rphillips>creationix: https://gist.github.com/rphillips/ed869ffd17efc414f831
02:52:30  <rphillips>seems like valid json, but the luvit parser doesn't like it
03:38:05  <creationix>rphillips: it’s not valid JSON.
03:38:14  <creationix>keys must be quoted in JSON because crockford
03:42:27  <creationix>ok, fixed the two bugs in lit that were found today
03:42:49  <creationix>turns out the websocket codec would frame messages wrong if they were exactly 126 or 127 bytes of body
03:43:22  <creationix>also the new git library had a couple typoes from when I ported it from rye that only showed when your local git repo was packed
03:44:02  <creationix>so now if you ever want to have the entire lit repository locally (like before going offline for a while), simply clone the backup
03:44:31  <creationix>git clone git@github.com:luvit/lit-backup.git —bare ~/.litdb.git
05:25:16  * SkyRocknRolljoined
05:25:16  * SkyRocknRollquit (Changing host)
05:25:16  * SkyRocknRolljoined
07:22:49  * dg__joined
07:36:33  * dg__quit (Ping timeout: 276 seconds)
07:36:48  * dg__joined
07:52:45  * sousouxquit (Ping timeout: 252 seconds)
08:24:38  * SkyRocknRollquit (Remote host closed the connection)
08:48:20  * SkyRocknRolljoined
08:48:44  * SkyRocknRollquit (Changing host)
08:48:44  * SkyRocknRolljoined
09:46:55  * sousouxjoined
09:51:25  * sousouxquit (Ping timeout: 264 seconds)
09:54:28  * sousouxjoined
10:38:16  * SkyRocknRoll_joined
10:54:56  * sousouxquit (Ping timeout: 272 seconds)
11:29:49  * quakephiljoined
11:36:23  * SkyRocknRollquit (Quit: Leaving)
12:13:02  * SkyRocknRoll_quit (Remote host closed the connection)
12:21:55  <rphillips>nice
12:23:24  <rphillips>hmm. lame that it isn't valid json
13:04:59  <rphillips>morning
14:21:07  <creationix>mornin'
14:33:19  * dan336joined
14:50:57  * madninjajoined
14:51:05  <creationix>madninja: howdy
14:51:14  <madninja>creationix: hey!
14:51:23  <creationix>I fixed the two issues you found yesterday
14:51:38  <madninja>oh thank you!
14:53:09  <madninja>verified! Just blew away the db and deps and did a clean lit install.. Flew right through
14:53:20  <creationix>https://github.com/creationix/lua-git/commit/464e2433831c5e90da06a3c6d6aefe5eb6ef2de8
14:53:29  <creationix>(that’s to fix it so it can work with packed repos)
14:54:16  <creationix>madninja: and this was to fix the websocket framing https://github.com/luvit/lit/commit/4cffee03d2388161f6202ee20c7f265b2701d668
14:54:38  <madninja>that packed repo bit must've been hard to find
14:55:10  <creationix>not too bad, it helps I wrote that code not too long ago
15:06:08  <madninja>good stuff.. all in working order.
15:27:23  * madninjaquit (Quit: My Mac has gone to sleep. ZZZzzz…)
16:50:27  * hdmsjoined
17:01:15  <creationix>rphillips: I added pipe support to coro-tcp and renamed it to coro-net https://github.com/creationix/gardener/blob/master/server.lua
17:01:38  <creationix>it takes port as number, path as string or options table like {host=…,port=…} or {path=…}
17:01:52  <creationix>you can also set things like the connection timeout and flags for dns resolution
17:02:22  <creationix>port-as-number defaults to localhost for host
17:03:37  <rphillips>nice
17:03:51  <rphillips>we may need to add domain socket support to the luvit http module
17:04:37  <rphillips>lots of hurdles with the xen monitoring
17:07:23  <creationix>yeah, I thought about that when I was updating coro-http to use coro-net
17:07:37  <creationix>I decided to not change the API for now, but http over sockets is sometimes very useful
17:08:35  <creationix>rphillips: what’s the exact issue with xen?
17:09:05  <creationix>and what exactly is a unix domain socket? Is that what I’m creating in my example?
17:09:15  <creationix>file says it’s a “socket”
17:09:29  <creationix>and if I cat the file, it triggers a connection in my code and writes out the output
17:10:24  <creationix>my goal here is to have an agent custom plugin that just does `cat check` and handle all the actual logic in my long-running luvit server that’s always collecting information from the sensors
17:20:22  <rphillips>a unix domain socket is basically a named pipe
17:20:32  <rphillips>yeah, I think it is the same as what you are using
17:20:49  <rphillips>xen requires the root username/password for fetching rrd data
17:21:48  <rphillips>nice... that is a good diea
17:21:50  <rphillips>idea
17:30:40  <rphillips>i didn't realize that irccloud is erlang based
18:04:58  <rphillips>the memory usage of luvit/luajit still amazes me
18:11:39  <creationix>rphillips: so now that the agent is feature complete and pretty stable, how much ram does it typically use?
18:11:55  <rphillips>on my linux box it uses around 8 MB
18:12:05  <rphillips>on windows, it's around 5-6
18:12:13  <rphillips>and on OSX it's around 7
18:12:16  <creationix>not bad
18:12:27  <creationix>the lit API and websocket server is sitting around 10mb
18:12:34  <creationix>linux 64-bit
18:13:07  <rphillips>really, not bad at all
18:13:24  <creationix>for comparison, znc is using 20mb and my node servers are using 111mb and 53mb for the two workers and 21mb for the master process
18:13:25  <rphillips>30-50 MB minimum with nodejs
18:13:42  <creationix>and the node servers are just serving mostly static content from git
18:13:46  <rphillips>yep... really is quite impressive
18:13:59  <creationix>howtonode.org is using 213mb
18:15:01  <creationix>the luvit server running luvit.io (same type of workload as howtonode.org) is 5mb
18:15:20  <creationix>they are both static sites that render on the fly from markdown and templates
18:52:47  <creationix>rphillips: is there a way to override the timestamp on metrics with the agent plugins?
18:53:19  <creationix>my sensors will be reporting on their own schedule different from what the agent will be polling the plugin
18:53:40  <creationix>it looks like all metrics with a run of a plugin are timestamped with when the plugin was run
18:55:03  <rphillips>no. not currently... there is a setTimestamp api
18:55:22  <rphillips>i would let the sensors be the authoritative keeper of the timestamp
18:55:30  <rphillips>and propogate that up to the agent
18:55:42  <creationix>but I can’t do this with a plugin, I’d have to patch the agen itself?
18:56:54  <creationix>or you’re saying to add this ability to the agent-plugin interface?
18:56:56  <rphillips>correct, not currently. the idea is that the plugin runs on an interval and you want the metrics from that time interval. that is why the agent keeps the timestamp
18:57:10  <rphillips>and not the plugin
18:57:59  <creationix>so we could modify the output syntax to have an optional timestamp on metrics
19:00:12  <creationix>the other way I could go is have the sensors listening for requests and poll them
19:00:20  <creationix>but then they have to be on all the time eating battery
19:00:41  <rphillips>so we have ['status', 'metrics'] keywords so far
19:01:05  <creationix>plus that would cause a lot of latency waiting for the request responses from all the sensors
19:01:06  <rphillips>i think we could add a 'timestamp [unixtimestamp]'
19:01:17  <creationix>oh, put the timestamp between metrics, that would work
19:01:40  <rphillips>status ok this is a status
19:01:57  <rphillips>metric error_code uint32 0
19:02:01  <rphillips>timestamp 12345
19:02:31  <rphillips>that makes a lot of sense
19:02:53  <creationix>I’ll try my hand at adding it and send a PR
19:03:10  <creationix>unix ms timestamp is fine?
19:04:00  <creationix>btw, according to the comment in plugin.lua, the only metric types are “string”, “gauge”, “float” and “int”, but I see a lot of “int32”, etc
19:04:47  <rphillips>yeah, make sure it's gmt though
19:05:00  <creationix>there is no timezone on unix timestamps I thought
19:05:31  <rphillips>you can have a local timestamp or a gmt timestamp
19:05:42  <creationix>eww
19:05:43  <rphillips>there isn't a timezone prefix/suffix
19:05:58  <rphillips>there is an api in the agent to fetch the gmt unix time
19:06:15  <rphillips>everything in ele is a counter
19:06:23  <rphillips>so those 'types' are extremely misleading
20:09:30  <creationix>rphillips: I think this is how to do it. I’m not sure about the call to set timestamp. https://github.com/virgo-agent-toolkit/rackspace-monitoring-agent/pull/761
20:10:33  <rphillips>nice
20:10:36  <rphillips>that looks good to me
20:11:52  <creationix>I saw that init called self:setTimestamp() and set self._timestamp to two different values
20:11:59  <creationix>so I’m not sure I’m doing it right
20:12:26  <rphillips>hmm
20:12:53  <rphillips>oh well
20:13:01  <rphillips>that is a bug prior to your change
20:13:23  <rphillips>creationix: can you delete line 627
20:13:25  <rphillips>https://github.com/virgo-agent-toolkit/rackspace-monitoring-agent/blob/add_timestamp_keyword/check/base.lua#L627
20:13:44  <rphillips>and then just call the setTimestamp function
20:39:26  <creationix>I see, thanks
20:40:52  <creationix>ok, now to actually test this
20:41:00  <creationix>my microcontrollers aren’t behaving today
20:55:37  <creationix>rphillips: I’m trying to test the agent on my laptop, but I’m having trouble connecting/configuring it
20:56:58  <creationix>I can see it’s authenticated with all three AEPs, but intelligence says it’s not connected
21:01:40  <rphillips>creationix: check out the agent ID
21:02:03  <creationix>is that the id using the hostname of my laptop?
21:02:04  <rphillips>does it match up to the instance ID in intelligence?
21:02:36  <rphillips>it falls back to using the hostname on the laptop yes, unless the config file is overriding it
21:06:24  <creationix>ok, so I have a json config with entity_id, agent_id, and agent_token, can I just put those in my local config manually?
21:06:30  <creationix>I’m not sure what to rename the keys to though
21:06:56  <creationix>the config file currently has “monitoring_token” and “monotoring_id"
21:08:13  <creationix>I’m pretty sure “agent_token” == “monitoring_token"
21:10:10  <creationix>ok, so “agent_id” from the json matches “monitoring_id” in the config file. I’m connected now!
21:12:11  <rphillips>ok cool
21:12:19  <rphillips>sorry... looking at this xen stuff
21:14:48  <creationix>no problem :)
21:15:05  <rphillips>https://gist.githubusercontent.com/rphillips/b38ec881433115bf183f/raw/b95ee2118433dbd1ebe62163bbf46a7c75b87e87/gistfile1.txt
21:15:15  <rphillips>thinking about parsing these two output streams to gather metrics
21:17:42  <rphillips>not sure if that is going to work... xentop doesn't spit out the uuid's
21:34:56  <creationix>rphillips: Uncaught Error: [string "bundle:check/base.lua"]:411: attempt to call method 'setTimestamp' (a nil value)
21:35:15  <rphillips>i bet the parse returned a nil
21:35:20  <rphillips>oh wait
21:35:53  <creationix>self is a ChildCheck in that function
21:36:13  <creationix>setTimestamp is a method of CheckResult
21:36:15  <rphillips>you want the checkResult:setTimestamp
21:36:18  <rphillips>yep
21:38:09  <creationix>the jitter is nice, but makes testing slow :)
21:39:09  <creationix>hmm, it appears I can’t sent multiple metrics with the same name
21:39:13  <creationix>only the last one is showing
21:40:03  <creationix>output is something like https://gist.github.com/creationix/4d4dea7194ebec493ee5
21:40:34  <creationix>I send out 30 metrics 1000ms apart
21:43:32  <creationix>oh well
21:50:03  <creationix>I’m pretty sure it’s ignoring my timestamp somewhere
21:51:52  <rphillips>yeah, the set needs to be unique
21:55:44  <creationix>so the entire payload shares a single timestamp
22:26:36  <creationix>I wonder what uv.now() is. It’s in milliseconds, but the number is way too small to be a timestamp since epoch
22:30:02  <torque>"The timestamp increases monotonically from some arbitrary point in time. Don’t make assumptions about the starting point, you will only get disappointed."
22:30:05  <torque>from http://docs.libuv.org/en/latest/loop.html#c.uv_now
22:56:18  <creationix>lol
22:56:30  <creationix>I remember reading that, but I had associated it with uv.hrtime and not uv.now
22:57:45  * dan336quit (Quit: Leaving.)