Service checks in Nagios Core turn a host into a list of monitored applications, ports, resources, and metrics. When one of those checks is retired, removing its service object keeps status views and notifications from tracking something that should no longer exist.
Nagios Core identifies a service by the combination of host_name and service_description. The object can live in a host-specific file, a shared object file, or a directory included by cfg_file and cfg_dir entries from nagios.cfg, so find the source definition before deleting anything.
The removed check should disappear while the host and unrelated services remain loaded. A clean pre-flight check, a reload, and an absent service entry in the runtime object cache or web Services view confirm that the retired check is gone without breaking the rest of the host.
$ sudo grep --recursive --line-number "service_description.*HTTP" /etc/nagios4/conf.d /etc/nagios4/objects /etc/nagios4/objects/localhost.cfg:156: service_description HTTP
Use the object paths loaded by the local nagios.cfg file. Source installs commonly use paths below /usr/local/nagios/etc instead of the packaged /etc/nagios4 layout.
Related: How to add a Nagios Core object configuration directory
define service { use local-service ; Name of service template to use host_name localhost service_description HTTP check_command check_http notifications_enabled 0 }
Do not delete the host object or a shared object file when only one service is retired. Remove only the matching define service block unless every definition in that file belongs to the retired service.
$ sudo mkdir --parents /root/nagios-config-backups
$ sudo cp --archive /etc/nagios4/objects/localhost.cfg /root/nagios-config-backups/
$ sudoedit /etc/nagios4/objects/localhost.cfg
$ sudo grep --recursive --line-number "service_description.*HTTP" /etc/nagios4/conf.d /etc/nagios4/objects
No output means the configured object files no longer contain that service_description value.
$ sudo nagios4 -v /etc/nagios4/nagios.cfg Nagios Core 4.4.6 ##### snipped ##### Reading configuration data... Read main config file okay... Read object config files okay... Running pre-flight check on configuration data... Checking objects... Checked 7 services. Checked 1 hosts. Checked 1 host groups. ##### snipped ##### Total Warnings: 0 Total Errors: 0 Things look okay - No serious problems were detected during the pre-flight check
Do not reload Nagios Core while Total Errors is greater than 0. Fix the first reported object, dependency, escalation, or command reference before applying the removal.
$ sudo systemctl reload nagios4
Ubuntu and Debian package installs use the nagios4 unit. Source installs may use another service name, an init script, or a direct SIGHUP reload.
Related: How to manage the Nagios Core system service
$ sudo grep --line-number "service_description.*HTTP" /var/lib/nagios4/objects.cache
No output means the cache used by the Nagios Core CGIs no longer includes the HTTP service. Use the local object_cache_file path from nagios.cfg when it differs.
$ sudo grep --line-number "service_description.*Current Load" /var/lib/nagios4/objects.cache 1031: service_description Current Load
Refresh the web Services view after the reload if operators use the UI for final confirmation. The retired service should be absent, while the host's remaining services should still appear.