@daemonitor/plugins 1.1.14 → 1.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -245,6 +245,7 @@ async function collectDevice(t) {
245
245
  portsUp,
246
246
  portsTotal,
247
247
  cpuPct,
248
+ cpuCores: procLoads.length || undefined, // for load-per-core normalization
248
249
  load1: load1n,
249
250
  loadavg: loadavg.length ? loadavg : undefined,
250
251
  memPct,
@@ -89,6 +89,25 @@ export function createWebsitePlugin() {
89
89
  const start = Date.now();
90
90
  const label = ep.name || ep.url;
91
91
  const uid = `web-${(ep.name || ep.url).replace(/[^a-zA-Z0-9_.-]+/g, "-")}`;
92
+ // Origin-only monitor: skip the public tier (unreachable behind a CDN bot
93
+ // challenge) and report the direct origin check as the endpoint's health.
94
+ if (ep.originOnly && ep.origin?.url) {
95
+ const o = await checkOrigin(ep);
96
+ await plugin.send({
97
+ name: label,
98
+ url: ep.url || o.url,
99
+ status: o.status,
100
+ duration: o.duration,
101
+ ok: o.ok,
102
+ originOnly: true,
103
+ hasAllExpectedStrings: o.hasAllExpectedStrings,
104
+ hasAnyUnexpectedStrings: o.hasAnyUnexpectedStrings,
105
+ missingExpected: o.missingExpected,
106
+ matchedUnexpected: o.matchedUnexpected,
107
+ error: o.error,
108
+ }, uid);
109
+ return;
110
+ }
92
111
  let publicResult;
93
112
  try {
94
113
  const ctrl = new AbortController();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@daemonitor/plugins",
3
- "version": "1.1.14",
3
+ "version": "1.1.15",
4
4
  "description": "daemonitor plugins",
5
5
  "types": "types/index.d.ts",
6
6
  "main": "dist/index.js",