Page 1 of 1

Adding Windows Servers

Posted: Thu Apr 23, 2015 11:09 am
by holmesy
Hello

Just doing a demo, and running into problems

Sorry, I have zero Linux skills so guessing this might be a bit difficult, but always willing to learn.

Basically I managed to install the NSclient++ onto one windows server and then add in the interface and no issues. I then went ot add a 2nd / 3rd etc etc and cannot get it to work.

The agent installs ok, but when I try to add through the web interface it just fails

Error I can get out of it is...service has no hosts and/or service_description

wondered if anyone can help please?

Thanks, Dan

Re: Adding Windows Servers

Posted: Thu Apr 23, 2015 12:21 pm
by jolson
Dan,

If I understand correctly, you have installed NSClient on to Windows Server 1 with no issues, and everything is working fine.

But when you add additional interfaces (network interfaces?) through the Web GUI, you get the error message "service has no hosts and/or service_description" when you try to apply configuration.

What exactly are you trying to do - add an additional Windows Server (2, 3), or add additional interfaces to an existing Windows Server?

If you're adding additional interfaces, it looks like the service that you have defined in the Web GUI does not have a host/service description. Please navigate to 'Configure -> Core Config Manager -> Services and look for the service mentioned - make sure that you have given it a host and a service description.

Re: Adding Windows Servers

Posted: Thu Apr 23, 2015 12:27 pm
by holmesy
Hi, thanks for your reponse

I am trying to add additional windows servers

I do exactly the same process, install the client and then configure through the web UI, but then it just errors

I think something is broken as I can't seem to update my original windows server either.

Thanks

Re: Adding Windows Servers

Posted: Thu Apr 23, 2015 1:16 pm
by jolson
Could you please navigate to the Nagios CLI and run the following:

Code: Select all

cd /usr/local/nagiosxi/scripts/
./reconfigure_nagios.sh
Please report the output to this forum. Thanks!

Re: Adding Windows Servers

Posted: Thu Apr 23, 2015 2:05 pm
by holmesy
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://loca lhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'subm it=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=' -O nagiosql.login--2015-04-23 19:01:59-- http://localhost/nagiosxi/includes/compon ents/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”

[ <=> ] 11,252 --.-K/s in 0.01s

2015-04-23 19:01:59 (1.11 MB/s) - “nagiosql.login” saved [11252]

LOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: http://localhost/nagiosxi/includes/components/ccm/
Array
(
)
SETUID ROOT OK
RESETTING PERMS
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://loca lhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'subm it=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=' -O nagiosql.login--2015-04-23 19:01:59-- http://localhost/nagiosxi/includes/compon ents/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.login”

[ <=> ] 11,252 --.-K/s in 0.008s

2015-04-23 19:01:59 (1.28 MB/s) - “nagiosql.login” saved [11252]

LOGIN SUCCESSFUL!
URL: http://localhost/nagiosxi/includes/components/ccm/
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosxi/includes /components/ccm/ --no-check-certificate --post-data 'cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2015-04-23 19:02:00-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... ::1, 127.0.0.1
Connecting to localhost|::1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “nagiosql.export.monitoring”

[ <=> ] 14,268 51.8K/s in 0.3s

2015-04-23 19:02:00 (51.8 KB/s) - “nagiosql.export.monitoring” saved [14268]

WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributo rs
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL

Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Service has no hosts and/or service_description (config file '/usr/local/ nagios/etc/services/RYRAS075.cfg', starting on line 16)
Error processing object config files!


***> One or more problems was encountered while processing the config files...

Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
RET: 1
/usr/local/nagiosxi/nom/checkpoints/nagioscore/errors /usr/local/nagiosxi/script s
tar: Removing leading `/' from member names
/usr/local/nagiosxi/scripts
LATEST NOM SNAPSHOT: /usr/local/nagiosxi/nom/checkpoints/nagioscore/1429777665.t ar.gz
/ /usr/local/nagiosxi/scripts
RESTORING NOM SNAPSHOT : /usr/local/nagiosxi/nom/checkpoints/nagioscore/14297776 65.tar.gz
/usr/local/nagiosxi/scripts
SETUID ROOT OK
RESETTING PERMS
[root@localhost scripts]# h

Re: Adding Windows Servers

Posted: Thu Apr 23, 2015 2:11 pm
by jolson
Does the following file exist? /usr/local/ nagios/etc/services/RYRAS075.cfg

On the Linux CLI:

Code: Select all

cat /usr/local/nagios/etc/services/RYRAS075.cfg
Does RYRAS075 exist in the Core Config Manager -> Services in the XI GUI? It should appear in this dropdown:
2015-04-23 14_16_24-Nagios XI - Nagios Core Config Manager.png
If so, please check the files that appear for missing hosts/service descriptions.

Re: Adding Windows Servers

Posted: Thu Apr 23, 2015 2:20 pm
by holmesy
Does not exists in the CLI, but yes its in the dropdown in the GUI

Re: Adding Windows Servers

Posted: Thu Apr 23, 2015 2:21 pm
by jolson
Please select it in the dropdown box in the GUI, and look through the services that show up. If you can find a service that does not have a host, that is the service causing problems - please add a host to it or delete it entirely.

Re: Adding Windows Servers

Posted: Thu Apr 23, 2015 2:35 pm
by holmesy
that's worked, thanks

it put all the others in aswell that I tried since

So do you know what / why that happened?

Thanks

Re: Adding Windows Servers

Posted: Thu Apr 23, 2015 2:48 pm
by jolson
Every service that is defined needs to have a host.

If you define a service and don't give it a host, apply configuration will fail out with an error message as you described. The fix is to go into that service and assign a host.

I'm glad to hear that your system is working now - if you have any further trouble/questions, please feel free to open a new thread on the forums. Thanks!