I've just started configuring Nagios from scratch, and I'm new at this.I've been getting this error after adding objects/printer.cfgError: Could not find any hostgroup matching 'allhosts'(config file '/etc/nagios3/objects/printer.cfg', starting on line 1)    Error processing object config files!And this is the content of the printer.cfgdefine host{        use             generic-host            ; Inherit default values from a template            host_name       Printer_klen    ; The name we're giving to this printer            alias           Printer_klen    ; A longer name associated with the printer            address         10.1.0.45       ; IP address of the printer            hostgroups      allhosts        ; Host groups this printer is associated with            }define service{            use                     generic-service         ; Inherit values from a template            host_name               Printer_klen            ; The name of the host the service is associated with            service_description     Printer Status          ; The service description            check_command           check_Printer_klen!-C public    ; The command used to monitor the service            normal_check_interval   10      ; Check the service every 10 minutes under normal conditions            retry_check_interval    1       ; Re-check the service every minute until its final/hard state is determined            }define service{            use                     generic-service            host_name               Printer_klen            service_description     PING            check_command           check_ping!3000.0,80%!5000.0,100%            normal_check_interval   10            retry_check_interval    1            }
Could not find any hostgroup matching 'allhosts'
debian;nagios
The problemThe error is actually pretty self explanatory. Error: Could not find any hostgroup matching 'allhosts'You have this line in your define host{...} block:hostgroups      allhosts        ; Host groups this printer is associated withSolutionYou need to create a hostgroup called allhosts.In the file /etc/nagios/hostgroups.cfg, most likely, you'll need to add a stanza that defines the hostgroup, allhosts.Exampledefine hostgroup{    hostgroup_name          allhosts    alias               All Hosts}