Page 1 of 1

Nagios restart fail after mod of windows.cfg

Posted: Wed Oct 10, 2012 4:29 am
by roadrunner
Hello,

This is my very first try with nagios and here's the problem. I use a fedora 17 server. Yum install nagios was fine, and i've installed all the plugins (i know, this is certainly not usefull nor clever...). It works fine so far, since i can access to the nagios web page and see my localhost. So go further and installed nsc++ on a windows computer i want to monitor. The installation on the windows side seems to be fine, i've downed the windows firewall so i can access (theorically) the win computer from the fedora server. I've uncommented the line

cfg_file=/etc/nagios/objects/windows.cfg

and have the following windows.cfg file :

define host{
use windows-server ; Inherit default values from a template
host_name xxx-win ; The name we're giving to this host
alias xxxWindows ; A longer name associated with the host
address xx.yy.zz.tt ; IP address of the host
}

# Define a hostgroup for Windows machines
# All hosts that use the windows-server template will automatically be a member of this group

define hostgroup{
hostgroup_name windows-server ; The name of the hostgroup
alias xxx ; Long name of the group
}

# Create a service for monitoring the version of NSCLient++ that is installed
# Change the host_name to match the name of the host you defined above

define service{
use generic-service
host_name winserver
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}

But when i restart nagios, i have this :
service nagios restart
Restarting nagios (via systemctl): Job failed. See system journal and 'systemctl status' for details.

the nagios.log gives me this :
Caught SIGTERM, shutting down...
Successfully shutdown... (PID=30788)

Moreover, but i don't know if it's linked, i can't access the windows server with the check_nt...

/usr/lib/nagios/plugins/check_nt -H xx.yy.zz.tt -v CLIENTVERSION -p 12489 -s password

I'm sure i've entered the password during the win§client configuration, and type it the right way when trying to check on the fedora side...

Doed anyone see where i've made mistakes ?
TIA
R

Re: Nagios restart fail after mod of windows.cfg

Posted: Wed Oct 10, 2012 6:43 am
by roadrunner
I've solved the check with uninstalling the NSClient from the win server and re-install it again... now i can have my fedora talking with my win server... it's a first victory !!! ;)

Re: Nagios restart fail after mod of windows.cfg

Posted: Wed Oct 10, 2012 1:17 pm
by slansing
Good that you got that figured out, was it that you had the check_nt box not selected when you installed NSClient++? If that was the issue you could have fixed that by enabling it in the NSCP.ini file. But you got it working which is all that matters, are you still having the

Code: Select all

service nagios restart
issue where it dumps:

Code: Select all

Restarting nagios (via systemctl): Job failed. See system journal and 'systemctl status' for details.

Re: Nagios restart fail after mod of windows.cfg

Posted: Thu Oct 11, 2012 1:55 am
by roadrunner
Yes, i still have the issue, and still can't see where it comes from...

I've lokked at several tutorials, and all of them seem to say the same thing, and my config files seems ok... but there's certainly some mistake done, and as the install was made with yum, i guess the mistake is mine, but i can't figure what i could have done wrong..

Re: Nagios restart fail after mod of windows.cfg

Posted: Thu Oct 11, 2012 3:31 am
by roadrunner
Hi,

I don't have the issue anymore.... I rewrote the config files from scratch, took care in using the right host name everytime, and at that point i got an error already answered in other forums that was about max_attempts. I did not have the line in my config, so i added max_check_attempts 10 in my host definition and the nagios -v /nagios.cfg was ok.. it runs and shows the win server so now i can go for tweaking...

Is there a way to indicate my problem is solved/closed ?
TIA
R

Re: Nagios restart fail after mod of windows.cfg

Posted: Thu Oct 11, 2012 2:23 pm
by slansing
Excellent, yes I will take care of it for you. Welcome to the community!