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

Add id to default checks #577

Merged
merged 1 commit into from
Mar 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/lib/error-rate-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = (appName, opts) => {
let region = process.env.REGION ? '_' + process.env.REGION : '';

return nHealth.runCheck({
id: 'error-rate',
name: `Error rate: greater than ${threshold}% of requests for ${appName}`,
type: 'graphiteThreshold',
metric: `asPercent(summarize(sumSeries(next.heroku.${appName}.web_*${region}.express.*.res.status.{500,503,504}.count), '${samplePeriod}', 'sum', true), summarize(sumSeries(next.heroku.${appName}.web_*${region}.express.*.res.status.*.count), '${samplePeriod}', 'sum', true))`,
Expand Down
1 change: 1 addition & 0 deletions src/lib/metrics-healthcheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = (appName) => {
return {
getStatus: () => {
return {
id: 'next-metrics-configuration-valid',
name: `Metrics: next-metrics configuration valid for ${appName}`,
ok: metrics.hasValidConfiguration,
checkOutput: metrics.hasValidConfiguration ? `next-metrics configuration is valid for ${appName}` : `next-metrics configuration is NOT valid for ${appName}`,
Expand Down
1 change: 1 addition & 0 deletions src/lib/unregistered-services-healthCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = {
return {
getStatus: () => {
return {
id: 'all-services-registered',
name: `Metrics: All services for ${appName} registered in next-metrics`,
ok: lastCheckOk,
checkOutput: lastCheckOutput,
Expand Down