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 #43

Closed
imajes opened this issue Jan 17, 2012 · 6 comments
Closed

historical data #43

imajes opened this issue Jan 17, 2012 · 6 comments

Comments

@imajes
Copy link
Contributor

imajes commented Jan 17, 2012

Hey,

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

Thanks!

@bernd
Copy link

bernd commented Jan 17, 2012

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.

@imajes
Copy link
Contributor Author

imajes commented Jan 17, 2012

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

@asmuth
Copy link
Owner

asmuth commented Jan 19, 2012

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.

@imajes
Copy link
Contributor Author

imajes commented Jan 19, 2012

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:
#43 (comment)

@knewter
Copy link

knewter commented Feb 16, 2012

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

@skyriverbend
Copy link

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

5 participants