sysutils/py-healthchecks: New port: Open-source cron job and background task monitoring service
Healthchecks is a cron job monitoring service. It listens for HTTP
requests and email messages ("pings") from your cron jobs and
scheduled tasks ("checks"). When a ping does not arrive on time,
Healthchecks sends out alerts.
Healthchecks comes with a web dashboard, API, 25+ integrations for
delivering notifications, monthly email reports, WebAuthn 2FA
support, team management features: projects, team members, read-only
access.
Approved by: acm (mentor)
This commit is contained in:
@@ -731,7 +731,7 @@ stirlingpdf:*:785:
|
||||
# free: 787
|
||||
# free: 788
|
||||
# free: 789
|
||||
# free: 790
|
||||
healthchecks:*:790:
|
||||
# free: 791
|
||||
# free: 792
|
||||
# free: 793
|
||||
|
||||
@@ -737,7 +737,7 @@ stirlingpdf:*:785:785::0:0:Stirling PDF Daemon:/usr/local/stirlingpdf:/usr/sbin/
|
||||
# free: 787
|
||||
# free: 788
|
||||
# free: 789
|
||||
# free: 790
|
||||
healthchecks:*:790:790::0:0:Open-source cron and background task monitoring service:/var/db/healthchecks:/usr/sbin/nologin
|
||||
# free: 791
|
||||
# free: 792
|
||||
# free: 793
|
||||
|
||||
@@ -1033,6 +1033,7 @@
|
||||
SUBDIR += py-google-compute-engine
|
||||
SUBDIR += py-hared
|
||||
SUBDIR += py-hcloud
|
||||
SUBDIR += py-healthchecks
|
||||
SUBDIR += py-honcho
|
||||
SUBDIR += py-howdoi
|
||||
SUBDIR += py-hpilo
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
PORTNAME= healthchecks
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 3.10
|
||||
CATEGORIES= sysutils python
|
||||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
||||
|
||||
MAINTAINER= dtxdf@FreeBSD.org
|
||||
COMMENT= Open-source cron job and background task monitoring service
|
||||
WWW= https://github.com/healthchecks/${PORTNAME}
|
||||
|
||||
LICENSE= BSD3CLAUSE
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
BUILD_DEPENDS= ${ALL_DEPENDS}
|
||||
RUN_DEPENDS= ${ALL_DEPENDS}
|
||||
|
||||
USES= python shebangfix
|
||||
USE_GITHUB= yes
|
||||
|
||||
SHEBANG_FILES= ${WRKSRC}/manage.py
|
||||
|
||||
NO_ARCH= yes
|
||||
SUB_FILES= hcks pkg-message uwsgi.ini
|
||||
SUB_LIST= HOMEDIR=${HEALTHCHECKS_HOMEDIR}
|
||||
|
||||
USERS= ${HEALTHCHECKS_USER}
|
||||
GROUPS= ${HEALTHCHECKS_GROUP}
|
||||
|
||||
PLIST_SUB= GROUP=${GROUPS:[1]} \
|
||||
HOMEDIR=${HEALTHCHECKS_HOMEDIR} \
|
||||
USER=${USERS:[1]}
|
||||
PORTDOCS= README.md
|
||||
|
||||
OPTIONS_DEFINE= APPRISE DOCS MINIO
|
||||
OPTIONS_DEFAULT= APPRISE MINIO
|
||||
|
||||
APPRISE_DESC= Enable support for Apprise integration
|
||||
MINIO_DESC= Enable support for external object storage
|
||||
|
||||
APPRISE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}apprise>=0:net-im/py-apprise@${PY_FLAVOR}
|
||||
MINIO_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}minio>=0:devel/py-minio@${PY_FLAVOR}
|
||||
|
||||
HEALTHCHECKS_USER= ${PORTNAME}
|
||||
HEALTHCHECKS_GROUP= ${HEALTHCHECKS_USER}
|
||||
|
||||
HEALTHCHECKS_HOMEDIR= /var/db/${PORTNAME}
|
||||
|
||||
ALL_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aiosmtpd>=0:mail/py-aiosmtpd@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}cronsim>=0:devel/py-cronsim@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}django52>=0:www/py-django52@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}django_compressor>=0:www/py-django_compressor@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}dj52-django-stubs-ext>0:www/py-dj52-django-stubs-ext@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}fido2>0:security/py-fido2@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}oncalendar>=0:devel/py-oncalendar@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}psycopg>=0:databases/py-psycopg@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pycurl>=0:ftp/py-pycurl@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pydantic2>=0:devel/py-pydantic2@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pyjwt>=0:www/py-pyjwt@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}pyotp>=0:security/py-pyotp@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}segno>=0:textproc/py-segno@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}statsd>=0:devel/py-statsd@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}whitenoise>=0:www/py-whitenoise@${PY_FLAVOR}
|
||||
|
||||
do-build:
|
||||
@${PYTHON_CMD} -O ${PYTHON_LIBDIR}/compileall.py \
|
||||
-d ${PYTHONPREFIX_SITELIBDIR} \
|
||||
-f ${WRKSRC}/hc
|
||||
@${SETENV} \
|
||||
${PYTHON_CMD} ${WRKSRC}/manage.py compress --force
|
||||
@${SETENV} \
|
||||
${PYTHON_CMD} ${WRKSRC}/manage.py collectstatic --no-input
|
||||
|
||||
do-install:
|
||||
@${MKDIR} ${STAGEDIR}${HEALTHCHECKS_HOMEDIR}
|
||||
@cd ${WRKSRC} && \
|
||||
${COPYTREE_SHARE} ./hc ${STAGEDIR}${HEALTHCHECKS_HOMEDIR}
|
||||
@cd ${WRKSRC} && \
|
||||
${COPYTREE_SHARE} ./static ${STAGEDIR}${HEALTHCHECKS_HOMEDIR}
|
||||
@cd ${WRKSRC} && \
|
||||
${COPYTREE_SHARE} ./static-collected ${STAGEDIR}${HEALTHCHECKS_HOMEDIR}
|
||||
@cd ${WRKSRC} && \
|
||||
${COPYTREE_SHARE} ./templates ${STAGEDIR}${HEALTHCHECKS_HOMEDIR}
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/manage.py ${STAGEDIR}${HEALTHCHECKS_HOMEDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/search.db ${STAGEDIR}${HEALTHCHECKS_HOMEDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/CHANGELOG.md ${STAGEDIR}${HEALTHCHECKS_HOMEDIR}
|
||||
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
||||
${INSTALL_DATA} ${WRKDIR}/uwsgi.ini ${STAGEDIR}${EXAMPLESDIR}
|
||||
${INSTALL_SCRIPT} ${WRKDIR}/hcks ${STAGEDIR}${LOCALBASE}/bin/hcks
|
||||
|
||||
post-install:
|
||||
.for dir in run log
|
||||
@${MKDIR} ${STAGEDIR}/var/${dir}/${PORTNAME}
|
||||
.endfor
|
||||
@${MKDIR} ${STAGEDIR}${HEALTHCHECKS_HOMEDIR}
|
||||
|
||||
post-install-DOCS-on:
|
||||
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}/${DOCSDIR}
|
||||
|
||||
.include <bsd.port.mk>
|
||||
@@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1749595062
|
||||
SHA256 (healthchecks-healthchecks-v3.10_GH0.tar.gz) = 81fcc6577771ba966e45e35976f084419e1637b3f595e42d91556054a7a1b6d6
|
||||
SIZE (healthchecks-healthchecks-v3.10_GH0.tar.gz) = 4868195
|
||||
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
args=
|
||||
for arg in "$@" ; do
|
||||
if [ "${arg#* }" != "${arg}" ] ; then
|
||||
args="${args} '${arg}'"
|
||||
else
|
||||
args="${args} ${arg}"
|
||||
fi
|
||||
done
|
||||
|
||||
su -m healthchecks -c "%%HOMEDIR%%/manage.py ${args}"
|
||||
@@ -0,0 +1,11 @@
|
||||
--- hc/lib/webauthn.py.orig 2025-06-11 05:51:38 UTC
|
||||
+++ hc/lib/webauthn.py
|
||||
@@ -14,8 +14,6 @@ from fido2.webauthn import (
|
||||
UserVerificationRequirement,
|
||||
)
|
||||
|
||||
-fido2.features.webauthn_json_mapping.enabled = True
|
||||
-
|
||||
|
||||
class CreateHelper:
|
||||
def __init__(self, rp_id: str, credentials: Iterable[bytes]):
|
||||
@@ -0,0 +1,22 @@
|
||||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
Healthchecks is located in its home directory %%HOMEDIR%% and can be run like any
|
||||
Django application using 'hcks runserver' but for production use it is recommended
|
||||
to use uWSGI or Gunicorn.
|
||||
|
||||
If you plan to use uWSGI, install www/uwsgi and configure in your rc.conf(5):
|
||||
|
||||
sysrc uwsgi_enable="YES"
|
||||
sysrc uwsgi_procname="uWSGI"
|
||||
sysrc uwsgi_profiles="hc"
|
||||
sysrc uwsgi_hc_socket="/var/run/healthchecks/hc.sock"
|
||||
sysrc uwsgi_hc_socket_owner="healthchecks:www"
|
||||
sysrc uwsgi_hc_uid="healthchecks"
|
||||
sysrc uwsgi_hc_gid="healthchecks"
|
||||
sysrc uwsgi_hc_configfile="%%EXAMPLESDIR%%/uwsgi.ini"
|
||||
sysrc uwsgi_hc_pidfile="/var/run/healthchecks/hc.pid"
|
||||
sysrc uwsgi_hc_logfile="/var/log/healthchecks/hc.log"
|
||||
EOM
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,35 @@
|
||||
[uwsgi]
|
||||
strict
|
||||
die-on-term
|
||||
http-socket = :8000
|
||||
harakiri = 10
|
||||
buffer-size = 32768
|
||||
post-buffering = 16192
|
||||
processes = 4
|
||||
if-env = UWSGI_PROCESSES
|
||||
processes = %(_)
|
||||
endif =
|
||||
auto-procname
|
||||
enable-threads
|
||||
threads = 1
|
||||
chdir = %%HOMEDIR%%
|
||||
module = hc.wsgi:application
|
||||
thunder-lock
|
||||
disable-write-exception
|
||||
|
||||
# workaround for https://github.com/unbit/uwsgi/issues/2299
|
||||
max-fd = 10000
|
||||
|
||||
# compression
|
||||
check-static = static-collected/
|
||||
static-gzip-dir = static-collected/CACHE
|
||||
|
||||
# Note: manage.py migrate will also run system checks
|
||||
hook-pre-app = exec:./manage.py migrate
|
||||
# Use "--skip-checks" to avoid running same checks 3 times
|
||||
attach-daemon = ./manage.py sendalerts --skip-checks
|
||||
attach-daemon = ./manage.py sendreports --loop --skip-checks
|
||||
|
||||
if-env = SMTPD_PORT
|
||||
attach-daemon = ./manage.py smtpd --port %(_) --skip-checks
|
||||
endif =
|
||||
@@ -0,0 +1,9 @@
|
||||
Healthchecks is a cron job monitoring service. It listens for HTTP
|
||||
requests and email messages ("pings") from your cron jobs and
|
||||
scheduled tasks ("checks"). When a ping does not arrive on time,
|
||||
Healthchecks sends out alerts.
|
||||
|
||||
Healthchecks comes with a web dashboard, API, 25+ integrations for
|
||||
delivering notifications, monthly email reports, WebAuthn 2FA
|
||||
support, team management features: projects, team members, read-only
|
||||
access.
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user