I have followed this guide since I would like to learn some nagios.
It was working then and I could login and see the localhost at the start.
Then I wanted to add another host to be monitored. Another Raspberry pi. I just wanted a simpel ping.
Then I messed up !
What did I do ? I tried to add a jessie.cfg. I wanted to do simpel ping to see if my jessei was alive.
in my nagios.cfg I added
# 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/jessie.cfg
this did not work !
When I do
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Code: Select all
]
Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Template 'generic-contact' specified in contact definition could not be not found (config file '/usr/local/nagios/etc/objects/contacts.cfg', starting on line 29)
Error processing object config files!
Code: Select all
# Just one contact defined by default - the Nagios admin (that's you)
# This contact definition inherits a lot of default values from the 'generic-contact'
# template which is defined elsewhere.
define contact{
contact_name nagiosadmin ; Short name of user
use generic-contact ; Inherit default values from generic-contact template (defined above)
alias Nagios Admin ; Full name of user
email @nagios@@localhost ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
}
Code: Select all
[1542924786] qh: Socket '/usr/local/nagios/var/rw/nagios.qh' successfully initialized
[1542924786] qh: core query handler registered
[1542924786] nerd: Channel hostchecks registered successfully
[1542924786] nerd: Channel servicechecks registered successfully
[1542924786] nerd: Channel opathchecks registered successfully
[1542924786] nerd: Fully initialized and ready to rock!
[1542924786] wproc: Successfully registered manager as @wproc with query handler
[1542924786] wproc: Registry request: name=Core Worker 311;pid=311
[1542924786] wproc: Registry request: name=Core Worker 314;pid=314
[1542924786] wproc: Registry request: name=Core Worker 312;pid=312
[1542924786] wproc: Registry request: name=Core Worker 313;pid=313
[1542924786] wproc: Registry request: name=Core Worker 310;pid=310
[1542924786] wproc: Registry request: name=Core Worker 315;pid=315
[1542924786] Error: Template 'generic-contact' specified in contact definition could not be not found (config file '/usr/local/nagios/etc/objects/contacts.cfg', starting on line 29)
[1542924786] Bailing out due to one or more errors encountered in the configuration files. Run Nagios from the command line with the -v option to verify your config before restarting. (PID=295)
[1542924786] Event broker module 'NERD' deinitialized successfully.
Command me, dark lords
I am running Raspbian GNU/Linux 9.6 (stretch)