# Sentinel — Full Blog Content
> The complete text of the Sentinel blog. For the site index and documentation links see https://sentinel.rootstuff.io/llms.txt.
---
# How to Get Notified of nginx, PHP and Node.js Security Releases
URL: https://sentinel.rootstuff.io/blog/how-to-get-notified-of-security-releases
Published: 2026-11-23
Category: Security
In the two weeks from November 10 to November 23, 2026, nine of the eleven projects on this page shipped a security release. Four of them did it on the same day. nginx, WordPress, Ruby and Drupal all published fixes on November 18, and PHP followed the next day.
If you run a web server, a language runtime and a CMS, there's a good chance one of those was yours. Each release fixed one or more CVEs, and the fix was out. Whether you heard about it that day depended on which lists and feeds you happened to be watching.
This is a guide to those channels, and to getting security updates for the software you run on the day they're published. It covers where each project announces a security release, how often each one has done it this year, and how to get them as alerts without subscribing to eleven different things.
**Updated November 23, 2026.** The counts below were read that day from each project's own channel.
## Where each project announces security releases and advisories
Every project has an official channel. The channels vary: mailing lists, RSS feeds, advisory pages and GitHub. You can subscribe to each project's own mailing list or feed, which the table below links, or you can have one service watch all of them and alert you, which the last section explains.
| Project | Where the security release is announced | Subscribe by |
|---|---|---|
| nginx | [Security advisories page](https://nginx.org/en/security_advisories.html) | The [nginx-announce](https://mailman.nginx.org/mailman3/lists/nginx-announce.nginx.org/) mailing list |
| Apache HTTP Server | [Apache 2.4 vulnerabilities page](https://httpd.apache.org/security/vulnerabilities_24.html) | The [announce list](https://httpd.apache.org/lists.html) |
| PHP | [PHP 8 changelog](https://www.php.net/ChangeLog-8.php) | The [php-announce list](https://www.php.net/mailing-lists.php) or the [releases feed](https://www.php.net/releases/feed.php) |
| Node.js | [Vulnerability blog](https://nodejs.org/en/blog/vulnerability) | The [nodejs-sec group](https://groups.google.com/g/nodejs-sec) or the [vulnerability feed](https://nodejs.org/en/feed/vulnerability.xml) |
| Ruby | [Security page](https://www.ruby-lang.org/en/security/) | The [news feed](https://www.ruby-lang.org/en/feeds/news.rss) |
| Go | [Vulnerability database](https://pkg.go.dev/vuln/list) | The [golang-announce group](https://groups.google.com/g/golang-announce) |
| WordPress | [Security news](https://wordpress.org/news/category/security/) | Its [RSS feed](https://wordpress.org/news/category/security/feed/) |
| Drupal | [Security advisories](https://www.drupal.org/security) | The [core advisories RSS feed](https://www.drupal.org/security/rss.xml) |
| Laravel | [GitHub security advisories](https://github.com/laravel/framework/security/advisories) | The repository's advisories |
| Statamic | [GitHub security advisories](https://github.com/statamic/cms/security/advisories) | The repository's advisories |
| Craft CMS | [GitHub security advisories](https://github.com/craftcms/cms/security/advisories) | The repository's advisories |
A few of these behave in ways worth knowing before you rely on them.
Go tells you early. Its [security policy](https://go.dev/doc/security/policy) says a pre-announcement goes to golang-announce three to seven days before a release that carries security fixes, so you can plan for it. For Go applications, installing a new toolchain doesn't update an existing binary. You need to rebuild and redeploy.
The mailing lists announce every release, and security releases are a small share of them. PHP's own description of php-announce is "very low-volume", which is true, but you still have to read each message to see whether it's a security release or a bug-fix one.
nginx's advisories page lists the fixed versions and the affected ranges without release dates. To know when a fix came out you need the release itself.
Drupal's feed is for Drupal core. Contributed modules have their own advisories, and there are many more of them.
## How often each project ships a security release
A channel you check by hand works when releases are rare. Here's how many days in 2026 each project has published one, read from Sentinel's [security releases](/security-releases) data on November 23. A day counts when the project's own channel lists a release that fixes a security issue, and several advisories fixed on the same day count once.
| Project | Days with a security release in 2026 | Most recent |
|---|---|---|
| [Go](/security-releases/go) | 14 | November 10 |
| [Statamic](/security-releases/statamic) | 14 | August 6 |
| [nginx](/security-releases/nginx) | 10 | November 23 |
| [Node.js](/security-releases/nodejs) | 8 | November 11 |
| [WordPress](/security-releases/wordpress) | 8 or more | November 18 |
| [Drupal](/security-releases/drupal) | 7 | November 18 |
| [PHP](/security-releases/php) | 6 | November 19 |
| [Craft CMS](/security-releases/craft-cms) | 6 or more | August 7 |
| [Apache HTTP Server](/security-releases/apache) | 4 | November 11 |
| [Laravel](/security-releases/laravel) | 4 | November 13 |
| [Ruby](/security-releases/ruby) | 2 or more | November 18 |
WordPress, Craft CMS and Ruby are marked "or more" because their sources only reach back so far, and Sentinel started reading them in November. The other eight come from sources that carry the whole year.
Take a common stack. nginx, PHP and WordPress have had 10, 6 and at least 8. That's at least 24 security release announcements across three projects this year, about one every two weeks, on three different sites.
Some projects are predictable. Every one of Drupal's seven this year landed on a Wednesday in the middle of the month. Most aren't.
## You need a security alert for each layer you run
It's easy to assume the alert for the layer underneath covers the one on top. It doesn't.
Statamic is built on Laravel. In 2026 Statamic has published security fixes on 14 days and the Laravel framework on 4, and they're about different code. Laravel's were in the framework. Statamic's were in Statamic, such as an account takeover through OAuth email matching, and none of them would ever appear as a Laravel advisory because nothing in Laravel changed.
It works the other way too. A Statamic site still runs Laravel and PHP, so it needs all three. The same holds for Craft CMS, Drupal and WordPress on PHP, and for all of them on nginx or Apache.
So count your layers. A typical site has a web server, a runtime and an application, and each one announces somewhere different.
## CVE alerts and security release alerts are different things
A CVE is the record of a vulnerability. A security release is the fix. A feed of CVEs includes software you don't run and records that have no fix yet, so it can be noisy. A security release alert fires when there's something to install.
The two meet in the release notes. Many projects name the CVE IDs a release fixes. Where they do, Sentinel's [security releases](/security-releases) pages list them beside the release, so you can go from a CVE number to the version that closes it.
## What a security release alert should tell you
Whatever you use, a useful alert has three things in it.
The first is the fixed version on each release line. "PHP 8.3.37" is only half an answer if you run 8.4. For [PHP's November 19 release](https://www.php.net/ChangeLog-8.php) you want to see 8.2.36, 8.3.37, 8.4.28 and 8.5.13 together and find your line.
The second is the project's own severity rating, where it gives one. nginx rated [its November 23 fix](https://nginx.org/en/security_advisories.html) medium. Drupal rated [one of its November 18 advisories](https://www.drupal.org/sa-core-2026-017) "highly critical". That helps you decide how urgently to look into it. Your exposure and the versions you run matter as well.
The third is a link to the source, so you can read what the project said before you act on it.
A good alert also doesn't tell you you're affected unless it knows. A version number alone can mislead. Distributions backport fixes, so Ubuntu's nginx package can carry a security fix under an older upstream number, and a scanner that compares version strings will call a patched server vulnerable. An alert that says "a release was published, check your version" is honest about what it knows.
## Get security release alerts alongside your downtime alerts
Subscribing to all of the above works. It's eleven sources in several formats, and most of what arrives won't be a security release.
Sentinel reads each project's own channel every 15 minutes and sends [security release alerts](/security-release-alerts) for the software you choose. You tick what you run, and the alert arrives where your downtime alerts already go, which means email, Slack, Discord, Microsoft Teams or Telegram depending on your plan. It names the fixed versions, the severity and the source.
It's on every plan, including the [free one](/pricing), and it's off until you turn it on. Sentinel also reads a page from each site you monitor and tells you what it spotted, so if your site answers with an nginx header you'll see that suggestion next to the checkbox.
Then there's the part that happens after you patch. An update restarts the thing your site runs on, and patch day is when sites break. The same account [checks your site from fifteen regions](/multi-region-monitoring) and tells you if it doesn't come back.
You don't need an account to use the data. The [security releases](/security-releases) pages list every release for all eleven projects, with the newest fixed version on each line.
## Frequently asked questions
### Is this a vulnerability scanner?
No. Sentinel doesn't log in to your servers or compare versions. It tells you a project published a security release and which versions carry the fix. Checking what you run is still your job.
### Does it cover WordPress plugins or Drupal modules?
No. It covers WordPress core and Drupal core. Plugins and contributed modules publish far more advisories, through different channels, and mixing them in would bury the core releases.
### Can I look up which release fixes a CVE?
For some of them. Where a project's own channel carries CVE IDs, its page under [security releases](/security-releases) lists them next to the version that fixed them.
### How fast will I hear about a release?
Sentinel reads each source every 15 minutes. How soon a project lists its own release is up to the project.
### What if the software I run isn't on the list?
[Ask for it](/contact). A project gets added when it publishes its security releases somewhere that can be read without guessing.
---
# I Replaced 50+ Horizon Workers With Go. Then Laravel Became the Bottleneck.
URL: https://sentinel.rootstuff.io/blog/laravel-control-plane-fifteen-regions
Published: 2026-11-10
Category: Infrastructure
A few weeks ago I wrote about [replacing Sentinel's PHP monitoring workers with one Go process per region](/blog/laravel-edge-workers-to-go-probes). I ended that post with a guess. Once the regional nodes were cheap and barely loaded, the next limit was going to be the control plane. The Laravel app that hands every node its work and takes every result back.
It wasn't much of a guess. The control plane had been complaining since the fifth region.
The last PHP edge was retired on October 19. By October 21 the network had gone from six regions to fifteen, on six continents, each one a $5 box running a 50 MB process. Nothing on those boxes broke. Everything that broke was in Laravel. Some of it had shown up earlier in October, when the first two Go regions joined the four PHP ones, and going to fifteen made the rest impossible to put off. None of it was because Laravel was the weak part. Work that used to be spread across a fleet of 16 GB servers had been moved into one application on one box, and that application had to be written as if it mattered. Every fix was ordinary Laravel done a little more carefully than before. This post is about those fixes. Here's the short version.
| What broke | What it cost | The fix |
|---|---|---|
| Recording inside the request | Results backing up on healthy nodes | Acknowledge first, 200 results validated in 0.47 s |
| Payloads in a JSON column | 58 GB of disk in 20 hours | Files, deleted once recorded |
| Hashing the manifest per poll | A full manifest build to answer "no" | A cache counter as the ETag |
| One broadcast for every region | 460 failed jobs overnight | One event per region |
| Hydrating a week of checks | 128 MB limit, and the chart was a 500 | SQL buckets and a cursor |
| Health queries per region | A 4.6 s dashboard request | One grouped query, cached |
| Uploads through a proxy | 53.5 s against 2.2 s direct | A direct hostname for probes |
## What fifteen regions actually send
A probe node syncs its manifest every ten seconds and posts results in batches of up to 200, every five seconds. Each region's manifest is its HTTP monitors plus the SSL, DNS and domain sub-checks that region owns, and on the fastest tier a monitor is checked every 15 seconds from every region.
In the PHP days each region recorded its own results into the shared database from its own Horizon workers. Now one app on one server receives all of it over HTTP, and the question of what happens inside that request turned out to matter more than anything on the nodes.
## Acknowledge first, record later
The first version of the results endpoint did the obvious thing. Validate the batch, loop through it, replay each observation through the same code path the PHP workers had used, return the per-item outcome. With two pilot regions it was fine. With every region on probes and nine more about to go live, a full batch was 200 results, and the request did 200 rounds of consensus, incident and timestamp work before the node heard anything back.
The node's behaviour made that worse. It spools results to disk and only drops what the control plane acknowledges, which is the right design for a flaky link, but it also means a slow acknowledgement holds the next batch. Pending results on a node is the number I watch, and it was climbing on a healthy network.
So the endpoint stopped recording. It now validates the batch, writes the payload to a file, inserts one row of metadata, and acknowledges every index. If the write fails nothing is acknowledged and the node keeps spooling. A full batch of 200 results validates in 0.47 seconds, and the write behind it is one file and one row. Recording moved to a queued job:
```php
class DrainProbeNode implements ShouldQueue
{
public const QUEUE = 'probe-ingest';
public const BUDGET_SECONDS = 90;
public int $tries = 1;
public function middleware(): array
{
return [
(new WithoutOverlapping("probe-drain:{$this->nodeId}"))
->dontRelease()
->expireAfter(self::BUDGET_SECONDS + 60),
];
}
public function handle(ProbeBatchProcessor $processor): void
{
$node = ProbeNode::find($this->nodeId);
$deadline = now()->addSeconds(self::BUDGET_SECONDS);
while (now()->lt($deadline)) {
$batch = ProbeResultBatch::pendingFor($node->id)
->where('attempts', '<', ProbeResultBatch::MAX_ATTEMPTS)
->first();
if (! $batch) {
return;
}
if (! $this->drain($node, $batch, $processor)) {
return;
}
}
// Out of budget with work left: a fresh job picks it up, so one
// node's backlog never pins a worker for longer than the budget.
self::dispatch($this->nodeId);
}
}
```
It's worth being precise about what the acknowledgement now means, because it changed. Before, a 200 from the results endpoint meant "recorded". Now it means "durably received". The payload is on the primary's disk and a row points at it. Recording happens later and can fail, so the guarantee the node gets is weaker, and the control plane takes on the job of never losing what it has acknowledged. The rest of the design is about keeping that promise.
`WithoutOverlapping` is keyed per node, because a node's results have to be recorded in the order they happened. A recovery recorded before the failure it follows is a phantom incident. `dontRelease()` means a second dispatch for the same node is dropped rather than retried while one is running, which is safe only because the running drain loops until the node has nothing pending and a scheduled command re-dispatches every minute for any node with batches still waiting. The lock expires a minute after the budget, so a worker that dies mid-drain can't hold a node hostage.
Each batch row keeps a cursor. If the processor can't reach storage partway through, it stops and the cursor is saved at that index, and the next attempt resumes there. Everything before the cursor was recorded and isn't recorded again. That makes recording at-least-once per batch, not exactly-once. A worker killed outright between recording a result and saving the cursor replays that slice, and nothing in the recorder refuses a result it has already seen. I've chosen to live with that, because the window is one batch after an abnormal kill and a duplicated sample is far cheaper than a lost one. If a batch throws three times it's abandoned with the error on its row. That is the one path where acknowledged results are lost, it's logged as an error, and I'd rather lose one batch loudly than block every batch behind it.
The queue gets its own Horizon supervisor with `balance => false`, sized so a backlog on one node never starves the others. The every-minute sweeper is the safety net, not the mechanism. On a normal day it finds nothing, and it prunes rows older than an hour on the way out.
The probe itself needed no change for any of this. It already spooled and already dropped only acknowledged items. The missing half was always on the Laravel side.
## The 58 GB I didn't mean to store
The first version of that batch row kept the payload in a JSON column. It was the easy thing to do, and the payload can include captured page bodies up to 2 MB each for failed checks, because the control plane is what diagnoses them.
Twenty hours later the primary's root disk had gone from 24% to 48%.
The batch table was 837 MB. The hourly prune was deleting rows on schedule. The disk was being eaten by MySQL's binary log. Every batch insert, and every delete an hour later, went through the binlog and across the replication stream to the standby, and the binlog keeps everything for 30 days by default. It had reached 750 files and 75 GB, about 58 GB of that in those twenty hours, for data whose useful life was about five seconds.
Payloads are files now, under the app's private storage, written by the endpoint and deleted by the drain job the moment a batch is recorded. The row holds the path, the count, the cursor and the outcome. A sweeper removes any orphan file older than a day. The binlog expiry on the primary is seven days, which is a change I should have made long before this. Purging the old logs took the disk from 48% to 13%.
The rule I took from it is short. Nothing that exists per check result goes in MySQL unless it needs to replicate. Laravel makes it very easy to put a JSON column on a model and move on, and for most data that's fine. For data that arrives in a steady stream and dies a few seconds later, the database isn't a buffer.
## An ETag that isn't a hash
Every node asks the control plane for its manifest every ten seconds. The point of polling that often is that a new monitor should be checked within seconds of being created, not minutes. The cost is 15 regions times six polls a minute, each one asking "anything new?"
The first implementation answered that by building the manifest and hashing it, so the ETag was an honest content hash. Correct, and a full manifest build per poll. At fifteen regions that would have been several thousand manifest builds an hour to say "no" almost every time. I replaced it at five.
The ETag is now a version stamp that lives in the cache:
```php
final class ProbeManifestVersion
{
public const SCHEMA = 2;
public static function current(): string
{
$epoch = Cache::rememberForever('probe:manifest:epoch', fn () => (string) now()->getTimestamp());
$counter = (int) Cache::get('probe:manifest:counter', 0);
return '"'.$epoch.'.'.$counter.'.s'.self::SCHEMA.'"';
}
public static function bump(): void
{
try {
if (! Cache::has('probe:manifest:counter')) {
Cache::forever('probe:manifest:counter', 0);
}
Cache::increment('probe:manifest:counter');
} catch (Throwable $e) {
report($e);
}
}
}
```
A poll that presents the current stamp is a 304 for the price of two cache reads. The counter moves from Eloquent model events, and which events turned out to be the interesting part:
```php
static::created(fn () => ProbeManifestVersion::bump());
static::updated(function (Monitor $monitor): void {
if ($monitor->wasChanged(ProbeManifestVersion::MONITOR_ATTRIBUTES)) {
ProbeManifestVersion::bump();
}
});
static::deleted(fn () => ProbeManifestVersion::bump());
```
A monitor is saved every time it's checked, because its status and last-checked time live on the row. If every save bumped the version, every node would refetch every manifest a few times a second and the whole idea would collapse. So the `updated` hook only bumps when an attribute that reaches a manifest row changed, and `created` is a separate hook rather than a check on `wasRecentlyCreated` inside `saved`, because that flag stays true on the creating instance for the rest of the request. I learned that one the slow way.
Two more things live in that stamp. The epoch is set on the first read after a cache flush, so a flush can't hand a node a counter value it already holds. And the schema number is part of the tag, so when the manifest gains a field, every node holding a cached copy refetches at once instead of waiting for the next monitor change. The node's own version is appended too, after an upgraded node was answered 304 forever against a manifest shape it had never seen.
The effect was the one I wanted. A monitor created in the dashboard is checked from every region in about ten seconds.
It also produced the one real outage of the migration, four minutes long. A node that's installed but not yet active syncs an empty manifest so I can watch it on the network before it carries work. When Seattle flipped to active, the node presented the ETag it had cached against the empty list, the stamp hadn't moved, and it was answered 304 with no monitors for four minutes until I bumped the version by hand. An inactive manifest now carries its own fixed tag.
## Things that were fine at four regions
None of these were design problems. They were limits that sat comfortably out of reach until the fifth or the tenth region arrived.
### Reverb's 10 KB message cap
The admin dashboard gets an infrastructure health snapshot every minute over a private channel. The payload was one event with every region's vitals in it. The fifth region pushed it past 10 KB, and 460 broadcast jobs failed with "Payload too large" overnight before I looked. It's one event per region now, and the page merges them. The incident event had hit the same cap a few weeks earlier when a long incident's diagnostics outgrew it, so that one already sent a count instead of the activity log. I should have gone looking for the next payload that grows with the network.
### Hydrating a hundred thousand models
The monitor page draws a seven-day percentile series. The query had always loaded the raw checks for the window as Eloquent models and bucketed them in PHP. A 30-second monitor on four regions fit in the 128 MB request limit. The fifth region tipped it over, and the chart became a 500. The fix is the one you'd expect:
```php
$rows = $monitor->responseTimes()
->toBase()
->whereIn('region', $regions)
->where('checked_at', '>=', $from)
->selectRaw('(FLOOR(UNIX_TIMESTAMP(checked_at) / ?) * ?) AS bucket, response_time', [$bucketSeconds, $bucketSeconds])
->cursor();
foreach ($rows as $row) {
$buckets[(int) $row->bucket][] = (int) $row->response_time;
}
```
Plain integers, bucket computed in SQL, no model and no Carbon instance per row. Each section of that page now runs within a few megabytes of baseline. The general lesson is that anything on a page that scales with regions times checks has to stream, and `toBase()->cursor()` is the cheapest way to get there.
### Health queries that multiplied by region
The dashboard has a strip showing the health of every region. It was computed on the request, with one query per region and one Redis read per monitor per region. At four regions nobody noticed. By late October the dashboard request took 4.6 seconds, 2.8 of them in SQL.
The strip is now computed once a minute by the job that already broadcasts it, and cached, so a page request only reads it. The computation is one grouped query and one pipelined Redis pass, whatever the region count. The same pass found an index that ended in the wrong column for the query using it, which is the sort of thing a slow page is good for.
### nginx's body limit
Sydney's node stopped posting half an hour after it went live, while its sync calls stayed healthy. Its spool kept climbing. The node's journal said 413 on every post. The server tooling in front of the app had set `client_max_body_size` to 2 MB, and a batch with a couple of captured bodies in it was 4 MB. The limit went to 16 MB, and the probe learned to halve its batch on a 413 down to a single result, then drop that one with a log line rather than retry it forever. Head-of-line blocking on a retry loop is a quiet way to lose a region.
## What came next wasn't on my list
The first draft of this post ended with a prediction. Every node was reading zero pending batches, the probe-ingest supervisor was idle, and I guessed the next limit would be the hourly response time aggregator, which re-rolls 36 hours of data every run.
The next two problems arrived within a week, and neither was about throughput.
On November 7 the Seoul node lost its network for fourteen hours. The probe did what it was built to do. It kept checking from its cached manifest, failed every check at DNS, spooled the results and replayed all of them when the link came back. The control plane did what it was built to do as well. It acknowledged every batch and recorded every result. No incident opened and nobody was alerted, because no other region agreed. But every monitor's Seoul history now held fourteen hours of failures that never happened.
Ack-first had made the control plane very good at not losing data, and nothing in it asked whether the data was true. One result can't tell a broken domain from a node with a dead resolver. A batch can. A batch that arrives long after its checks ran, and is almost entirely network failures across unrelated hosts, is describing the node. The drain now drops those failures and logs that it did. A live node reporting a real outage uploads within seconds, so it's always recorded.
Two days later the path through Cloudflare from the far regions slowed to a crawl. My server sat idle while uploads waited. A 1 MB post from Johannesburg took 53.5 seconds through Cloudflare and 2.2 seconds straight to the server. Results piled up on healthy nodes for over an hour, and the number I watch was reporting on a network I don't run. Probes now post results to a hostname that skips the proxy and serves nothing but the probe API, and they fall back to the main one if it fails. The sync response tells each node where to post in a header, not a manifest field, so changing it never moves the ETag.
So I've stopped predicting the next limit. The number I watch is still pending results per node. When it stops reading zero on a quiet day, something between the probe and the database is behind, and most of that distance is Laravel.
I don't think any of this is remarkable code. A queued job with a per-key lock, a cache counter as a version stamp, a file instead of a column, a cursor instead of a collection. What changed is that the probes stopped hiding the cost of the control plane behind their own cost. When each region was a 16 GB server running 60 workers, Laravel's share of the work was spread across the fleet and nothing on the primary was ever the bottleneck. Fifteen tiny nodes talking to one app moved all of it into one place, and that place had to get a bit more disciplined.
It did, and it's still Laravel.
---
# I Replaced 50+ PHP Workers With One Go Process
URL: https://sentinel.rootstuff.io/blog/laravel-edge-workers-to-go-probes
Published: 2026-10-18
Category: Infrastructure
Sentinel still runs on Laravel. I just stopped running Laravel in every monitoring region.
Until recently, each region was basically another copy of the application: Laravel, Horizon, Redis, nginx, PHP-FPM, supervisord and a pool of 50 to 60-something workers on a 16 GB server, using around 4 GB of RAM. The same region now runs as one Go process using 30 to 50 MB on a 1 GB box, and it holds a tighter cadence than the PHP fleet ever did.
The old setup worked, and after a lot of tuning it worked pretty well. But I wanted Sentinel [checking from a lot more regions around the world](/multi-region-monitoring), and duplicating that setup for every new region wasn't going to make much sense.
So I started looking at alternatives.
The fifteen regions today, all on the Go probe. Six of them existed when I started this. Nine were added in the two days after the last PHP edge was retired.
## The old setup
A monitoring region has a fairly simple job. It gets its monitors, runs their checks on schedule and reports what happened. The infrastructure I was using to do that wasn't nearly as simple. Each region ran on a 4 vCPU, 16 GB server with the full Laravel stack and somewhere around 50 to 60 Horizon workers. The boxes generally used around 4 GB of RAM.
The harder problem was keeping a tight cadence. A network check spends most of its time waiting on DNS, a connection, TLS, the response itself or eventually a timeout. With Horizon, a check that's waiting is still occupying a worker. I spent quite a bit of time tuning worker counts, queues, timeouts and scheduling to get the PHP nodes to reliably stay near a [30-second cadence](/uptime-monitoring). Even then, I'd occasionally see checks drift into the 40s under load.
That was manageable with a few regions. It was less appealing when I started thinking about putting Sentinel in a lot more of them.
## Why I went with Go
I started looking at other ways to run the probes, and both Go and Rust were on the list. I ended up going with Go for a few reasons, but one of the more important ones was something specific to monitoring: the TLS fingerprint.
The existing PHP edges presented an OpenSSL-shaped ClientHello. If I replaced them with probes that suddenly looked like a completely different client to Cloudflare, Akamai and other WAFs, the results wouldn't really be equivalent anymore. Go has uTLS, which let me preserve that behavior. That matters when the whole point is to change the implementation without changing what the target sees.
Go's concurrency model also fits this workload really well. Hundreds of checks in flight can be hundreds of goroutines behind a semaphore. Rust and Tokio could certainly handle it, but I didn't need the extra complexity for a relatively small amount of networking code. Go's standard library covered most of what I needed, cross-compilation was straightforward, and deployment is a single binary. The first working node went from an empty repo to checking real monitors in an afternoon.
Rust might have produced a somewhat smaller binary or shaved off a little more memory, but neither matters here. The Go process is already tiny and barely touches the CPU. That's not where the next bottleneck is going to be.
## Go measures. Laravel decides.
The most important architectural decision was how much responsibility to give the probe. Sentinel already handles HTTP, SSL, DNS, domain, ping and port checks, along with redirects, custom headers, authentication, [keyword checks](/keyword-monitoring), [JSON assertions](/api-monitoring) and some more specialized checks. I didn't want to maintain a second implementation of all the logic that decides whether a monitor is healthy.
So the probe doesn't decide that. It performs the network operation and sends its observations back to Laravel. For an HTTP check, that can include the status code, DNS time, connection time, TLS time, TTFB and the response body when it's needed.
One monitor from six regions, captured while both architectures were live. The probe reports the phases, Laravel judges them. London, Chicago and Singapore checked on the same second. The three PHP edges are spread over thirteen.
Laravel still handles accepted status codes, keyword and JSON assertions, [certificate expiration](/ssl-certificate-monitoring), [confirmation and recovery logic](/how-sentinel-confirms-outages), [regional consensus](/blog/global-uptime-monitoring), incidents and notifications.
That split worked particularly well because Sentinel already separated performing a check from recording its result. Probe results go through the same path. Trimmed to two of the check types, the recorder looks like this:
```php
class ProbeResultRecorder
{
public function __construct(
private readonly RedisResponseTimeService $redis
) {}
public function record(
Monitor $monitor,
string $region,
array $result,
CarbonInterface $checkedAt,
?RegionTimestampBatch $timestampBatch = null
): void {
(new MonitorCheck($monitor, $region))
->replay($result, $checkedAt, $this->redis, $timestampBatch);
}
public function recordSsl(
Monitor $monitor,
string $region,
array $facts
): void {
(new SSLMonitor($monitor, $region))->replay($facts);
}
}
```
That kept the Go side relatively small and gave me a straightforward way to test it. I can run the PHP and Go implementations against the same targets and compare what they observed, while PHP remains the reference for what those observations actually mean.
## How the probes get their work
Each probe authenticates with the control plane and periodically fetches a manifest. A trimmed HTTP monitor looks something like this:
```json
{
"id": 2481,
"type": "http",
"url": "https://api.acme.dev",
"interval_seconds": 30,
"timeout": 30,
"method": "GET",
"needs_body": false
}
```
The manifest comes from the same eligibility rules the existing dispatcher uses. If a monitor is paused, it disappears from the manifest. The same happens when an account is suspended or the regional configuration changes. The manifest uses an ETag, so most syncs are just a 304 rather than rebuilding and transferring the same data every time.
Results go back to the control plane in batches. If a probe can't reach it, the results are written to disk and sent later with their original timestamps. Probe releases are independent from Laravel releases as well. Each region is pinned to a probe version and the node periodically checks whether it should update, so deploying the main application no longer means restarting monitoring workers in every region.
## The numbers
I've been able to run both architectures side by side, which made the difference pretty easy to measure.
| | PHP edge | Go probe |
|---|---:|---:|
| Server | 4 vCPU / 16 GB | 1 vCPU / 1 GB |
| Processes | 50-66 Horizon workers, plus the rest of the stack | 1 |
| RAM in use | ~3.9-4.9 GB | ~30-50 MB |
| 30s cadence | Can drift under load | Usually 30-31s |
The memory numbers make for a nice headline, but 16 GB versus 1 GB isn't really a fair comparison. The PHP servers are overprovisioned and could run on less. What I find more interesting is the cadence.
Getting the PHP workers to stay as close as they did to 30 seconds took a lot of work. The Go probes hold 30 to 31 seconds on much smaller machines without much effort, and there's still plenty of headroom. They're now running a 15-second tier as well, which shipped the day the last PHP edge was retired, after a day of soaking on every region. CPU and memory aren't close to being the limiting factors.
That's important because saving RAM wasn't really the goal. I wanted to add more regions and run more checks without having the infrastructure grow at the same rate.
## Adding a region is a lot simpler now
With the old architecture, another monitoring location meant another Laravel stack and another worker fleet. Now it's one small binary on a small server. There's no application database at the edge and no Horizon cluster to manage. The probe gets its manifest, runs its checks and reports the results.
That changes the economics of expanding the network quite a bit. I can add geographic coverage without duplicating the application infrastructure every time, and there's enough headroom to tighten check intervals without solving that problem by throwing more PHP workers at it.
For Sentinel, that's the real benefit of the change. I wanted more regions, and the regional infrastructure was going to become increasingly expensive and cumbersome as I added them. The probes made that expansion much simpler. The last PHP edge was retired on the 19th of October. Two days later the network had gone from six regions to fifteen, on six continents.
## A few things went wrong
IPv6 got me early. One SSL check was dialing by hostname and Go selected IPv6, while the HTTP path on the same node was using a pinned IPv4 address. A Cloudflare-fronted site behaved differently between the two paths and produced a false SSL incident. Every check type on a node now uses the same pinned address.
Cloudflare caused another problem when I brought up a new region. [SentinelBot is verified](/blog/sentinelbot-cloudflare-verified-bot) and [publishes its monitoring IPs](/bot), but a new address isn't necessarily recognized immediately. The probe started getting 403s from sites using managed challenges until Cloudflare caught up. New IPs now get staged before a region goes live.
More regions also means more load on the sites being checked. Fifteen regions at 15 seconds is a request a second on the target. A small WordPress server I monitor had its PHP pool filled the moment a plugin update slowed its renders, and the monitor that should have told me about the outage was part of the cause. The monitor form now shows the requests per minute a configuration will send, and warns past thirty.
The other thing I'm watching is the control plane. Making the probes much lighter means the regional nodes aren't the obvious scaling constraint anymore. Laravel still has to ingest and process every observation they send back. I've already cut some unnecessary work from that path, and the day after I wrote this I separated acknowledgement from replay: a probe's batch is acknowledged once it's stored, and a queue job replays it, so receiving a batch is no longer tied to processing every result during the same HTTP request.
At this point, the next limit is much more likely to be the control plane than the probes.
## Where it ended up
The existing regions moved over one at a time, and all of them are on the probe now. Laravel isn't going anywhere. It still owns the application, accounts, monitor configuration, [multi-region consensus](/multi-region-monitoring), incidents, notifications and the logic that determines whether something is actually down. Go handles the part that spends most of its life waiting on the network.
The result is a much smaller regional footprint, tighter scheduling and a lot more room to expand the monitoring network. I went looking for a better way to run the edges, and a single Go process turned out to fit that job a lot better than a fleet of PHP workers.
---
# Best Uptime Monitoring for Agencies in 2026
URL: https://sentinel.rootstuff.io/blog/best-uptime-monitoring-for-agencies
Published: 2026-09-30
Category: Monitoring
Disclosure first. I run Sentinel, and it's ranked first below. To keep the ranking honest, every tool gets the same numbers next to it: what it costs for 100 monitors on monthly billing, how many places it checks from, and what it leaves out. Judge by those, not by who wrote this. Prices were read from each vendor's pricing page on September 30, 2026 and will drift; check before you buy.
## At a glance
- **Best overall for agencies: Sentinel.** Every check verified from fifteen regions before it alerts, all check types on the free plan, groups as clients, no seat fees on Business. $29 a month for 100 monitors.
- **Biggest free tier: UptimeRobot.** 50 monitors at five-minute checks for nothing. Paid plans add seat fees.
- **Cheapest paid plan: Notifier.** $19 a month for 100 monitors at 30-second checks. Single-location checks by default.
- **Best for incident workflows: Better Stack.** Monitoring, on-call and incident management in one tool. Status pages get expensive at agency scale.
- **Per-site agency pricing: Oh Dear.** Unlimited users on every plan, priced per site. $165 a month for 50 sites.
- **Best self-hosted: Uptime Kuma.** Free and good, and now your monitoring runs on a box you maintain.
## What an agency actually needs from monitoring
Monitoring one site is easy. Monitoring 40 client sites for money is a different product, and most "best uptime tools" lists are written for the first case. Here's what the second one requires.
- **Two to five monitors per site.** Homepage, login or checkout, the SSL certificate, the domain's expiry date, maybe a keyword on the page that proves the CMS rendered. A 50-client roster is 100 to 250 monitors, so price every tool at that scale, not at ten.
- **A status page per client**, ideally on the client's own domain. It cuts "is the site down?" emails and it's a deliverable you can point to in the retainer.
- **Seats that don't cost extra.** Your project manager, your developer and your support person all need to see the dashboard. Per-seat pricing turns a $39 plan into a $96 plan.
- **Alert routing per client.** The client's Slack channel, the account manager's phone, your on-call rotation. One firehose to one inbox doesn't survive 40 clients.
- **Reports you can put your name on.** A monthly uptime report with your logo is how monitoring stops being an invisible cost and starts justifying the maintenance fee.
- **More than uptime.** Expired certificates and lapsed domains cause more client emergencies than servers falling over, and neither one shows up on a plain HTTP check.
- **Checks verified from more than one place.** A monitor that checks from a single location will page you at 3am about a routing hiccup between one datacenter and one host. When you're monitoring other people's sites, false alerts don't just cost sleep; they cost credibility with the client you woke up.
That last point is the one most lists skip, and it's the reason the first-place tool below is the one it is.
## The six tools, ranked
### 1. Sentinel (best overall for agencies)
**Sentinel is the only tool on this list that checks every monitor from fifteen regions and alerts only when they agree.** Fifteen cities on six continents, every check, every plan, including free. The practical effect is that an alert from Sentinel means the site is down, not that one probe had a bad route.
Pricing is flat. Free is 10 monitors at five-minute checks with every check type except heartbeat and cron included: uptime, SSL expiry, DNS changes, domain expiry, ping, port, keyword and JSON. Client work is explicitly allowed. Starter is $14 a month for 25 monitors at one-minute checks and five status pages. Pro is $29 for 100 monitors, 10 status pages on your own domains and five team seats. The API, CLI, Terraform provider and MCP server are read and write on every plan, Free included. Business is $79 for 300 monitors at 30-second checks, unlimited seats, unlimited status pages, white-label monthly reports, and PagerDuty.
The agency features are built in rather than bolted on. Monitors live in groups, and a group is a client: it carries its own alert routing, its own status page, its own report. Alerts go to email, Slack (an official Marketplace app, not a pasted webhook), Discord, Microsoft Teams, Telegram, PagerDuty and webhooks. Deploys from GitHub are drawn on the response-time charts so you can see which release broke what.
What's missing: the free tier is 10 monitors, not 50, so it's a trial-sized tier rather than a place to park a client roster. Thirty-second checks and white-label reports sit on the $79 plan; at $29 you get one-minute checks and Sentinel's name on the report footer. There's no phone-call alerting.
**Pick it if** you're responsible for other people's sites and you want alerts you don't have to second-guess. [Start free](/register) and move ten client sites over to see how it feels.
### 2. UptimeRobot (biggest free tier)
**UptimeRobot's free plan is still the most generous in the category, and its paid plans are where the agency math turns against you.** Free is 50 monitors at five-minute checks with one status page. That's enough to monitor a small roster without paying anything, which is why so many agencies have.
Two things to know before you build on it. First, the free plan spent most of the past year under in-app "non-commercial use only" compliance notices. UptimeRobot rewrote its terms in May 2026 to allow any use, then replaced the ban with a fair-use policy whose stated remedy for an account review is moving to the plan that matches your usage. I wrote up [the whole sequence](/blog/uptimerobot-free-plan-commercial-use). Second, the paid plans [price seats separately](/sentinel-vs-uptimerobot). Team is $46 a month for 100 monitors at 30-second checks with three seats included and $19 for each seat after that. A five-person agency is $84 before the annual discount.
Checks run from one location per check, rotating, and re-checks come from that same location. Solo is $13 a month for 10 monitors at one-minute checks.
**Pick it if** your roster fits in 50 monitors and you're comfortable that the free plan's terms have already moved once.
### 3. Notifier (cheapest paid plan)
**Notifier's Team plan is $19 a month for 100 monitors at 30-second checks, which makes it the cheapest paid option here by a wide margin.** Three seats and 50 status pages are included, custom domains for status pages start on the $4 Solo plan, and the free tier is 10 monitors at five-minute checks with commercial use allowed. It's bootstrapped and run by one founder, and by its own account has been monitoring since 2018.
The gap is verification. Notifier's own guide on multi-location monitoring says the feature is "currently in beta and available to all Notifier users on request," and doesn't say how many locations that involves. By default your monitors are checked from one place, and a single-location check is the kind that pages you about problems the client's visitors never saw. There's no documented white-label option for status pages or reports.
**Pick it if** price per monitor is the deciding factor and you'll accept occasional false alerts as the cost.
### 4. Better Stack (incident workflows)
**Better Stack is the tool to choose when you want on-call schedules and incident management in the same place as the monitors.** Uptime monitoring, an alerting and escalation layer, incident timelines and log management share one account, and the monitoring side is solid: checks as often as every 30 seconds, keyword and TCP checks, multi-location verification.
Pricing is modular, and modular pricing bites at agency scale. The free plan is 10 monitors and one status page. Monitors are then sold in blocks of 50 for $25 a month each, so 100 monitors is roughly $50. Additional status pages are $15 a month each; a status page per client for 30 clients is $435 a month before you've bought a monitor.
**Pick it if** your agency runs a real on-call rotation and wants incidents managed where the alerts are born. Skip it if the deliverable is a status page per client.
### 5. Oh Dear (per-site agency pricing)
**Oh Dear prices by site rather than by monitor, and every plan includes unlimited users.** Each site gets uptime, certificate, broken-link, mixed-content, DNS, scheduled-task and performance checks in one bundle, plus a status page with subscriber notifications. It's built by a small team in Belgium that's been at it for years, and the product is polished.
The price is the conversation. The Agency plan is $165 a month for 50 sites, Studio is $109 for 25, and Freelance is $55 for 10. There's a 10-day trial and no free plan. Checks come from one primary location with a second location verifying a failure before it alerts, which is better than single-location and less than four.
**Pick it if** you'd rather pay per site and get every check type per site without configuring monitors individually, and $3 a site fits inside the retainer.
### 6. Uptime Kuma (self-hosted)
**Uptime Kuma is free, open source, genuinely good, and it turns your monitoring into a server you're responsible for.** Docker up, add monitors, connect Slack or Telegram, done. There's no per-monitor cost, no seat fee, no vendor terms to reread.
The trade is that it checks from wherever you host it, and when that box has a bad day (a full disk, a kernel update, a host outage), your monitoring goes down with it and nothing tells you. For personal projects, fine. For paying clients, be honest with yourself about whether you want alerting to be a hobby-grade responsibility. If you go this route, put an external heartbeat on the Kuma instance itself so something watches the watcher.
**Pick it if** you have the ops habit already and the budget is zero.
## Comparison table
| Tool | 100 monitors (monthly) | Interval | Locations per check | Seats | Status pages | Client work on free |
|---|---|---|---|---|---|---|
| Sentinel | $29 Pro | 30s (15s on Business) | 15, consensus | 5 (Business: unlimited) | 10 (Business: unlimited) | Yes |
| UptimeRobot | $46 Team | 30s | 1, rotating | 3, then $19 each | 100 | Yes, fair-use policy |
| Notifier | $19 Team | 30s | 1 (multi-location in beta) | 3 | 50 | Yes |
| Better Stack | ~$50 | 30s | Multiple | Not per seat | 1, then $15 each | Yes |
| Oh Dear | $165 for 50 sites | Not listed | 1 + 1 verify | Unlimited | Per site | No free plan |
| Uptime Kuma | $0 + a server | Any | Your server | Unlimited | Yes | Self-hosted |
## Cost per client site
Take a 50-client agency with two monitors per site, 100 monitors total, on monthly billing.
| Tool | Monthly | Per client site |
|---|---|---|
| Notifier Team | $19 | $0.38 |
| Sentinel Pro | $29 | $0.58 |
| UptimeRobot Team | $46 | $0.92 |
| Better Stack | ~$50 | ~$1.00 |
| Oh Dear Agency | $165 | $3.30 |
| Uptime Kuma | $0 + hosting | Your time |
Sentinel is second cheapest, not cheapest. The ten dollars between Notifier and Sentinel buys fifteen-region verification on every check, all check types, and five seats. Whether that's worth 20 cents a client a month depends on how much a false alert costs you; for most agencies it's one annoyed client email, which is more than 20 cents.
## Setting it up in an afternoon
Whatever you pick, the shape is the same. Here's the Sentinel version.
1. **Make a group per client.** Name it what you call them on the invoice.
2. **Add the monitors.** Homepage, the page that makes money, SSL and domain expiry. Four monitors per client covers most of what actually breaks.
3. **Route the alerts.** Point the group at the client's Slack channel or the account manager's Telegram, and your own on-call at the top level. Nothing goes to a shared inbox nobody watches.
4. **Publish a status page per client.** On their subdomain if they'll give you a CNAME, on yours if they won't.
5. **Send the report.** On Business, a white-label monthly uptime report goes out automatically. Attach it to the invoice and monitoring stops being invisible.
## Frequently asked questions
**How many monitors does a client site need?**
Two is the floor (homepage and SSL). Four is typical (add domain expiry and the login or checkout page). Sites with a JSON API or a cron job that matters get one more each. Budget on four per client and you'll rarely be wrong.
**Can I use UptimeRobot's free plan for client sites?**
On paper, yes, since May 2026. In practice the free plan ran under non-commercial compliance notices for most of a year, and the fair-use policy that replaced them resolves account reviews by moving you to a paid plan. [Here's the full story.](/blog/uptimerobot-free-plan-commercial-use) Sentinel's free plan has no such history: client work is allowed, and it says so.
**Should monitoring be a line item in the retainer?**
Yes, and price it at what it's worth rather than what it costs you. At $0.58 a site your cost is invisible; the value to the client is knowing before their customers do. A $10 to $25 monthly line item is normal, and the status page and report are what make it feel real.
**Do I need 30-second checks for client sites?**
Usually not. A one-minute check catches an outage within a minute and re-verifies before alerting. Thirty seconds matters for checkout flows and APIs where every minute is revenue; for a marketing site it's a nicer number, not a different outcome.
**Why do I get alerts when the site is fine?**
Because the tool checks from one place and that place had a bad route. It's the most common complaint about single-location monitors and the reason Sentinel checks from fifteen regions and [needs agreement before it pages you](/how-sentinel-confirms-outages).
**How do I offboard a client?**
Pause the group, keep it a month in case they come back, then delete it. On Sentinel, deleting the group removes the monitors, the status page and the routing in one step, and the seat count doesn't change because nobody's paying per seat.
## Where to start
If you're a freelancer or small agency with a roster you're accountable for, [start on Sentinel's free plan](/register), put your ten most important client sites on it, and see whether the alerts you get are ones you'd have wanted. If you're already on UptimeRobot's free plan, read the fair-use policy before your next client signs. And if you'd rather self-host, run Kuma and put a heartbeat on it.
The tool matters less than the habit. Every client site monitored from more than one place, a status page they can see, and a report with your name on it. Pick whichever one lets you do that at a price you can write into the retainer.
---
# Uptime Alerts in Telegram, Connected With One Link
URL: https://sentinel.rootstuff.io/blog/telegram-uptime-alerts
Published: 2026-09-23
Category: Product
Sentinel now sends alerts to Telegram. Add a chat from your team's Integrations page, open the link it gives you, tap Start, and the Sentinel bot is connected. That's the whole setup. No bot to create, no token to paste, no chat ID to look up.
It's free on every plan, including the free one.
## Why Telegram
A lot of the people who run websites for a living don't live in Slack. Freelancers, small agencies, solo founders, and most of the world outside North America talk in Telegram. It's on the phone, it's fast, and it doesn't need a workspace or a seat. When a client's site goes down at 11pm, a Telegram message is the thing that actually gets read.
Until now those people had email, or Discord if they happened to use it. Now the alert can land where they already are.
## What you get
Every alert Sentinel sends to Slack, it now sends to Telegram in the same words: a site going down and coming back, a keyword or JSON check failing, a port that stopped answering, a heartbeat that went quiet, a certificate about to expire, a domain about to lapse, a DNS record that changed, a page that got slow. Each message names the monitor, says which region caught it and why, and links to the monitor and the incident in Sentinel.
Each connected chat picks its own severities. An ops group can take everything. A client's channel can get outages and recoveries and nothing else. And every monitor's own notification routing has a Telegram row, so a staging site can stay out of Telegram entirely.
## How it connects
Sentinel runs one bot for everyone, called [@SentinelByRootstuffBot](https://t.me/SentinelByRootstuffBot). You never touch BotFather.
For direct messages: add a chat in Sentinel, give it a name, open the link, tap Start. The row flips to connected within a few seconds.
For a group or channel: add the bot to it, then send the one-line connect command shown on the row. The bot confirms in the chat.
If someone later removes the bot from a group, Telegram tells Sentinel and the chat pauses itself. You'll see it on the Integrations page next to when each chat last received a message. Add the bot back, press Test, and it resumes. Nothing fails silently.
## Groups, channels, or your phone
Three ways people are already using it:
- A team group where everyone sees every alert, with the incident link one tap away
- An announcements channel for a client, where only outages and recoveries appear and the bot posts as an administrator
- Direct messages to one phone, for the person who wants to know first
Any team can connect several chats, each with its own settings.
## What's next
The channel does the same job Slack does today: alerts in, links out. The obvious next step is doing things from the chat, like acknowledging an incident or asking for a status summary without opening the dashboard. If that would matter to you, tell me.
In the meantime, [connect a chat](/docs/telegram) and let the next outage find you where you already are.
---
# Telegram Alerts in Laravel Without a toTelegram() on Every Notification
URL: https://sentinel.rootstuff.io/blog/laravel-telegram-notification-channel
Published: 2026-09-23
Category: Infrastructure
Sentinel started sending alerts to Telegram this week. It took an afternoon, and most of that was the connect flow, not the messages. The messages were nearly free, because the channel reuses the Slack representation every notification already had. Here's the shape of it, with the code, so you can do the same in your own Laravel app.
## The problem
Sentinel has about a dozen notification classes: a monitor went down, a certificate is expiring, a heartbeat went quiet, a keyword check failed. Each one already implements `toMail()`, `toSlack()`, `toArray()` and a few more. Adding a channel the obvious way means a `toTelegram()` on every one of them, and then keeping thirteen copies of the same wording in sync forever.
The conventional route is the community package from Laravel Notification Channels, which adds a Telegram channel and expects a `toTelegram()` on each notification. It works, and it's the right pick if Telegram is your only chat channel. The framework itself ships only mail, database, broadcast and Slack; `toSlack()` is the method Laravel's own Slack channel calls, which is why every notification here already had one.
I'd already avoided the per-channel method once. Discord in Sentinel doesn't have a `toDiscord()` anywhere. The Discord channel takes the notification's `toSlack()` result, a `SlackMessage` with a headline, attachments, fields and a colour, and turns it into Discord embeds. Telegram does the same thing with HTML.
## One channel, no new methods
Register the channel in a service provider:
```php
Notification::extend('telegram', fn ($app) => new TelegramChannel);
```
The channel asks the notifiable where to send, asks the notification for its Slack message, renders it, and posts it to the Bot API:
```php
class TelegramChannel
{
public function send(mixed $notifiable, Notification $notification): void
{
$config = $notifiable->routeNotificationFor('telegram', $notification);
if (! is_array($config) || empty($config['chat_id'])) {
return;
}
if (! method_exists($notification, 'toSlack')) {
return;
}
$message = $notification->toSlack($notifiable);
if (! $message instanceof SlackMessage) {
return;
}
$this->deliver($config, $this->slackMessageToHtml($message));
}
public function deliver(array $config, string $text): array
{
$response = Http::timeout(10)->asJson()->post(
'https://api.telegram.org/bot'.config('services.telegram.bot_token').'/sendMessage',
[
'chat_id' => $config['chat_id'],
'text' => $text,
'parse_mode' => 'HTML',
'disable_web_page_preview' => true,
],
);
$succeeded = $response->successful() && $response->json('ok') === true;
if (! empty($config['telegram_chat_id'])) {
TelegramChat::find($config['telegram_chat_id'])?->recordOutcome($succeeded, $response->status());
}
return ['succeeded' => $succeeded, 'status' => $response->status(), 'error' => $response->json('description')];
}
}
```
`deliver()` is public on purpose. The integrations page has a Test button, and it wants the answer synchronously so a chat the bot was kicked out of shows up as an error right there rather than during an outage.
The `SlackMessage` here is the classic `Illuminate\Notifications\Messages\SlackMessage`, the one with `->attachment()` and `->fields()`. If you're on the newer block-kit builder, the translation step is different, but the idea holds.
## Rendering it safely
Telegram's HTML mode is strict. It accepts a handful of tags and rejects the whole message if anything else appears, and a monitor's friendly name is user input. So the converter escapes everything first and only then adds the tags it means to add:
```php
protected function convertMarkdown(string $text): string
{
$text = $this->emoji(trim($text));
$links = [];
$text = preg_replace_callback('/<(https?:[^|>]+)\|([^>]+)>/', function ($m) use (&$links) {
$links[] = ''.$this->escape($m[2]).'';
return "\0".(count($links) - 1)."\0";
}, $text);
$text = $this->escape($text);
$text = preg_replace('/(?$1', $text);
return preg_replace_callback("/\0(\d+)\0/", fn ($m) => $links[(int) $m[1]], $text);
}
```
Slack's `` links get pulled out into placeholders before escaping and put back after, so the anchor survives and the label doesn't. Slack's `*bold*` becomes ``. And Slack emoji shortcodes like `:x:` and `:warning:` get mapped to the actual characters, because Telegram shows shortcodes as literal text. The first message I sent started with `:x: OFFLINE`, which is how I found that one.
A test pins the escaping:
```php
$message = (new SlackMessage)->attachment(function ($attachment) {
$attachment->title(' Storefront', 'https://sentinel.test/m/1');
});
expect((new TelegramChannel)->slackMessageToHtml($message))
->toContain('<script>')
->not->toContain('