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

 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications Infrastructure Monitoring (Nagios)printer error on verify...WHY??
# 1  
Old 05-10-2017
(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 12:27 PM..
# 2  
Old 05-10-2017
Please use code tags for code, that is the Image button.
# 3  
Old 05-10-2017
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 Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Infrastructure Monitoring

Nagios Availability report for all hosts giving internal error

Hi, I'n new to Nagios, however have installed Nagios Core and monitoring about 19000 switches. They are all grouped into 6 host groups. when i try to pull out a report of a particular hostgroup i get the report but when i try for all hostgroups, i get an error that says: Internal Server Error. ... (1 Reply)
Discussion started by: Nida
1 Replies

2. Infrastructure Monitoring

Nagios check dependent on second nagios server

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... (1 Reply)
Discussion started by: eugenes18t
1 Replies

3. UNIX for Dummies Questions & Answers

SSL3_GET_SERVER_CERTIFICATE:certificate verify failed error

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'... (1 Reply)
Discussion started by: rupeshkp728
1 Replies

4. Infrastructure Monitoring

Nagios Error

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... (1 Reply)
Discussion started by: HashB
1 Replies

5. UNIX and Linux Applications

NRPE check_disk error [nagios,solaris]

Good morning folks, I'm having a problem with check_disk with mounted 3TB volumes. It appears that the value being returned by stavfs is too large to be processed by the check_disk plugin. Does anyone know of an updated check_disk plugin? Solaris 10: # /usr/local/nagios/libexec/check_disk -w... (0 Replies)
Discussion started by: avronius
0 Replies

6. Infrastructure Monitoring

configure nrpe and nagios error

   (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%... (0 Replies)
Discussion started by: zhengsenlin
0 Replies

7. Infrastructure Monitoring

Nagios - NRPE configuration error

HI guyz, I have a nagios 3.0.6 server which is running on fedora 5. I had already added some windows clients and monitoring it. Now i want to add a unix client. Steps done till now : - 1.nagios-plugins-1.4.13 was installed and configured. 2.unzipped and untarred the NRPE 2.8 3.I gave a... (0 Replies)
Discussion started by: Renjesh
0 Replies

8. Linux

Error While retriving Host details from Nagios

Whoops! Error: Could not read object configuration data! Here are some things you should check in order to resolve this error: 1. Verify configuration options using the -v command-line option to check for errors. 2. Check the Nagios log file for messages relating to startup or... (0 Replies)
Discussion started by: manian_balu
0 Replies
Login or Register to Ask a Question