# PatchMon-exporter

PatchMon-exporter is a self-hosted infrastructure app. Prometheus exporter for PatchMon that answers "is the fleet actually patched?" - a different question from "is PatchMon up" or "did the agent check in", both of which can stay green while a host silently stops applying... It is open source and self-hosted, installable on Docker Hub and Unraid.

Canonical page: https://ourlocalhost.com/app/2562/patchmon-exporter

## Description

Prometheus exporter for PatchMon that answers "is the fleet actually patched?" - a different question from "is PatchMon up" or "did the agent check in", both of which can stay green while a host silently stops applying updates. Reads PatchMon's Postgres backing store directly, read-only, as a dedicated DB role.

## Platform availability

Available on 1 of 10 platforms: Unraid.

## Health score

44/100 (Fair), based on 4 of 4 factors.
- Maintained: 69 (last commit 65 days ago)
- Popular: 6 (1 GitHub stars)
- Easy to install: 35 (1 install platform, install notes, Docker image)
- Light to run: 50 (2 GB minimum RAM)

## Links

- Docker Hub: https://hub.docker.com/r/louij2/patchmon-exporter
- GitHub: https://github.com/louij2/patchmon-exporter
- Unraid: https://ca.unraid.net/apps/patchmon-exporter-1f4a97r1yb6rmb?q=patchmon-exporter

## Common questions

### Does patchmon-exporter need a PatchMon API key to read host patch state?

No. It reads PatchMon's Postgres backing store directly, because PatchMon's REST API needs a session or API key per host and does not provide a fleet-wide read token.

### How should the exporter receive its database connection string?

Put a standard Postgres connection string in a DSN file, by default /run/secrets/patchmon-dsn, and override the path with PATCHMON_DSN_FILE if needed. Do not bake the DSN into the image or pass it as a plain environment variable.

### What port does patchmon-exporter expose and what path should Prometheus scrape?

It listens on port 9820 by default, which can be changed with LISTEN_PORT. Prometheus should scrape the /metrics path on that port.

### What network access does the exporter need to work?

It needs network access to PatchMon's Postgres instance. You can join the same internal Docker network as PatchMon or expose the database port to the exporter.

### Which metric shows whether hosts are actually patched rather than merely checking in?

Use patchmon_host_patch_stale_seconds, which measures the age since a host last successfully applied updates. It is independent of whether the agent is still checking in on schedule.

---
Source: Our Local Host (https://ourlocalhost.com/app/2562/patchmon-exporter), the self-hosted and open-source app directory.
