HTTP and MongoDB: Endpoint Uptime History Logger Template
A scheduled health check pings a list of endpoints and records every result in MongoDB, giving you a queryable uptime history for each service.
What It Builds
This Spojit template starts on a Schedule trigger that runs on a cron you set. A Loop node walks your list of endpoints, and a Connector node in Direct mode uses the http connector to send a request to each URL. The status code, response latency, and a timestamp are then written as a document into MongoDB through the mongodb connector, building a row-per-check history you can query later.
The Prompt
Paste this into Miraxa and it builds the workflow, connecting the tools for you:
Build a workflow that runs every five minutes, sends an HTTP request to each URL in my list of monitored endpoints, and for every endpoint inserts a document into my MongoDB "uptime_history" collection containing the endpoint URL, the response status code, the response latency in milliseconds, and a timestamp.
Connectors Used
- Schedule trigger - fires the check on a cron interval and timezone you choose.
- http - pings each endpoint and captures status code and latency.
- mongodb - inserts one history document per check.
Customize It
Change "every five minutes" to your preferred interval, swap the collection name, or edit the endpoint list. You can also tell Miraxa to store extra fields such as the response body size or a region label, or to flag any check where the status code is not 200.
Tips
- Keep the http node in Direct mode so each ping is a single exact call with no AI cost.
- Set a short request timeout so a hung endpoint records a failure instead of stalling the run.
- Add an index on the
timestampfield in MongoDB to keep uptime queries fast as history grows.