NRPE That Answers Only A Nagios Server Holding Your Certificate

NRPE from EPEL, the agent a Nagios server asks to run checks, answering only a client with a certificate your CA signed. The package encrypts with anonymous Diffie-Hellman, so neither side proves who it is. The live test runs checks with the certificate and is refused with none, a rogue one, anonymous TLS, arguments and another address. Original role, live-tested on Rocky Linux 10.

ansibleObservability

Verification

Live-tested

Really deployed to a container sandbox, proven idempotent (a second run changes nothing), verified against the role’s assertions, then torn down.

Conformance

  • Static validation (yamllint · ansible-lint)

Provenance

  • SHA-256 checksum
  • Signature (pending)

Functional

  • Live-tested - applied, verified, destroyed

Last verified 2026-10-08 · podman 4.9.3 · ansible 2.21.4 · how we verify

Cite it in your README

badge · attribution

Paste this beside the module in the repository that uses it. The badge is rendered from this artifact's verification record, so it reads live-tested because the record says so, and the link lands on this page.

README.md, GitLab, Gitea
[![IaC Bazaar: live-tested](https://www.iac-bazaar.com/api/artifacts/ansible-nrpe/badge)](https://www.iac-bazaar.com/catalog/ansible-nrpe?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)

Ansible role 1.0.0, live-tested on IaC Bazaar: [NRPE That Answers Only A Nagios Server Holding Your Certificate](https://www.iac-bazaar.com/catalog/ansible-nrpe?utm_source=syndication&utm_medium=readme&utm_campaign=artifact)

```yaml
# NRPE That Answers Only A Nagios Server Holding Your Certificate: https://www.iac-bazaar.com/catalog/ansible-nrpe (download from your IaC Bazaar account)
```

Preview:IaC Bazaar: live-tested

Documentation

nrpe

NRPE from EPEL, the agent a Nagios server asks to run checks on this host, answering only a client that presents a certificate your CA signed: TLS 1.2 or later, anonymous Diffie-Hellman off, arguments from the network refused, the listener on loopback until you open it, and every file checked by starting it before it lands. Original role for EL 10, live-tested with podman on Rocky Linux 10.

No download, and no version to pin. EL 10 packages nrpe in EPEL, so the role installs it by name and takes what the distribution ships: a security update arrives through dnf, not through a new release of this role. What the role owns is the configuration and the proof that the service works.

The distribution's unit, our configuration. The role installs nrpe and the load, disk, users and procs plugins from EPEL, writes /etc/nagios/nrpe.cfg (root:nrpe 0640) and enables the package's nrpe.service, which runs as the nrpe user. The listener is 127.0.0.1:5666 by default; set nrpe_listen_address and add your Nagios server to nrpe_allowed_hosts to open it. The live test reads the listening sockets and expects loopback only.

The package's TLS proves nothing about either side. The stock file turns on anonymous Diffie-Hellman: the stock client negotiated ADH-AES256-GCM-SHA384 with "no peer certificate available" (measured). The traffic is encrypted, but neither side is authenticated: anyone who can reach the port and offers an anonymous suite is a client, and anyone in the path can pose as the server. The stock file also listens on every address (0.0.0.0:5666 and [::]:5666). The role turns ADH off and requires a client certificate signed by its CA (ssl_client_certs=2): no certificate, a self-signed one and an ADH-only client are each refused, and the right certificate runs commands over TLS 1.3. Either setting alone already stops ADH - an ADH-only client was refused with client certificates required and ssl_use_adh=1, and with ssl_use_adh=0 and no client certificates (both measured) - and the role sets both, so the refusal does not hang on one line; the live test checks the settings as well as the refusals.

A CA per host unless you bring one. By default the role makes a CA, a server certificate and one client certificate for your Nagios server in /etc/nagios/iacbazaar-tls (keys root 0600; the server key root:nrpe 0640), once. A fleet should not have a CA per host: set nrpe_tls_generate: false and point nrpe_tls_ca, nrpe_tls_cert and nrpe_tls_key at files your own CA issued.

Addresses and arguments. allowed_hosts is checked before the handshake: a client on 127.0.0.2 with the right certificate was dropped ("Host 127.0.0.2 is not allowed to talk to us!"). Arguments stay refused (dont_blame_nrpe=0): a request with -a is logged and dropped, so each command in nrpe_commands runs exactly as written.

The plugins need procps-ng. check_load reads the load from uptime and the process checks run ps, both from procps-ng, which the plugin packages do not require: on a minimal host check_load answered "could not parse load 0 from uptime" (measured). The role installs procps-ng with them.

A checker, because NRPE has none. NRPE stops at once on a line it cannot parse, a value it does not know (ssl_client_certs=7) or a certificate or key its user cannot read, and accepts an unknown option, an address like 999.1.1.1 and a missing include_dir without a word (measured). The role starts each candidate as the nrpe user on a spare port for three seconds, so a key only root can read is refused before it reaches the service. What NRPE accepts silently stays your review's to catch.

License

Commercial - IaC Bazaar EULA. (c) IaC Bazaar.

Usage code & full reference need an account

The complete copy-paste usage, the full input/output reference, and operational notes are free with an account - shown here and bundled in the download. Sign in and this section fills in.

  • Variables
  • Test

Related modules

Live-tested

ansible-victoria-logs

VictoriaLogs from the upstream release as a hardened service on loopback. Its JSON-lines endpoint answers 200 and stores nothing when the content type is wrong, so the README names the one it needs. The live test ingests two lines, gets the right one back from LogsQL, and sees an unwritten stream come back empty and bad LogsQL refused. Original role, live-tested on Rocky Linux 10.

View module
Live-tested

ansible-alertmanager

Prometheus Alertmanager from the upstream release (sha256-verified) as a hardened system service on loopback, its cluster gossip listener switched off and its configuration checked by amtool before it lands. The live test posts an alert through the API and reads it back active, held by the default receiver, and expects no 9094 listener at all. Original role, live-tested on Rocky Linux 10.

View module
Live-tested

ansible-alloy

Grafana Alloy from the upstream release (sha256-verified) as a hardened system service on loopback with --disable-reporting, a self-scrape pipeline that proves the collector runs, and its configuration checked by alloy validate before it lands. The live test reads Alloy's own metrics and asks the component API for the scrape component's health. Original role, live-tested on Rocky Linux 10.

View module
Live-tested

ansible-blackbox-exporter

Prometheus Blackbox exporter from the upstream release (sha256-verified) as a hardened system service on loopback with HTTP and TCP modules, checked by --config.check before the file lands. The live test has it probe itself over HTTP and TCP (probe_success 1) and a port with nothing behind it (probe_success 0): it measures, not only answers. Original role, live-tested on Rocky Linux 10.

View module
Live-tested

ansible-cockpit

Cockpit from BaseOS bound to loopback, with logins limited to an admin group through PAM and root refused outright. The live test sees an administrator log in while an ordinary account, a wrong password and root, placed in the admin group to isolate its own rule, are refused, and reads the login banner. Original role, live-tested on Rocky Linux 10.

View module
Live-tested

ansible-fluent-bit

fluent-bit from EPEL, following a log-file glob it re-reads every few seconds and shipping over the Forward protocol, with retries unlimited instead of the default single retry. Its config is checked with --dry-run before it lands. The live test writes a line to a new file and watches it arrive at an aggregator it started. Original role, live-tested on Rocky Linux 10.

View module