Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

agent discover cron job - email every minute #126

Open
casesolved-co-uk opened this issue Sep 5, 2024 · 0 comments
Open

agent discover cron job - email every minute #126

casesolved-co-uk opened this issue Sep 5, 2024 · 0 comments

Comments

@casesolved-co-uk
Copy link

casesolved-co-uk commented Sep 5, 2024

There is a cron job installed as frappe which performs agent discovery every minute:

* * * * * cd /home/frappe/agent && /home/frappe/agent/env/bin/agent discover

This results in an email being sent to the frappe user every minute:

From [email protected]  Sat Aug 24 18:44:03 2024
X-Original-To: frappe
From: [email protected] (Cron Daemon)
To: [email protected]
Subject: Cron <frappe@ip-10-1-2-101> cd /home/frappe/agent && /home/frappe/agent/env/bin/agent discover
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/frappe>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=frappe>
Date: Sat, 24 Aug 2024 18:44:03 +0000 (UTC)

rendering /tmp/agent-prometheus-cluster-g8x_86zx.yml
rendering /tmp/agent-prometheus-tls-e00f0smc.yml
rendering /tmp/agent-prometheus-sites-luugtbe1.yml
rendering /tmp/agent-prometheus-domains-v4umh3vr.yml

Fix by redirecting stdout to /dev/null:

* * * * * cd /home/frappe/agent && /home/frappe/agent/env/bin/agent discover > /dev/null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant