Skip to content

Commit

Permalink
Merge pull request #101 from Financial-Times/graphite-migration
Browse files Browse the repository at this point in the history
Point Graphite checks at the new system
  • Loading branch information
sjparkinson authored Oct 2, 2018
2 parents f783fee + 5ab5ed8 commit c475af5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/checks/graphiteSpike.check.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class GraphiteSpikeCheck extends Check {
this.seriesFunction = options.seriesFunction || 'sumSeries';
this.summarizeFunction = options.summarizeFunction || 'sum';

this.ftGraphiteBaseUrl = 'https://graphite-api.ft.com/render/?';
this.ftGraphiteBaseUrl = 'https://graphitev2-api.ft.com/render/?';
this.ftGraphiteKey = process.env.FT_GRAPHITE_KEY;
if (!this.ftGraphiteKey) {
throw new Error('You must set FT_GRAPHITE_KEY environment variable');
Expand Down
2 changes: 1 addition & 1 deletion src/checks/graphiteThreshold.check.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class GraphiteThresholdCheck extends Check {

this.samplePeriod = options.samplePeriod || '10min';

this.ftGraphiteBaseUrl = 'https://graphite-api.ft.com/render/?';
this.ftGraphiteBaseUrl = 'https://graphitev2-api.ft.com/render/?';
this.ftGraphiteKey = process.env.FT_GRAPHITE_KEY;
if (!this.ftGraphiteKey) {
throw new Error('You must set FT_GRAPHITE_KEY environment variable');
Expand Down
2 changes: 1 addition & 1 deletion src/checks/graphiteWorking.check.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class GraphiteWorkingCheck extends Check {
}

const fromTime = options.time || '-5minutes';
this.url = encodeURI(`https://graphite-api.ft.com/render/?target=${this.metric}&from=${fromTime}&format=json`);
this.url = encodeURI(`https://graphitev2-api.ft.com/render/?target=${this.metric}&from=${fromTime}&format=json`);

this.checkOutput = "This check has not yet run";
}
Expand Down
2 changes: 1 addition & 1 deletion test/graphiteSpike.check.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('Graphite Spike Check', function(){
}));
check.start();
setTimeout(() => {
expect(mockFetch.firstCall.args[0]).to.match(/^https:\/\/graphite-api.ft.com\/render\/\?/);
expect(mockFetch.firstCall.args[0]).to.match(/^https:\/\/graphitev2-api.ft.com\/render\/\?/);
done();
});
});
Expand Down

0 comments on commit c475af5

Please sign in to comment.