Skip to content
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

historical data #8

Open
bf4 opened this issue Jun 15, 2014 · 6 comments
Open

historical data #8

bf4 opened this issue Jun 15, 2014 · 6 comments

Comments

@bf4
Copy link

bf4 commented Jun 15, 2014

Issue by imajes
Tuesday Jan 17, 2012 at 20:34 GMT
Originally opened as asmuth#43


Hey,

i see how awesome fnordmetric is for ongoing, current data, but is there any plan/suggested process for importing historical data?

Thanks!

@bf4
Copy link
Author

bf4 commented Jun 15, 2014

Comment by bernd
Tuesday Jan 17, 2012 at 21:08 GMT


I haven't tested it yet, but it might be possible to add the _time parameter to the event payload. Like this.

echo "{\"_type\": \"unicorn_seen\", \"_time\":1326834487}" | nc localhost 1337

It will be set to the current unix timestamp by default.

@bf4
Copy link
Author

bf4 commented Jun 15, 2014

Comment by imajes
Tuesday Jan 17, 2012 at 21:10 GMT


Yeah, I had wondered about that... and still wondering if anyone has any experience / experiments with this kind of historical data?

@bf4
Copy link
Author

bf4 commented Jun 15, 2014

Comment by paulasmuth
Thursday Jan 19, 2012 at 12:48 GMT


Yes, as bernd pointed out you can either just set the _time field, or use the included importer:

If you usually run your fnordmetric app like this:

ruby my_fnordmetric_app.rb run

you can also invoke the "import" task like this:

ruby my_fnordmetric_app.rb import DUMP_FILE=/path/to/newline_seperated_events.json

If you use "progressive/persistent gauges" (any of your gauges has the :progressive => true option) the events in the dump_file need to be in chronological order (first line should be the oldest and last line should be the most recent).

Btw, there is a third task called "log" which you can use to create these log/dumpfiles:

ruby my_fnordmetric_app.rb log DUMP_FILE=/path/to/events_19.01.12.json

I'll add a readme section about this in the evening.

@bf4
Copy link
Author

bf4 commented Jun 15, 2014

Comment by imajes
Thursday Jan 19, 2012 at 15:03 GMT


This is super helpful, thanks! What would also help is a bit more docs on how best to convert different kinds of data into graphs. :)

On Jan 19, 2012, at 7:48, Paul Asmuthreply@reply.github.com wrote:

Yes, as bernd pointed out you can either just set the _time field, or use the included importer:

If you usually run your fnordmetric app like this:

ruby my_fnordmetric_app.rb run

you can also invoke the "import" task like this:

ruby my_fnordmetric_app.rb import DUMP_FILE=/path/to/newline_seperated_events.json

If you use "progressive/persistent gauges" (any of your gauges has the :progressive => true option) the events in the dump_file need to be in chronological order (first line should be the oldest and last line should be the most recent).

Btw, there is a third task called "log" which you can use to create these log/dumpfiles:

ruby my_fnordmetric_app.rb import DUMP_FILE=/path/to/events_19.01.12.json

I'll add a readme section about this in the evening.


Reply to this email directly or view it on GitHub:
asmuth#43 (comment)

@bf4
Copy link
Author

bf4 commented Jun 15, 2014

Comment by knewter
Thursday Feb 16, 2012 at 14:36 GMT


I just posted a gist showing how I'm doing this currently (obv fake data): https://gist.github.com/1845317 /cc @imajes @bernd @paulasmuth

@bf4
Copy link
Author

bf4 commented Jun 15, 2014

Comment by jonlemmon
Thursday Mar 21, 2013 at 04:01 GMT


Is there a reason why this issue has been left open? Looks like it's sorted right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant