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

InfluxData reporter #630

Open
macbre opened this issue Apr 6, 2016 · 4 comments
Open

InfluxData reporter #630

macbre opened this issue Apr 6, 2016 · 4 comments
Assignees
Labels
Milestone

Comments

@macbre
Copy link
Owner

@macbre macbre commented Apr 6, 2016

Introduce phantomas-reporter-influxdata

Relates to #593

Integration tests using TravisCI

@macbre macbre self-assigned this Apr 6, 2016
@macbre macbre added the enhancement label Apr 6, 2016
@macbre macbre added this to the v1.16 milestone Apr 6, 2016
@EFF
Copy link
Contributor

@EFF EFF commented Apr 7, 2016

good idea !

@macbre how did you imagine that one ? write every metric to a single serie ? write a single point to multiple series where every metric correspond to a serie ? or you might want to be super flexible which I don't really recommend ...

What I would do is write each metric as a point to a single serie where the serie could be a parameter and defaults to phantomas-<tracked_url>

@macbre
Copy link
Owner Author

@macbre macbre commented Apr 8, 2016

Let's try the following approach:

database: phantomas
name: phantomas_<serie name>
tags: metric=<metric name>,url=<url>,tag=<optional tag value>
fields: value=125.64 1434055562000000000
  • push all metrics to the same timeserie (with phantomas_ prefix)
  • add an URL of the page as an url tag
  • allow to provide the reporter with a custom tag value (will be reported as tag tag)

https://docs.influxdata.com/influxdb/v1.1/introduction/getting_started/

https://docs.influxdata.com/influxdb/v1.1/concepts/schema_and_data_layout/:

Every InfluxDB use case is special and your schema will reflect that uniqueness. There are, however, general guidelines to follow and pitfalls to avoid when designing your schema.

  • Encode meta data in tags Tags are indexed and fields are not indexed. This means that queries on tags are more performant than those on fields. In general, your queries should guide what gets stored as a tag and what gets stored as a field:
  • Store data in tags if they’re commonly-queried meta data
  • Store data in tags if you plan to use them with GROUP BY()
  • Store data in fields if you plan to use them with an InfluxQL function
  • Store data in fields if you need them to be something other than a string - tag values are always interpreted as strings

Use https://github.com/node-influx/node-influx

npm install --save influx@next

Integration tests: https://github.com/crodas/InfluxPHP/blob/master/.travis.yml

@anlutro
Copy link

@anlutro anlutro commented May 19, 2016

I suggest pushing more than one metric into the same measurement, if those metrics are related, as that makes it possible to easily do maths on them (for example, subtract one loading time from another).

@macbre macbre modified the milestones: v1.16, v1.17 Jul 10, 2016
@macbre macbre modified the milestones: v1.17, Roadmap Sep 16, 2016
@macbre macbre modified the milestones: Roadmap, v1.18 Sep 30, 2016
@macbre macbre modified the milestones: v1.18, v1.19 Nov 24, 2016
@macbre macbre changed the title InfluxDB reporter InfluxData reporter Nov 24, 2016
@macbre
Copy link
Owner Author

@macbre macbre commented Nov 24, 2016

@anlutro, what if we push all metrics as fields in a single measurement?

@macbre macbre modified the milestones: v1.18, v1.19 Dec 23, 2016
@macbre macbre modified the milestones: v1.19, v1.18 Dec 23, 2016
@macbre macbre modified the milestones: v1.19, v1.20 May 21, 2017
@macbre macbre modified the milestones: v1.20, Roadmap Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.