Skip to content

Commit

Permalink
Merge pull request #103 from Financial-Times/turn-off-keen-checks
Browse files Browse the repository at this point in the history
Remove keen healthchecks
  • Loading branch information
adgad committed Dec 5, 2018
2 parents 4a3ec77 + 1246f30 commit 312f6b6
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 537 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ IGNORE_A11Y = true
.PHONY: test

test-unit:
KEEN_READ_KEY=123 KEEN_PROJECT_ID=abc FT_GRAPHITE_KEY=123 HEROKU_AUTH_TOKEN=token mocha
FT_GRAPHITE_KEY=123 HEROKU_AUTH_TOKEN=token mocha

test-int:
mocha int-tests/ -r loadvars.js
Expand Down
29 changes: 0 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,32 +95,3 @@ _Note: this assumes that `AWS_ACCESS_KEY` & `AWS_SECRET_ACCESS_KEY` are implictl

* cloudWatchRegion = [default 'eu-west-1'] AWS region the metrics are stored
* cloudWatchAlarmName = [required] Name of the CloudWatch alarm to check

### keenThreshold
Checks whether the result of a keen query for a metric has crossed a threshold

_Note: this assumes that `KEEN_READ_KEY` & `KEEN_PROJECT_ID` are implicitly available as environment variables on process.env_

* query: [required] Query to run to get a count, in the format of [keen-query](https://github.com/Financial-Times/keen-query).
* threshold: [required] Value to check the metric against
* timeframe: [default: 'this_60_minutes'] timeframe to run keen query against.
* direction: [default: 'below'] Direction on which to trigger the healthcheck;
- 'above' = alert if value goes above the threshold
- 'below' = alert if value goes below the threshold

_Warning_: Keen sometimes has a lag before ingesting, particularly during high traffic periods. It's recommended to have a minimum timeframe of 60 minutes, if not more.

### keenSpike
Checks current keen data for a spike of a defined percentage above/below historical keen data from the same period, a defined number of days ago.

_Note: this assumes that `KEEN_READ_KEY` & `KEEN_PROJECT_ID` are implicitly available as environment variables on process.env_

* query: [required] Query to run to get a count, in the format of [keen-query](https://github.com/Financial-Times/keen-query).
* threshold: [default: 0.2] Percentage value to check the metric against e.g. 0.2 checks if current data is more than 20% above/below historical data.
* timeframe: [default: '2'] Number of days to run sample and baseline keen queries against.
* baselinePeriod: [default: '7'] Number of days ago to run baseline keen query e.g. if timeframe is '2', the default baselinePeriod will be 7-9 days ago.
* direction: [default: 'below'] Direction on which to trigger the healthcheck;
- 'above' = alert if value goes above the threshold
- 'below' = alert if value goes below the threshold

_Warning_: Keen sometimes has a lag before ingesting, particularly during high traffic periods. It's recommended to have a minimum timeframe of 60 minutes, if not more.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
"@financial-times/n-raven": "^2.1.0",
"aws-sdk": "^2.6.10",
"fetchres": "^1.5.1",
"keen-query": "^3.2.7",
"moment": "^2.15.1",
"ms": "^2.0.0",
"node-fetch": "^1.5.1"
Expand Down
4 changes: 1 addition & 3 deletions src/checks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,5 @@ module.exports = {
graphiteThreshold: require('./graphiteThreshold.check'),
graphiteWorking: require('./graphiteWorking.check'),
cloudWatchAlarm: require('./cloudWatchAlarm.check'),
cloudWatchThreshold: require('./cloudWatchThreshold.check'),
keenThreshold: require('./keenThreshold.check'),
keenSpike: require('./keenSpike.check')
cloudWatchThreshold: require('./cloudWatchThreshold.check')
};
108 changes: 0 additions & 108 deletions src/checks/keenSpike.check.js

This file was deleted.

81 changes: 0 additions & 81 deletions src/checks/keenThreshold.check.js

This file was deleted.

17 changes: 0 additions & 17 deletions test/fixtures/config/keenSpikeFixture.js

This file was deleted.

17 changes: 0 additions & 17 deletions test/fixtures/config/keenThresholdFixture.js

This file was deleted.

Loading

0 comments on commit 312f6b6

Please sign in to comment.