A monitoring server holds working credentials for almost every system it watches, so whoever controls it can reach the whole estate. Nagios XI checks hosts over SSH, SNMP, WMI, agents and APIs, and each method needs a secret stored somewhere on the server: a private key, a community string, a domain account password, an agent token. This guide covers how users, roles and the REST API work in Nagios XI, how to govern the credentials it uses to reach monitored systems, what to log, and a hardening baseline you can apply to Nagios XI and to monitoring servers in general. It is for system owners, infrastructure engineers and security teams that inherit a monitoring platform.
This is an independent guide from NHI Mgmt Group, based on Nagios's public documentation as of November 2026. It is not sponsored or reviewed by Nagios. Product features change, so confirm settings against Nagios's current documentation.
Key takeaways
- Treat the monitoring server as tier zero. It stores SSH keys, SNMP secrets, WMI passwords and agent tokens for the estate, so it needs the same access controls, patching speed and logging as a domain controller or PAM vault.
- Admin in Nagios XI means everything. The Admin authorization level can change users, components and security credentials; give most people the User level with only the security settings they need.
- Monitoring credentials are non-human identities. Each check account, key and token needs an owner, the least privilege that still lets the check run, and a rotation plan that keeps the old value until every agent has the new one.
- Change every installation default on day one. Nagios documentation lists default operating system and database passwords for some installation types, and internal sub-system credentials should be reset after install or after any suspected compromise.
- Patching is the first control on an exposed web console. Follow the Nagios Security Disclosures page, upgrade to the latest release, and keep the web interface off the internet.
How identity and access work in Nagios XI
Nagios XI separates users, who log in to the web interface or call the API, from contacts, who receive notifications. A user is linked to a contact so that notification routing and object visibility line up. Before XI 2026R2 permissions were set per user; from 2026R2 Nagios added Roles for role-based access control, so a permission set can be defined once and assigned to many users. Nagios XI also supports multi-tenancy: each user sees only the hosts and services they are authorised to view and maintain.
Authentication options documented by Nagios:
- Local accounts: username and password stored by Nagios XI. Keep these for break-glass administrators only.
- Active Directory or LDAP: configured under Admin > Users > LDAP/AD Integration with Add Authentication Server. Each server has a Connection Method (Active Directory or LDAP), Base DN, domain controllers or LDAP host, and a Security option. Use SSL or TLS rather than None; the host or domain controller names must match the certificate Common Name. Nagios checks the password against the directory at each login.
- Email token two-factor authentication: added in XI 5.5, under Admin > System Config > System Settings, Security tab: Enable Two Factor Auth, Two Factor Token Timeout, Two Factor Cookie and Two Factor Cookie Timeout.
- Duo two-factor authentication: a component under Admin > System Extensions > Manage Components > DUO 2FA Integration. It needs HTTPS and an External URL that is a resolvable hostname. Once enabled it applies to all users by default, and an administrator can disable it per user under Authentication Settings.
- Single sign-on with Microsoft Entra ID: described in the Nagios administrator guide as an advanced topic.
- Automatic Login (2026R1.2 and later): logs a visitor in as a chosen user, either on visiting the URL or through a button on the login page, without authenticating. Leave it off unless the chosen user is read-only and the interface is reachable only from a controlled display network.
Two settings deserve a decision rather than a default. Allow local login if auth server login fails lets a directory user fall back to a local password when the directory is unreachable or rejects the password: enable it only for named break-glass accounts. The Two Factor Cookie option adds a "Remember this browser" checkbox; if you keep it, set a short cookie timeout for administrators.
Admin roles and privileged access
Nagios XI has two authorization levels. Admin can add and reconfigure users, hosts, services, components, configuration wizards, dashlets, program settings and security credentials. User is the default and most restrictive level, and a user with no security settings sees only the hosts and services for which they are a notification contact. The User level is then widened with the settings below.
| Security setting (User level) | What it grants | Risk if over-assigned | Typical holder |
|---|---|---|---|
| Can see all objects | View every monitored host and service | Exposes the full estate map, including hostnames and IPs of sensitive systems | NOC staff, service desk leads |
| Can control hosts and services | Acknowledge problems, schedule downtime, toggle notifications, force checks | Downtime and disabled notifications can hide an intrusion | On-call engineers |
| Can configure hosts and services | Run configuration wizards, delete or reconfigure objects | Wizards can add credentials and change what is checked | Monitoring engineers |
| Can access advanced features | Edit check commands, Advanced tab, host parents | Editing a check command changes what runs on the server as the monitoring user | Monitoring platform owners only |
| Can access monitoring engine | Restart or shut down the engine, view the Event Log | Stopping the engine blinds monitoring | Platform owners |
| Read-only access | Overrides the settings above with read-only | Low | Managers, wall displays, auditors |
| REST API access | API key access; users read the Objects endpoint only, admins have full access | Keys in scripts become long-lived secrets | Integration accounts, reporting |
| Configuration Manager access | None, Login, Limited or Full access to the Core Configuration Manager | Full access edits commands and macros directly | Platform owners |
Can access advanced features and full Configuration Manager access are the quiet privilege escalations: a check command runs as the monitoring service account on the server, and on the monitored host as whatever account the check authenticates with. Treat them as admin-equivalent in access reviews. Keep the number of Admin users small (two to four named people is typical), each with a separate day-to-day User account, and protect them with 2FA. For the wider model see the Privileged Access Management Guide.
Operating system access matters as much as web access. Anyone with root or the nagios account on the server can read configuration files, user macros and the SSH private key. Limit shell access to platform owners, use keys or certificates for SSH, and follow the OpenSSH Server Hardening Guide and the Linux Server Hardening Guide for the host itself.
Integrations, API tokens and service accounts
This is where a monitoring server differs from most applications: it is a credential store for other systems. The Nagios redundancy and security planning document lists the secrets each check method uses. Inventory them as non-human identities with an owner, scope and rotation date.
| Check method | Secret held on or by the server | Least-privilege setting | Rotation note |
|---|---|---|---|
| SSH (check_by_ssh) | Private key, documented at /home/nagios/.ssh/id_rsa | Key kept on the XI server only; a dedicated unprivileged account on each target, with forced commands where possible | Update known_hosts on targets when the key changes |
| SNMP v1/v2c | Community string (rocommunity) | Read-only, restricted to the XI server address or subnet | Keep old and new configured until every device is updated |
| SNMPv3 | User, auth and privacy keys | SHA authentication and AES privacy; read-only user created with net-snmp-create-v3-user -ro | Update MRTG files in /etc/mrtg/conf.d/ after changes |
| WMI | Windows account password | Dedicated account (Nagios uses a wmiagent example), stored in an auth file or user macro | Changing it breaks every check until updated |
| NRPE | TLS client certificates | only_from in xinetd, ssl_client_certs with certificates from a common CA | Reissue certificates before expiry |
| NCPA | community_string (token) | Treat as a secret; restrict listener to the XI server | Agents using the old token stop reporting |
| NRDP and NRDS | authorized_tokens | Only the tokens in use | Run old and new tokens side by side, then remove the old one |
| NSCA and NSClient++ | Shared password, allowed hosts | Strong password; only_from or allowed hosts set to the XI server | Coordinate change across all agents |
| REST API | Per-user API key | A dedicated User-level account with REST API access for each integration; Config and System sections are admin only | Rotate when a holder leaves or a script repository is exposed |
Practical rules for these identities:
- Use user macros, not literals. Nagios recommends storing usernames, passwords and tokens in user macros on the server, so a rotation changes one value rather than hundreds of service definitions. Restrict file permissions on the resource file that holds them.
- Scope each check account to monitoring. A Windows check account should not be a domain administrator; a Linux SSH account should not have sudo to a shell. See How to find service accounts with Domain Admin rights for a quick test of the Windows side.
- Find where the monitoring key is trusted. The public half of the check_by_ssh key often sits in authorized_keys across hundreds of servers. See How to Find ssh authorized keys across a server fleet.
- Pass API keys safely. The XI REST API takes the key as an
apikeyquery parameter, so call it only over HTTPS and keep web server logs that record full URLs under the same protection as the key. - Move secrets to a vault where you can. Where check scripts can fetch credentials at run time, a secrets manager reduces what sits on disk. See the Secrets Management Guide.
SNMP itself has its own hardening path, from community strings to SNMPv3 with authPriv; the SNMP Security Guide covers it in depth.
Logging and detection
Log three layers: the Nagios application, the web server in front of it, and the operating system. Nagios staff state the XI audit log is an Enterprise edition feature that can be forwarded to Nagios Log Server; wherever it lands, forward it to your SIEM as well so a server administrator cannot erase the only copy.
| Signal | Source | Why it matters |
|---|---|---|
| New user, role change, Admin level granted | XI audit log | Persistence and privilege escalation inside the console |
| Check command or user macro edited | XI audit log, Core Configuration Manager changes | A changed command executes on the server and on targets |
| Mass downtime scheduled or notifications disabled | XI audit log, Event Log | Classic way to hide activity on monitored hosts |
| Monitoring engine stopped or restarted out of hours | Event Log, systemd journal | Blinds detection |
| Login failures, 2FA failures, logins from new networks | XI audit log, web server logs | Password spraying and stolen credential use (ATT&CK T1078) |
| Unexpected requests to API or upload paths | Web server access and error logs | Exploitation attempts on the console (T1190) |
| Interactive SSH into targets with the monitoring account | Target auth logs | The monitoring key used for lateral movement (T1021.004) |
| Reads of configuration or key files by unexpected processes | auditd or file integrity monitoring | Credential harvesting from files (T1552.001) |
The monitoring account is predictable: it connects from one address, on a schedule, and runs the same commands. That makes deviations easy to alert on. An interactive shell, a new source address or a command outside the check set from the monitoring account on any target should page someone. The Linux SSH and Authentication Log Detection Guide and How to detect interactive logons by service accounts give the detection logic.
Metrics that show the hardening is holding:
- Admin count: number of Admin-level accounts and accounts with advanced features or full Configuration Manager access (target: a small, named list reviewed quarterly).
- 2FA coverage: percentage of interactive users with 2FA enforced (target: 100% of admins).
- Patch latency: days from a Nagios security release to production upgrade.
- Credential age: age of the oldest monitoring credential (SSH key, community string, WMI password, token) against your rotation policy.
- Owned identities: percentage of monitoring credentials with a named owner and documented scope.
- Alert test: time to detect a test interactive logon by the monitoring account on a target.
Hardening baseline
Roll out in phases. Start with the changes that close the largest exposure and have the least chance of breaking checks, test credential changes on a small host group, and keep the previous configuration backed up so you can roll back.
- Exposure and patching (week 1): confirm the web interface is not reachable from the internet; put it behind a VPN or management network and a host firewall that allows HTTPS only from administrator networks. Upgrade to the current release and subscribe to the Nagios Security Disclosures page. Apply operating system and PHP updates from the distribution, which Nagios has called out in urgent notices.
- Defaults and secrets on the box (week 1): change installation defaults. The Nagios document on changing default passwords lists the Linux root account, the MySQL or MariaDB root account and database accounts such as ndoutils, nagiosql and nagiosxi, and the configuration files (for example config.inc.php and xi-sys.cfg) that must be updated with each new password. On older releases, reset the component and sub-system credentials that Nagios suggests resetting after install or after a breach.
- Transport (week 2): enable HTTPS for the console with a trusted certificate, set the External URL to the hostname, and switch LDAP or AD integration from None to SSL or TLS.
- Authentication (week 2): move people to directory accounts, enable 2FA (email token or Duo), keep local login for two named break-glass admins stored in your PAM vault, and leave Automatic Login off.
- Authorisation (week 3): review every user against the security settings table; remove Admin from anyone who does not administer the platform; on 2026R2 and later, define Roles for NOC, on-call, engineer and read-only and assign through them.
- Check credentials (weeks 3 to 6): inventory every credential the server uses, move literals into user macros, scope accounts to read-only, move SNMP to v3 authPriv, restrict agents to the XI server address, and rotate using the overlap method (old and new both valid until all agents update).
- Logging (week 4): forward the audit log, web server logs and auth logs to the SIEM and build the alerts in the detection table.
- Resilience (ongoing): back up configuration and database, reserve the server address in agent allow lists so a restored server is not blocked, and test a restore at least yearly.
Decision guidance. A small organisation with one monitoring server and a single administrator should prioritise steps 1 to 4 and keep the check accounts few and well scoped; vaulting can wait. A large organisation with multiple monitoring servers, managed service providers or multi-tenant views should treat steps 5 and 6 as a programme, use Roles, integrate with PAM for admin sessions, and segment monitoring servers per security zone so a single compromise cannot reach every tier. Agent-based checks (NCPA, NRPE with certificates) reduce the number of reusable passwords on the server compared with agentless checks over SSH or WMI, at the cost of deploying and patching agents. Where an outsourced team also runs remote management tooling, apply the same thinking from the RMM Tool Security Guide.
Common misconfigurations
- Console on the internet: the web interface published for convenience, often with an old release. Restrict it to management networks and keep it patched.
- Everyone is Admin: NOC staff given Admin to save time, gaining the ability to edit check commands and security credentials. Use the User level with targeted settings or Roles.
- Defaults left in place: database and operating system passwords from installation documentation never changed. Change them on day one and record the new values in the vault.
- SNMP v2c with a guessable community: read access to configuration MIBs on network devices (ATT&CK T1602.001). Move to SNMPv3 and restrict by source address.
- API keys in scripts and URLs: admin API keys pasted into automation repositories and visible in proxy logs. Issue User-level keys per integration and rotate them when exposed.
Framework mapping
| Control area | NIST SP 800-53 Rev 5 | NIST CSF 2.0 | MITRE ATT&CK technique addressed |
|---|---|---|---|
| Least privilege for users and check accounts | AC-6 | PR.AA-05 | T1078 Valid Accounts |
| 2FA and directory authentication | IA-2 | PR.AA-05 | T1078 Valid Accounts |
| Credential storage and rotation | IA-5 | PR.AA-05 | T1552.001 Credentials In Files |
| Hardening baseline and least functionality | CM-6, CM-7 | PR.PS-01 | T1602.001 SNMP (MIB Dump) |
| Patching the console and host | SI-2 | PR.PS-02 | T1190 Exploit Public-Facing Application |
| Encrypted console, LDAP and agent traffic | SC-8 | PR.DS-02 | T1021.004 SSH (key misuse) |
| Audit logging and review | AU-2, AU-6 | DE.CM-01 | T1072 Software Deployment Tools |
Practitioner checklist
- Web console reachable only from management networks, on the current Nagios release, over HTTPS.
- Installation default passwords for operating system and database accounts changed and vaulted.
- Admin level held by a short named list; advanced features and full Configuration Manager access treated as admin-equivalent.
- Directory authentication over SSL or TLS, 2FA on for all interactive users, local fallback only for break-glass accounts.
- Automatic Login off, or limited to a read-only user on a controlled network.
- Every check credential inventoried with owner, scope and rotation date, held in user macros or a vault.
- Check accounts scoped to monitoring: no domain admin, no unrestricted sudo, SNMP read-only on v3.
- Agents and listeners restricted to the monitoring server address.
- Audit, web and auth logs in the SIEM with alerts for admin grants, command edits, mass downtime and interactive use of the monitoring account.
- Configuration and database backups tested, with the server address reserved in agent allow lists.
Standards and references
- Nagios: Understanding User Rights in Nagios XI
- Nagios: Nagios XI Redundancy and Security Planning
- Nagios: Authenticating and Importing Users in Nagios XI
- Nagios: Using DUO Two Factor Authentication in Nagios XI
- Nagios: Changing Default Passwords in Nagios XI
- Nagios: Accessing and Using the XI REST API
- Nagios: Security Disclosures
- NIST: SP 800-53 Rev. 5 Security and Privacy Controls
Related NHI Mgmt Group resources: SNMP Security Guide · Secrets Management Guide · Privileged Access Management Guide · OpenSSH Server Hardening Guide