(Nagios)printer error on verify...WHY??

Login or Register to Reply

 
Thread Tools Search this Thread
# 1  
(Nagios)printer error on verify...WHY??

Issue: upon running -
Code:
$ sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

I'm receiving:
Code:
Error: Could not find any hostgroup matching 'network-printers' (config file '/usr/local/nagios/etc/printers/NC_FrontOffice.cfg', starting on line 10)
Error: Failed to process hostgroup names for host 'NC_FrontOffice' (config file '/usr/local/nagios/etc/printers/NC_FrontOffice.cfg', starting at line 10)
   Error processing object config files!

nagios.cfg:
Code:
# OBJECT CONFIGURATION FILE(S)
# These are the object configuration files in which you define hosts,
# host groups, contacts, contact groups, services, etc.
# You can split your object definitions across several config files
# if you wish (as shown below), or keep them all in a single config file.

# You can specify individual object config files as shown below:
cfg_file=/usr/local/nagios/etc/objects/commands.cfg
cfg_file=/usr/local/nagios/etc/objects/contacts.cfg
cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg
cfg_file=/usr/local/nagios/etc/objects/templates.cfg

# Definitions for monitoring the local (Linux) host
#cfg_file=/usr/local/nagios/etc/objects/localhost.cfg

# Definitions for monitoring a Windows machine
cfg_file=/usr/local/nagios/etc/objects/windows.cfg

# Definitions for monitoring a router/switch
cfg_file=/usr/local/nagios/etc/objects/switch.cfg

# Definitions for monitoring a network printer
# cfg_file=/usr/local/nagios/etc/objects/printer.cfg


# You can also tell Nagios to process all config files (with a .cfg
# extension) in a particular directory by using the cfg_dir
# directive as shown below:

cfg_dir=/usr/local/nagios/etc/servers
cfg_dir=/usr/local/nagios/etc/printers
cfg_dir=/usr/local/nagios/etc/switches
# cfg_dir=/usr/local/nagios/etc/routers


Printer Config file in question:
Code:
define host{
	use		generic-printer		; Inherit default values from a template
	host_name	NC_FrontOffice 		; The name we're giving to this printer
	alias		NC_FrontOffice 		; A longer name associated with the printer
	address		10.4.0.30		; IP address of the printer
	hostgroups	network-printers 	; Host groups this printer is associated with
	}

The interesting thing for me is, you'd wonder, "does he have an entry in 'hostgroups.cfg'?
I'm not even using that file, as you can see from nagios.cfg

What changed: I moved all my printer definitions from printer.cfg, to individual .cfg files.
The printer.cfg file only contained printer definitions...no hostgroup definitions, etc

Thoughts?

Thanks ,
Rich

Last edited by rgouette; 05-10-2017 at 11:27 AM..
# 3  
Quote:
Originally Posted by Corona688
Please use code tags for code, that is the Image button.


better?

---------- Post updated at 12:48 PM ---------- Previous update was at 11:27 AM ----------

Disregard post: I found my problem.

I wasn't using the printer.cfg file, and I WAS for servers, which explains why
server group is fine, and printers weren't.

The hostgroup definitions were found in those config files, so now
printers have a valid hostgroup name reference.

cheers,
Rich
These 2 Users Gave Thanks to rgouette For This Post:
Login or Register to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Nagios check dependent on second nagios server
eugenes18t
We have a dual Nagios server setup. One is setup for internal server monitoring on our LAN, while the second Nagios server is hosted externally and is used for external checks only such as URL and ping checks form the WAN side. I was wondering if there is any way to setup cross dependencies...... Infrastructure Monitoring
1
Infrastructure Monitoring
SSL3_GET_SERVER_CERTIFICATE:certificate verify failed error
rupeshkp728
I was building my code base firing ./configure and it gave me error: configure: error: "audit system headers required (PKG: audit-devel)" I tried installing audit-devel # zypper in audit-devel It now gives me new error: Restoring system sources... Please insert media # 1 and type 'y'...... UNIX for Dummies Questions & Answers
1
UNIX for Dummies Questions & Answers
Nagios Error
HashB
Im new to monitoring so i was testing few monitoring tools and I've had this problem with nagios, i downloaded the Nagios XI VM and im using virtualbox to run it and when i reach the GRUB i get this Error 16 : inconsistent file system structure, i have tried troubleshooting the problem but i...... Infrastructure Monitoring
1
Infrastructure Monitoring
configure nrpe and nagios error
zhengsenlin
   (1)check the service of nrpe   # libexec/check_nrpe -H 59.26.240.63   NRPE v2.8.1    (2)check the resource of nrpe's host   # libexec/check_nrpe -H 59.26.240.63 -c check_df   DISK OK - free space: / 8241 MB (77% inode=98%); /var 5239 MB (95% inode=99%); /usr 11971 MB (86%...... Infrastructure Monitoring
0
Infrastructure Monitoring