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

Render a graph with historical metrics value #50

Open
macbre opened this issue Jan 30, 2019 · 0 comments
Open

Render a graph with historical metrics value #50

macbre opened this issue Jan 30, 2019 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@macbre
Copy link
Contributor

macbre commented Jan 30, 2019

Library

http://dygraphs.com/

Example: https://my-netdata.io/ (scroll down)

Database query

mysql@geo-db-dev-db-slave.query.consul[mike_holmes]>select timestamp, metric, value from features_metrics where feature = 'ckeditor' order by timestamp DESC limit 20;
+---------------------+--------------------+-------+
| timestamp           | metric             | value |
+---------------------+--------------------+-------+
| 2019-03-01 10:06:13 | editor/publishes   | 16777 |
| 2019-03-01 10:06:13 | editor/impressions | 31226 |
| 2019-03-01 10:06:12 | jira/p3-tickets    |     3 |
| 2019-03-01 10:06:12 | jira/p2-tickets    |     0 |
| 2019-03-01 10:06:12 | score              | 48006 |
| 2019-02-28 22:05:03 | editor/impressions |  5182 |
| 2019-02-28 22:05:03 | jira/p2-tickets    |     0 |
| 2019-02-28 22:05:03 | score              |  8167 |
| 2019-02-28 22:05:03 | editor/publishes   |  2982 |
| 2019-02-28 22:05:03 | jira/p3-tickets    |     3 |
| 2019-02-28 10:05:57 | editor/impressions | 32230 |
| 2019-02-28 10:05:57 | editor/publishes   | 17540 |
| 2019-02-28 10:05:57 | jira/p2-tickets    |     0 |
| 2019-02-28 10:05:57 | jira/p3-tickets    |     3 |
| 2019-02-28 10:05:57 | score              | 49773 |
| 2019-02-27 22:05:53 | score              |  7638 |
| 2019-02-27 22:05:53 | editor/impressions |  4842 |
| 2019-02-27 22:05:53 | editor/publishes   |  2793 |
| 2019-02-27 22:05:53 | jira/p2-tickets    |     0 |
| 2019-02-27 22:05:53 | jira/p3-tickets    |     3 |
+---------------------+--------------------+-------+
20 rows in set (0.00 sec)

Grouped by day

mysql@geo-db-dev-db-slave.query.consul[mike_holmes]>select date(timestamp) as date, metric, value from features_metrics where feature = 'ckeditor' group by date, metric limit 12;
+------------+------------------+-------+
| date       | metric           | value |
+------------+------------------+-------+
| 2019-01-11 | analytics/events | 22198 |
| 2019-01-11 | jira/p2-tickets  |     0 |
| 2019-01-11 | jira/p3-tickets  |     3 |
| 2019-01-11 | score            | 22201 |
| 2019-01-12 | analytics/events | 22198 |
| 2019-01-12 | jira/p2-tickets  |     0 |
| 2019-01-12 | jira/p3-tickets  |     3 |
| 2019-01-12 | score            | 22201 |
| 2019-01-13 | analytics/events | 22655 |
| 2019-01-13 | jira/p2-tickets  |     0 |
| 2019-01-13 | jira/p3-tickets  |     3 |
| 2019-01-13 | score            | 22658 |
+------------+------------------+-------+
12 rows in set (0.00 sec)
@macbre macbre added the enhancement New feature or request label Jan 30, 2019
@macbre macbre added this to the v0.2 milestone Jan 30, 2019
@macbre macbre modified the milestones: v0.2, v0.3 Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant