From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id cPUJItiBSmb8nwAAqHPOHw:P1 (envelope-from ) for ; Mon, 20 May 2024 00:48:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id cPUJItiBSmb8nwAAqHPOHw (envelope-from ) for ; Mon, 20 May 2024 00:48:56 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=ymail.com header.s=s2048 header.b=OCIvju+v; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1716158936; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=QlBhH1WBzcQDNoZn0qDyZIFOKJlIyGhQqBKNEO2+1hM=; b=ePD04o43n+6XVvb2aoqQNg38dAi7Zwvbx/VGBO2GLydYrQYLAvr3CnohlAoohwuL9jP9AV YUhZDcjSvnQV2mZpmIvZh4MK2dji5OKpzFaIyGLcdLWKXVQznFgaPDXY3StlTqGMhhFpEL FlXeW/dCZT9PxrI7GyFI4CVLlOBRuj5vE9D15t+QZASdycQ5YTpGg302nOuldO6tGUMCd+ YhFgBsZ9r6w9Gfl0t7Aqxtr0mq5zH1WuLZkJ9ft+96BwUfvX8YN4VWkxuEOiE6p7verT/C TDOUdf5TB5onRJqQc9aDYnOoikpv8n/m3KrCCE9D4n/VUZSJTJ47cLxRqVkkew== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1716158936; a=rsa-sha256; cv=none; b=tiyIFN2z4JBNLaLOpxlf2rxLEPsNHurY3sx271ZlPEIuM4OiQVASXrz5Ggh3ELy+HkxYgq O6NFJT1R0qBoAcgF7e8E5uJVVcMakfdHSMp4du7dTQ+mySkup6KL5H9iN0Oy5VyQbjAXnC AY1x/BeiZK38mnQ7vFPaJ9wd8NQsbsiqbCESHvhpJCIHY21m6KGHIEg3XVjy4xpnUI2ju5 QRXEmuilGIhP2IjNde8/9BWFTeAbP5C2GdZHH86uP6yQ5f9NAWH6fXK/f+D4kh+UOE9Kwy VSCY4bwuKxtFRKBr5I2fF+VZPPE0uvLe5DbMks7HmVKbNpx1N5Zd7fc0joNwvA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=ymail.com header.s=s2048 header.b=OCIvju+v; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D2737647B4 for ; Mon, 20 May 2024 00:48:55 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s8pKQ-0006uD-5d; Sun, 19 May 2024 18:48:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s8pKM-0006tw-SI for help-guix@gnu.org; Sun, 19 May 2024 18:48:27 -0400 Received: from sonic312-26.consmr.mail.ir2.yahoo.com ([77.238.178.97]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s8pKK-00072I-L1 for help-guix@gnu.org; Sun, 19 May 2024 18:48:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ymail.com; s=s2048; t=1716158899; bh=Fjq61zamhcg0pnFFiSe4F4Bqlp8ZEUliY4TIdf2PWSM=; h=Date:From:To:Subject:References:From:Subject:Reply-To; b=OCIvju+vEsnT+hirbvKnPerK5Wow9VHE4Eo++9Tpvfyu0Ua2oZPdLYNMJN9fsbBDBKrYl/Fqn6FCc4xBDlyNedg7Bp4qn3pM0LsYfVT/ZdkY1NNzR5ACaOYVxCmjj0MqUaBSgSDalKs/lqlZxETf94ufnvETYR74dPnBwbyL6V3EVKtT3O1NgKxKPzFanfPP9v+DTk+i1DndsQbfQv5H8ydno3ziPs4Ss/ng3IC8lDwpBBlBT9OvKTejK8FEjU2BaaNrY49zU7kZ9kP3pP1Pue/6e3OwdIPad2CBiDy59iZnzquFzf70/Wjwi1biHu9mLMGyZLwTT6mpT7cVWEL4Wg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1716158899; bh=I2IG73c6DMkHa2KPrbzlFfLEV7u4Ry/0iwSZcGtNIFM=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=iMBrunm8QZTnVVpViZJskrzxA4/c7ej+vhMEGYsgjrXucgL2daWBovJoi0gIZ59krruXIuqW2shBfdKkLVanBhWyp3u4m8udyL4DltE5c1VASNU2Ywknd8lk/j697cwSBMgY30zIjr1oiYPs3a3QU+iYYGLokK/OyHWwdTy0UNlcQ4GxxZGFv4jmSgoluAUm56s2ys02OU5JqrOcaYSfHEWQGa+y9U+zYin9VIu+Slr2YJYULEGLw3q1/ISa8j8qUFPmJ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j8.EaClD1hW49gfmHwoKmLUZrgRDJ59iDkNF1bk28.CTnyGPDp48Zx5mi JeYYCZ_4ALZ.JaH3xSijxBamt5ribeFPHOuz4sL4o_w8Sn6A6gBA3f4VIPXOhB8BN.2htbY5oBQv 4sHE.HAC8Dq92HVcSyWjHmN.JZ9ClTIycj2QT9rHY1XeY3Ct9mmFKTIkLHkp3BNZB_c2AhqWygWT 4cjJEJezNiSdm7VKmCZXKiTr53vzbbn2.AewkOtPtl1tk6hW5 X-Sonic-MF: X-Sonic-ID: 1ff05c09-2714-4d6e-89be-5673a09451e0 Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ir2.yahoo.com with HTTP; Sun, 19 May 2024 22:48:19 +0000 Received: by hermes--production-ir2-7b99fc9bb6-d2l9n (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 7a3932f2dc731583e816bc02eb523d2e; Sun, 19 May 2024 22:48:18 +0000 (UTC) Date: Mon, 20 May 2024 00:48:20 +0200 To: help-guix@gnu.org Subject: How to configure smartd and send notifications? Message-ID: <4D873504-6540-477A-A2DB-DE293395CAFC@ymail.com> MIME-Version: 1.0 References: <4D873504-6540-477A-A2DB-DE293395CAFC.ref@ymail.com> X-Mailer: WebService/1.1.22356 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=77.238.178.97; envelope-from=blobbyjj@ymail.com; helo=sonic312-26.consmr.mail.ir2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Tristan Kohl From: Tristan Kohl via Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -1.36 X-Spam-Score: -1.36 X-Migadu-Queue-Id: D2737647B4 X-Migadu-Scanner: mx11.migadu.com X-TUID: oJbKDnMs7tDV Hello Guix gurus, I have a hard time wrapping my head around how to configure smartd (1) and= send notifications via ntfy=2Esh (2)=2E 1=2E Configuration of smartd I could not find anything in the admin module in the Guix repository on ho= w to configure smartd (i=2Ee=2E smartd-configuration) - there I found only = smartmontools build procedure=2E When checking /var/log/messages I could see that smartd defaults to some c= onfiguration file in the store rather than the default /etc/smartd=2Econf= =2E So I tried to write my own: (define smartd-send-ntfy (plain-file "/usr/local/sbin/send-ntfy" "#!/bin/sh\ncurl ntfy=2Esh/ -d 'curl -Ls -H "Title: $SMARTD_SUBJECT" -d "$SMARTD_FAILTYPE Device: = $SMARTD_DEVICE Time: $SMARTD_TFIRST Message: $SMARTD_FULLMESSAGE"')) (define smartd-config-file (plain-file "smartd=2Econf" "DEVICESCAN -a -s (S/=2E=2E/=2E=2E/=2E/03|L/= =2E=2E/01/=2E/04) -m -M exec /usr/local/sbin/send-ntfy -M test")= ) (services (append (list =2E=2E=2E (simple-service 'smartd-service shepherd-root-service-type (list (shepherd-service (documentation "Monitor disks for failure=2E") (provision '(smartd)) (requirement '(udev user-processes)) (start #~(make-forkexec-constructor (list "/run/current-system/profile/sbin/smartd" "--no-fork" "-c" s= martd-config-file))) (stop #~(make-kill-destructor)))))) %base-services)) This results in a warning "possibly unbound variable `smartd-config-file"= =2E Tried to understand G-expressions and put #$smartd-config-file in there= but I am already overwhelmed with (un)quote so I guess I am missing the po= int here=2E Also how do I get the store path from smartd-notify-send into s= martd-config-file because my naive approach putting the path into plain-fil= e name argument does not work=2E 2=2E Notifications Also I have a bunch of mcron jobs which I also would like to use ntfy=2Esh= to send messages to me=2E How do I append a string to the srcub job passin= g a message to msg? Is this even the right way? (define (notify msg) (string-append "curl ntfy=2Esh/sTu0vFzNZqfMSLJiRAxuTHEUHy8BYWW6 -d '" msg= "'")) (define monthly-srub-job #~(job "0 3 1 * *" "btrfs scrub start -dB /pool" )) Sorry for these beginner questions, I just started diverting from copy-pas= ting config parts from others=2E Thank you!