Unix/Linux Go Back    


Infrastructure Monitoring Forum for Nagios, Zabbix and other network monitoring and management tools.

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

Infrastructure Monitoring


Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 05-10-2017
rgouette's Unix or Linux Image
rgouette rgouette is offline
Registered User
 
Join Date: Sep 2006
Last Activity: 22 May 2017, 9:00 AM EDT
Location: Maine
Posts: 10
Thanks: 1
Thanked 2 Times in 1 Post
(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..
Sponsored Links
    #2  
Old Unix and Linux 05-10-2017
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 22 September 2017, 5:42 PM EDT
Location: Saskatchewan
Posts: 22,417
Thanks: 1,126
Thanked 4,235 Times in 3,915 Posts
Please use code tags for code, that is the Linux button.
Sponsored Links
    #3  
Old Unix and Linux 05-10-2017
rgouette's Unix or Linux Image
rgouette rgouette is offline
Registered User
 
Join Date: Sep 2006
Last Activity: 22 May 2017, 9:00 AM EDT
Location: Maine
Posts: 10
Thanks: 1
Thanked 2 Times in 1 Post
Quote:
Originally Posted by Corona688 View Post
Please use code tags for code, that is the Linux 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
The Following 2 Users Say Thank You to rgouette For This Useful Post:
Corona688 (05-10-2017), drl (05-11-2017)
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Nagios check dependent on second nagios server eugenes18t Infrastructure Monitoring 1 06-21-2013 05:23 PM
SSL3_GET_SERVER_CERTIFICATE:certificate verify failed error rupeshkp728 UNIX for Dummies Questions & Answers 1 06-17-2013 12:51 AM
Nagios Error HashB Infrastructure Monitoring 1 09-16-2012 04:20 PM
configure nrpe and nagios error zhengsenlin Infrastructure Monitoring 0 12-20-2009 07:54 PM



All times are GMT -4. The time now is 07:41 PM.