DGARM Nagios Core - NagiosQL Fix Session Summary
Appearance
Source video: DGARM-Nagios-Core-Fixed-NagiosQL-2026-07-17_11-33-20.mkv-2026-07-17_14-24-09.mkv (31 min)
- Note on this summary: audio in this recording is largely silent screen-share with
- sparse narration, so this summary is reconstructed primarily from on-screen terminal
- and browser content (NagiosQL UI, systemd status, shell commands), cross-checked
- against the few audible exchanges (a NagiosQL login/root-password exchange).
Summary[edit]
Hands-on troubleshooting session fixing the NagiosQL web front-end on host dcprdlmonitor02, working directly at 10.150.24.167/nagiosql/. NagiosQL 3.5.0 acts as the configuration manager (CCM) in front of Nagios Core, per the plan from the kick-off meeting.
Work observed on screen:
- Verified Nagios Core service state via
systemctl status nagios.service— confirmed Nagios Core 4.5.9 active/running, config at/usr/local/nagios/etc/nagios.cfg, worker processes healthy. - Diagnosed a NagiosQL write-permission failure: NagiosQL's *Config targets* page (Administration → Config targets) pointed at base directory
/etc/nagiosql/with subdirectories/etc/nagiosql/hosts/,/etc/nagiosql/services/,/etc/nagiosql/backup/etc. — these directories either didn't exist yet or weren't owned by the web server user, so NagiosQL couldn't write/back up Nagios config files. - Fix applied (via terminal, as root on
dcprdlmonitor02):
<syntaxhighlight lang="bash">
sudo mkdir -p /etc/nagiosql/hosts /etc/nagiosql/services \
/etc/nagiosql/hostgroups /etc/nagiosql/servicegroups
sudo chown -R apache:apache /etc/nagiosql
sudo chmod -R 775 /etc/nagiosql
</syntaxhighlight>
- Confirmed SELinux was not the blocker —
getenforcereturnedDisabled, so no SELinux context/labeling fix was required (this was checked as a possible cause). - Located the NCPA plugin on disk with
locate ncpa, finding/root/nagios-4.5.9/nagios-plugins/plugins-python/check_ncpa.ini— relevant to the Windows-agent monitoring plan discussed in the kick-off meeting. - Used NagiosQL's Configuration Import tool (Administration → Tools → Data import,
admin/import.php) to import existing.cfgobjects from/usr/local/nagios/etc/objects/(commands, contacts, templates, switch, printer, localhost, windows, etc.), with "Overwrite database" checked. NagiosQL's own UI states the required import order:commands → timeperiods → contacttemplates → contacts → contactgroups → hosttemplates → hosts → hostgroups → servicetemplates → services → servicegroups. - The engineer cross-referenced the fix steps with an AI assistant chat open on a second monitor/tab, working through the same "web server user lacks write permission on NagiosQL's config directories" diagnosis in parallel (visible in background, not part of the core walkthrough).
Root cause & fix (for the runbook)[edit]
| Symptom | Root cause | Fix |
|---|---|---|
| NagiosQL can't write/backup Nagios config files ("cannot open/overwrite config file", "cannot backup — source file missing") | /etc/nagiosql/{hosts,services,hostgroups,servicegroups,backup} directories missing or not owned by the web server user
|
mkdir -p the expected directory tree, then chown -R apache:apache + chmod -R 775 on /etc/nagiosql
|
| (Ruled out) SELinux blocking Apache write | N/A — SELinux was already Disabled on this host
|
Only check getenforce/apply semanage fcontext + restorecon if SELinux is Enforcing
|
Source recording[edit]