Merge branch 'master' of git.wrede.ca:andreas/heartbeat
Release / release (push) Successful in 44s

This commit is contained in:
Andreas Wrede
2026-06-06 08:31:26 -04:00
2 changed files with 6 additions and 4 deletions
+3 -1
View File
@@ -140,7 +140,9 @@ def _send_pushover(channel_cfg: dict, notif: Notification) -> bool:
if not token or not user: if not token or not user:
logger.warning("pushover: missing token or user") logger.warning("pushover: missing token or user")
return False return False
params: dict = {"token": token, "user": user, "title": notif.title, "message": notif.body} body = "%s: %s" % (notif.title, notif.body)
title = ""
params: dict = {"token": token, "user": user, "title": title, "message": body}
if channel_cfg.get("sound"): if channel_cfg.get("sound"):
params["sound"] = channel_cfg["sound"] params["sound"] = channel_cfg["sound"]
if notif.url: if notif.url:
+3 -3
View File
@@ -789,7 +789,7 @@ static void plugin_cpu_monitor(conn_t *c, const config_t *cfg) {
* Plugin: memory_monitor * Plugin: memory_monitor
* Linux: /proc/meminfo * Linux: /proc/meminfo
* FreeBSD: sysctl vm.stats.vm.* * FreeBSD: sysctl vm.stats.vm.*
* NetBSD: sysctl vm.uvmexp (struct uvmexp) * NetBSD: sysctl vm.uvmexp (struct uvmexp_sysctl)
* ============================================================ */ * ============================================================ */
/* emit the common kvdict fields and send */ /* emit the common kvdict fields and send */
@@ -896,9 +896,9 @@ static void plugin_memory_monitor(conn_t *c, const config_t *cfg) {
static void plugin_memory_monitor(conn_t *c, const config_t *cfg) { static void plugin_memory_monitor(conn_t *c, const config_t *cfg) {
(void)cfg; (void)cfg;
struct uvmexp uvm; struct uvmexp_sysctl uvm;
size_t len = sizeof(uvm); size_t len = sizeof(uvm);
int mib[2] = {CTL_VM, VM_UVMEXP}; int mib[2] = {CTL_VM, VM_UVMEXP2};
if (sysctl(mib, 2, &uvm, &len, NULL, 0) != 0) return; if (sysctl(mib, 2, &uvm, &len, NULL, 0) != 0) return;
long long ps = uvm.pagesize; long long ps = uvm.pagesize;