Skip to content

feat: global ping implementation#3333

Merged
ajhollid merged 20 commits intodevelopfrom
feat/global-ping-implementation
Feb 25, 2026
Merged

feat: global ping implementation#3333
ajhollid merged 20 commits intodevelopfrom
feat/global-ping-implementation

Conversation

@ajhollid
Copy link
Copy Markdown
Collaborator

@ajhollid ajhollid commented Feb 24, 2026

This feature PR integrates the GlobalPing API into Checkmate

  • Option to add Globalping checks to your monitors
  • Separate Geochecks collection for efficient querying
  • Adds a service and repository layer for geochecks
  • Adds associated jobs and job templates to the scheduler
image

@gorkem-bwl
Copy link
Copy Markdown
Contributor

Yesss!!!!!!!

Copy link
Copy Markdown
Member

@Br0wnHammer Br0wnHammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid work 🚀. Please see my comments.

onLocationChange(newValue);
};

console.log(locations);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can omit log here.

pauseJob = async (monitor: any) => {
const result = await this.scheduler.pauseJob(monitor.id);
if (result === false) {
throw new Error("Failed to resume monitor");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Error message is wrong.

if (result === false) {
throw new Error("Failed to resume monitor");
}
const geoResult = await this.scheduler.resumeJob(`${monitor.id}-geo`);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resumeJob always attempts to resume ${monitor.id}-geo and throws if it returns false. This will break all monitors without geoCheckEnabled, since no geo job exists for them.


const SERVICE_NAME = "GeoChecksRepository";

const dateRangeLookup: Record<string, Date> = {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These Date values are computed at import time and never refreshed. After the service has been running for a while:
recent is no longer “last hour”
it’s “last hour relative to server startup”
So after a few hours/days, this becomes silently wrong.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, this has gone unnoticed for some time


const SERVICE_NAME = "GeoChecksRepository";

const dateRangeLookup: Record<string, Date> = {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Joi validation allows dateRange: "hour", but the repository dateRangeLookup only has recent, day, week, month. Passing "hour" will result in no date filter being applied (it'll return all data).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Joi validation is due for replacement with zod, we can remove this at the same time

@ajhollid ajhollid merged commit 17238c9 into develop Feb 25, 2026
7 checks passed
@ajhollid ajhollid deleted the feat/global-ping-implementation branch February 25, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants