Skip to content

Add the scrape path for a host that pushes nothing #256

Description

@Gerrrt

Every host in this estate is monitored by pushing. prometheus, oracle
and Saruman all run Alloy agents that remote_write to 10.0.99.20:9090 and
push to :3100; the only scraped things are the six containers on the compose
network, plus SNMP devices and blackbox endpoints behind their exporters.

ADR-0016
breaks that for the NAS on CasaBonita (40), and had to: a host on a terminal
segment must not initiate upward, so Prometheus reaches in and scrapes it over
99→40:9100 instead. That makes smaug the estate's first scraped host — the
first target that is a machine rather than a container or a device behind an
exporter.

That is more than a line in a YAML file, which is why it is not just a checkbox
on #102.

Note

Updated 2026-09-17. This is no longer blocked, and it grew a fork.
The host is smaug, not zion
(ADR-0038),
and it runs TrueNAS, not Ubuntu Server
(ADR-0040).
#102 is closed and the tracker is
#413. Moved to Wave 0.

The fork, which is the first thing to settle

This issue specifies node_exporter on 9100. TrueNAS ships its own metrics
endpoint
, so the target shape is a choice nobody has made, and
build-the-nas.md
§8 names it as this issue's to settle. It is not a free choice in either
direction:

  • The 99 → 40:9100 pass already exists — created and verified in position
    on 2026-09-16. If the answer is node_exporter, the firewall work is done.
  • If the answer is TrueNAS's own endpoint on another port, that is a fifth
    inbound rule
    , which means the ordering care §0.5 and §0.6 document — above
    Block access to CasaBonita, verified from morpheus rather than from the
    UI — applies again.
  • The two do not carry the same metric names, and the host-overview
    dashboard is built on node-exporter metrics.

What it needs

  • Settle the fork above, and say which in the file's header.
  • A node job in prometheus.yaml with file_sd_configs, following the
    shape the snmp and blackbox jobs already use — the comment above the
    SNMP job explains why file_sd rather than static targets, and the same
    reasoning applies.
  • prometheus/targets/node.yaml, with a header in the house style: what
    each label means and who reads it. blackbox.yaml's header is the model.
  • Decide the label set. snmp.yaml carries device, role and vlan;
    whatever this file carries has to work with the existing host-overview
    dashboard, which is built on node-exporter metrics and currently sees
    only what Alloy pushes.
  • Alert rules. A pushed host that dies stops writing and existing rules
    notice; a scraped host that dies produces up == 0, which is a different
    signal and may not be covered. Check whether anything currently fires on
    up == 0 for a non-container target
    — if it does not, this host would
    go dark silently, which is the exact class of fault
    #63 and
    #62 were.
  • A promtool test rules case for whatever rule that turns out to be. The
    repo has unit tests for exactly one rule today, and the reason it has them
    is that syntax-checking cannot tell you an expression can never be true.
  • Consider whether docs/runbooks/add-monitored-device.md grows a second
    path, or whether a scraped host is different enough to want its own.

The ordering trap

The scrape target cannot be written before the firewall rule exists, and the
firewall rule should not be created before the host answers on that address —
ADR-0016 declined to create it for exactly that reason: a pass to an address
with nothing behind it is a rule nobody can test. So the sequence is hardware →
rule → target → alert, and each step is testable only after the one before it.

The first two steps are done. smaug has held 10.0.40.30 since
2026-09-16 and the passes are created and verified, so the target and the alert
are what is left — and neither waits on the ZFS pool, which is why this left
Wave 3. Writing the YAML early was the risk; the risk now is only writing it
against the wrong endpoint, which is what the fork above is for.

Found writing ADR-0016 for #95.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestseq/1Step 1 within its milestone; same number = can run in parallel

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions