Install
Guided install
Pick your setup. Get commands with your values in them.
Answer a few questions and the steps below rewrite themselves. Copy each block, run it, tick it off. Your tokens are never typed into this page: the commands ask for them in your terminal.
Prefer reading? The same steps are written out below, plus the manual routes.
lastpulse tells you when scheduled work fails, never starts or runs far too long, and says why. Kubernetes CronJobs and Jobs are found automatically: you add no ping lines to your jobs.
You install one or more small programs. Pick what fits where your jobs run:
| Install | For | You need | How |
|---|---|---|---|
| Cluster agent | Kubernetes CronJobs, Jobs and backups | a cluster (k3s or Kubernetes 1.27+), kubectl, helm 3.8+ | Helm or plain manifests |
Host agent (lastpulse-host) | crontab, systemd timers and Proxmox vzdump on a Linux host | Debian, Ubuntu or Proxmox (other systemd Linux works with the plain binary), root | .deb, install script or binary |
lastpulse-cli | anything else: Windows tasks, macOS launchd, CI schedules, serverless | a LastPulse account and a Reporter key | install script or binary |
The cluster and host agents work on their own, with alerts straight to Telegram, Slack or Discord, or they can send
their results to your LastPulse account at https://app.lastpulse.dev (connect to LastPulse).
Every download is signed: see verify a release before you run it. Allow about five minutes for the first
alert.
You never type a secret into a command line here. The commands ask for your token with a hidden prompt, so it stays out of your shell history and process list.
A few commands pin a release. Look up the latest one with:
VERSION=$(curl -fsSL https://dl.lastpulse.dev/agent/latest.txt) # for example 0.2.0
Cluster agent (Kubernetes)
You need a Kubernetes cluster (k3s, k8s 1.27+) and kubectl and helm 3.8+ pointed at it (kubectl get nodes should
list your nodes).
1. Pick where alerts go
Telegram
- Talk to @BotFather, run
/newbotand keep the token (123456:ABC…). - Add the bot to your group and send the group a message.
- Read the group’s chat id: open
https://api.telegram.org/bot<token>/getUpdatesand find"chat":{"id":-100…}. A group’s id starts with a minus sign. If the list is empty, send the group another message and reload.
Slack
- Go to https://api.slack.com/apps, then Create New App → From scratch.
- Under OAuth & Permissions → Bot Token Scopes, add
chat:writeandchat:write.public. The second one lets the bot post without being invited. - Click Install to Workspace and keep the Bot User OAuth Token (
xoxb-…). - Get the channel id: open the channel’s details; it’s at the bottom (
C0123ABC).
Discord
- Open Server Settings → Integrations → Webhooks → New Webhook, choose the channel.
- Copy the webhook URL. The URL is the credential, so treat it like a token.
2. Install with Helm
Create the namespace and a Secret with the token. The first command asks for the token without showing it (use
LASTPULSE_SLACK_TOKEN for Slack, or LASTPULSE_DISCORD_WEBHOOK_URL with the webhook URL for Discord):
printf 'Paste your bot token, then press Enter: '; read -rs LP_SECRET; echo
kubectl create namespace lastpulse
kubectl -n lastpulse create secret generic lastpulse-k8s-agent-secrets \
--from-literal=LASTPULSE_TELEGRAM_TOKEN="$LP_SECRET"
unset LP_SECRET
You should see namespace/lastpulse created and secret/lastpulse-k8s-agent-secrets created.
Write values.yaml:
config:
cluster: homelab # a name for this cluster; it shows in every alert
channels:
- name: ops
type: telegram # or: slack, discord
telegram: {chatId: "-1001234567890"}
# slack: {channel: C0123ABC}
# discord: {} # the webhook URL comes from the Secret
routes:
default: [ops]
secrets:
existingSecret: lastpulse-k8s-agent-secrets
Then install:
helm install lastpulse-k8s-agent oci://ghcr.io/lastpulse-dev/charts/lastpulse-k8s-agent \
-n lastpulse -f values.yaml
kubectl -n lastpulse rollout status deploy/lastpulse-k8s-agent
kubectl -n lastpulse logs deploy/lastpulse-k8s-agent | head
Helm installs the latest release. To pin one, add --version "$VERSION". The rollout ends with
deployment "lastpulse-k8s-agent" successfully rolled out. The logs show starting lastpulse-k8s-agent (cluster,
namespaces, channels), then initial sync processed with the number of jobs found, and informers synced. If the pod
does not become ready, see troubleshooting. The agent’s RBAC is read-only: get, list and watch on CronJobs, Jobs and
Pods, and get on pod logs. The chart pins the agent image by the digest the release signed.
Without Helm: render the manifests once and apply them with kubectl:
helm template lastpulse-k8s-agent oci://ghcr.io/lastpulse-dev/charts/lastpulse-k8s-agent \
-n lastpulse -f values.yaml > lastpulse-k8s-agent.yaml
kubectl apply -f lastpulse-k8s-agent.yaml
To upgrade, run helm upgrade with the same arguments (add the new --version to pick a release). To remove the agent: helm uninstall lastpulse-k8s-agent -n lastpulse.
3. See an alert
kubectl create namespace lastpulse-demo
kubectl apply -n lastpulse-demo -f - <<'YAML'
apiVersion: batch/v1
kind: CronJob
metadata:
name: fails
spec:
schedule: "*/1 * * * *"
jobTemplate:
spec:
backoffLimit: 0 # fail the Job on the first error (the default retries for minutes)
template:
spec:
restartPolicy: Never
containers:
- name: app
image: busybox:1.36
command: ["sh", "-c", "echo working; echo PASSWORD=hunter2; exit 3"]
YAML
Within a minute (at the next full minute) the Job runs and fails. A few seconds later you get FAILED · fails, with
exit code 3, the last log lines and the image. If nothing arrives after two minutes, look at
kubectl -n lastpulse-demo get cronjob,job and the agent’s logs (troubleshooting). Secrets in the log lines are masked before anything leaves the cluster. Each further
failure edits the same message (Slack: chat.update), and the occurrence count goes up.
Don’t test with kubectl create cronjob … -- sh -c 'exit 3'. That gives restartPolicy: OnFailure and
backoffLimit: 6, so Kubernetes restarts the container with back-off for several minutes before it marks the Job
failed. The agent alerts when the Job fails, not while it retries.
Clean up with kubectl delete namespace lastpulse-demo. Deleting the CronJob makes the agent stop watching it and
close the open incident: the message is edited to RESOLVED, with a threaded reply.
Useful notes (annotations) you can add to any CronJob to tune it:
lastpulse.dev/grace: 10m: how long after the due time to wait before calling a run MISSED (default 5 minutes);lastpulse.dev/max-duration: 30m: call a run SLOW when it takes longer than this;lastpulse.dev/ignore: "true": don’t watch this job;lastpulse.dev/route: <tag>: send this job’s alerts to a different route.
Host agent (Linux)
lastpulse-host watches systemd timers, crontab entries and Proxmox VE vzdump backups on one host.
Install script (Debian, Ubuntu, Proxmox VE; downloads the .deb, checks its checksum, installs it):
curl -fsSL https://lastpulse.dev/install-host.sh | sudo sh
Manual: download the package for your architecture, check it and install it:
BASE=https://dl.lastpulse.dev/agent/v$VERSION
curl -fsSLO "$BASE/lastpulse-host_${VERSION}_amd64.deb" -O "$BASE/SHA256SUMS" # or _arm64.deb
sha256sum --ignore-missing -c SHA256SUMS
sudo apt install ./lastpulse-host_${VERSION}_amd64.deb
On other systemd distributions, download lastpulse-host-linux-amd64 (or -arm64) from the same folder, check it
against SHA256SUMS, copy it to /usr/local/bin/lastpulse-host and run lastpulse-host run --config /etc/lastpulse/host.yaml under your own systemd unit.
Then say where alerts go. The settings file holds no secrets. A minimal /etc/lastpulse/host.yaml:
channels:
- name: ops
type: telegram # or: slack, discord (the same channel settings as the cluster agent)
telegram: {chatId: "-1001234567890"}
routes:
default: [ops]
Put the secret in /etc/default/lastpulse-host, readable by root only. The first command asks for the token without
showing it (LASTPULSE_SLACK_TOKEN for Slack, LASTPULSE_DISCORD_WEBHOOK_URL for Discord):
printf 'Paste your bot token, then press Enter: '; read -rs LP_SECRET; echo
printf 'LASTPULSE_TELEGRAM_TOKEN=%s\n' "$LP_SECRET" | sudo sh -c 'umask 077; cat > /etc/default/lastpulse-host'
sudo chmod 600 /etc/default/lastpulse-host
unset LP_SECRET
Start it and see what it found:
sudo systemctl enable --now lastpulse-host
lastpulse-host discover # lists everything it would watch
discover prints one line per systemd timer, crontab entry or Proxmox job. An empty list means there is nothing
scheduled it knows how to read, or the command needs sudo to read other users’ crontabs.
Cron throws away exit codes, so wrap cron lines to see failures. Systemd timers and Proxmox need no change:
15 3 * * * root /usr/bin/lastpulse-host exec --name nightly-rsync -- /usr/local/bin/rsync-backup.sh
Test the whole path with a command that fails:
lastpulse-host exec --name lastpulse-test -- sh -c 'echo working; echo PASSWORD=hunter2; exit 3'
You get FAILED · lastpulse-test with the masked log lines, and the command’s own exit code (3) comes back to your shell.
For Proxmox vzdump, add script: /usr/sbin/lastpulse-vzdump-hook to /etc/vzdump.conf. To remove the host agent, run
sudo apt remove lastpulse-host. The service runs as root
(it reads every user’s crontab and /etc/pve) with all other capabilities and most of the filesystem taken away.
The lastpulse-cli command
One static binary, no runtime: it runs your command, reports the result and exits with the command’s exit code.
Binaries exist for linux, darwin and windows on amd64 and arm64.
Install script (Linux and macOS; installs to /usr/local/bin, or ~/.local/bin without root):
curl -fsSL https://lastpulse.dev/install-cli.sh | sh
# a specific version, another folder:
curl -fsSL https://lastpulse.dev/install-cli.sh | LASTPULSE_VERSION=$VERSION LASTPULSE_BIN_DIR=$HOME/bin sh
Windows (PowerShell):
irm https://lastpulse.dev/install-cli.ps1 | iex
Manual: download the binary for your system and check it against the signed checksum list:
BASE=https://dl.lastpulse.dev/agent/v$VERSION
F=lastpulse-cli-linux-amd64 # linux|darwin|windows-amd64|arm64, .exe on Windows
curl -fsSLO "$BASE/$F" -O "$BASE/SHA256SUMS"
sha256sum --ignore-missing -c SHA256SUMS # macOS: shasum -a 256 -c --ignore-missing SHA256SUMS
chmod +x "$F" && sudo mv "$F" /usr/local/bin/lastpulse-cli
lastpulse-cli --help
Use it to wrap a job. It needs your LastPulse account: create a Reporter key first (see below). The first command asks for the key without showing it:
printf 'Paste your API key (jwk_…), then press Enter: '; read -rs LASTPULSE_API_KEY; echo
export LASTPULSE_URL=https://app.lastpulse.dev LASTPULSE_API_KEY
lastpulse-cli run --check nightly-export --cluster ci --every 1d --grace 30m -- ./export.sh
A failure alerts within seconds, a missed run at its due time plus the grace period, and an over-long run when it passes --max-duration. Windows (PowerShell) users set the same two variables with $env:LASTPULSE_URL and $env:LASTPULSE_API_KEY.
All options, plus curl, PowerShell, Task Scheduler, launchd, GitHub Actions and Lambda examples:
Report API and CLI.
Connect to LastPulse
Standalone agents alert straight to Telegram or Slack. To also keep history, see jobs in the web app, catch missed
runs when an agent itself dies and use lastpulse-cli, connect them to your account at
https://app.lastpulse.dev:
-
Cluster agent and host agent: in the web app create an agent token (Agents → tokens), then add the address and token. For the cluster agent:
config: server: url: https://app.lastpulse.dev secrets: existingSecret: lastpulse-k8s-agent-secrets # add LASTPULSE_SERVER_TOKEN=jwa_… to itkubectl -n lastpulse patch secret lastpulse-k8s-agent-secrets --type merge -p '{"stringData":{"LASTPULSE_SERVER_TOKEN":"jwa_…"}}' helm upgrade lastpulse-k8s-agent oci://ghcr.io/lastpulse-dev/charts/lastpulse-k8s-agent \ -n lastpulse -f values.yaml kubectl -n lastpulse rollout restart deploy/lastpulse-k8s-agentFor the host agent set
server.url: https://app.lastpulse.devin/etc/lastpulse/host.yamlandLASTPULSE_SERVER_TOKEN=jwa_…in/etc/default/lastpulse-host, then restart the service.The agent logs
registered with server. It registers its own Ed25519 key with the token and signs every message from then on. -
lastpulse-cli: Settings → API keys → New key, role Reporter, limited to a cluster name of your choice (for exampleci). The secret is shown once. Put it inLASTPULSE_API_KEY, never on the command line.
Troubleshooting
| Symptom | Check |
|---|---|
| No alert from the agent | kubectl -n lastpulse logs deploy/lastpulse-k8s-agent: channel errors name the platform’s answer (invalid_auth, chat not found, not_in_channel) |
Telegram says chat not found | the bot is not in the group yet, nobody has sent a message since it joined, or the chat id is missing its minus sign |
| The pod keeps restarting | kubectl -n lastpulse logs deploy/lastpulse-k8s-agent prints the config error, for example a missing token (slack token missing, discord webhook URL missing): check the Secret holds the key for your channel type |
helm install can’t find the chart | check you typed oci://ghcr.io/lastpulse-dev/charts/lastpulse-k8s-agent, and that helm version is 3.8 or newer |
| The demo job never runs | kubectl -n lastpulse-demo get cronjob,job. The schedule fires at the next full minute, so wait up to a minute |
| An alert came but the log lines are missing | your organization uses sealed or metadata-only logs: the alert links to the logs instead, and your device unlocks them in the web app |
Agent register: 401 | the token is wrong, revoked or for another account: create a new one under Agents → tokens |
Agent refuses an http:// address | use the https:// address, https://app.lastpulse.dev |
lastpulse-host discover shows nothing | run it with sudo (crontabs of other users are root-only), and check the service with systemctl status lastpulse-host |
lastpulse-cli: LASTPULSE_URL and LASTPULSE_API_KEY must be set | export both in the job’s environment (cron and Task Scheduler do not read your shell profile) |
lastpulse-cli gets 401 / 403 | the key is expired or revoked, or the --cluster is outside the key’s clusters |
| Checksum does not match | do not run the file; download it again and verify the signature |
Next steps
- Send different jobs to different channels with
routesand thelastpulse.dev/routeannotation. - Tune noisy or slow jobs with the annotations above.
- Invite your team and limit each person to some clusters, in the web app.
- Check what you installed: verify a release.
- Jobs that don’t run in Kubernetes: the Report API and CLI.