Currently I put hourly traffic (total number of input requests) of my website in a MySQL table. I keep data for the last 90 days.
I want to check every hour, lets say 6th hour, that whether the traffic has increased/decreased beyond some threshold than last 7 days or last 30 days 6th hour traffic. Basically, I see a pattern of traffic. Different hours have different values.
To generate alerts, I want to find various statistical metrics. After reading a little, I found out that Statsd
can be used for this purpose.
Is it correct things to use for sending alerts like this? Is there any better/simpler solution for this?
I don't intend to build any dashboards.
My current data looks like this:
+---------------------+---------------------+-----------+----------+
| startTime | endTime | component | traffic |
+---------------------+---------------------+-----------+----------+
| 2015-05-01 00:00:00 | 2015-05-01 01:00:00 | rest | 29090345 |
| 2015-05-01 01:00:00 | 2015-05-01 02:00:00 | rest | 32224087 |
| 2015-05-01 02:00:00 | 2015-05-01 03:00:00 | rest | 35165799 |
| 2015-05-01 03:00:00 | 2015-05-01 04:00:00 | rest | 36903464 |
| 2015-05-01 04:00:00 | 2015-05-01 05:00:00 | rest | 40394130 |
| 2015-05-01 05:00:00 | 2015-05-01 06:00:00 | rest | 44874862 |
| 2015-05-01 06:00:00 | 2015-05-01 07:00:00 | rest | 49988600 |
| 2015-05-01 07:00:00 | 2015-05-01 08:00:00 | rest | 52240544 |
| 2015-05-01 08:00:00 | 2015-05-01 09:00:00 | rest | 54517705 |
| 2015-05-01 09:00:00 | 2015-05-01 10:00:00 | rest | 55277967 |
| 2015-05-01 10:00:00 | 2015-05-01 11:00:00 | rest | 55285309 |
| 2015-05-01 11:00:00 | 2015-05-01 12:00:00 | rest | 55572614 |