Page 1 of 2

Porblem installing the Windows Agent

Posted: Wed Jan 21, 2015 9:41 am
by ziedmahjoub
Hello,

i have installed the Nagios core 4.0.8 , and when i'm following this tutorial :
http://nagios.sourceforge.net/docs/3_0/ ... ndows.html

i find a problem with the file nsclient.ini , its said in the tutorial in first step that i must :
" Uncomment all the modules listed in the [modules] section, except for CheckWMI.dll and RemoteConfiguration.dll "

The problem is that when i open that file i don't see the .dll files that are below the section [modules]
i find them like that :

Code: Select all

# If you want to fill this file with all avalible options run the following command:
#   nscp settings --generate --add-defaults --load-all
# If you want to activate a module and bring in all its options use:
#   nscp settings --activate-module <MODULE NAME> --add-defaults
# For details run: nscp settings --help

; Undocumented section
[/modules]

; CheckDisk - CheckDisk can check various file and disk related things. The current version has commands to check Size of hard drives and directories.
CheckDisk = 1

; Event log Checker. - Check for errors and warnings in the event log. This is only supported through NRPE so if you plan to use only NSClient this wont help you at all.
CheckEventLog = 1

; Check External Scripts - A simple wrapper to run external scripts and batch files.
CheckExternalScripts = 1

; Helper function - Various helper function to extend other checks. This is also only supported through NRPE.
CheckHelpers = 1

; Check NSCP - Checkes the state of the agent
CheckNSCP = 1

; CheckSystem - Various system related checks, such as CPU load, process state, service state memory usage and PDH counters.
CheckSystem = 1

; CheckWMI - CheckWMI can check various file and disk related things. The current version has commands to check Size of hard drives and directories.
CheckWMI = 1

; NRPE server - A simple server that listens for incoming NRPE connection and handles them.
NRPEServer = 1

; NSClient server - A simple server that listens for incoming NSClient (check_nt) connection and handles them. Although NRPE is the preferred method NSClient is fully supported and can be used for simplicity or for compatibility.
NSClientServer = 1
So i can't uncomment nothing !!!!
Any solutions ?
thanks

Re: Porblem installing the Windows Agent

Posted: Wed Jan 21, 2015 4:52 pm
by slansing
You should be taking a look at this which is at the top of the .cfg:
# If you want to fill this file with all avalible options run the following command:
# nscp settings --generate --add-defaults --load-all
You will need to open a cmd prompt or powershell terminal, descend to the nsclient installation directory and issue the aforementioned command.

Re: Porblem installing the Windows Agent

Posted: Wed Jan 21, 2015 7:54 pm
by Box293
There have been changes in NSClient++ that aren't reflected in that documentation.

Here are some guides I have which will help:

http://sites.box293.com/nagios/guides/n ... nt/windows

Re: Porblem installing the Windows Agent

Posted: Thu Jan 22, 2015 4:08 am
by ziedmahjoub
Box293 thank you i choosed the version 0.3.9 which is a stable one ,

but look at the output :

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H x.y.w.z

/usr/local/nagios/libexec/check_nrpe no such file or directory

Re: Porblem installing the Windows Agent

Posted: Thu Jan 22, 2015 6:07 am
by ziedmahjoub
By the Way i succeded to monitor one client and its ok , ty box293

but that message above still no solution for it

Re: Porblem installing the Windows Agent

Posted: Thu Jan 22, 2015 6:40 am
by Box293
You will need to install the check_nrpe plugin on your Nagios server, this is not part of the Core install.

http://sites.box293.com/nagios/guides/n ... centos-6-5

Re: Porblem installing the Windows Agent

Posted: Thu Jan 22, 2015 11:35 am
by ziedmahjoub
Box293 , i installed the agent and it worked well and I'm monitoring it , even with the problem above which is :

/usr/local/nagios/libexec/check_nrpe no such file or directory

but i will install the check_nrpe plugin on my Nagios server to solve it . But i got another problem

i have installed the agent version 0.3.9 (32 bits) in a windows XP machine and it worked fine , but when i installed
the same version but in 64 bits in a windows 7 (64 bits) machine it didn't worked ,
i made the configuration but the tray didn't show up and even when i opened the tray.exe it appears in bottom but "offline"

i guess that , maybe the windows 7 machine antivirus is blocking the default port (12489) ?!

Any solution ?

Re: Porblem installing the Windows Agent

Posted: Thu Jan 22, 2015 2:53 pm
by slansing
That tray icon is pretty deprecated by now, at least it was, maybe it's been updated. Have you made sure the nsclient++ service is running? What is the issue you are actually seeing when you try to check it?

Re: Porblem installing the Windows Agent

Posted: Fri Jan 23, 2015 5:26 am
by ziedmahjoub
Yes slansing , i'm sure that the nsclient++ service is running !!
i got this questions :

1-Box293, i tried to install the check_nrpe plugin and when i type this command i got :

Code: Select all

apt-get install openssl-devel
>         Reading package lists... Done
>         Building dependency tree... Done
>         E: Couldn't find package openssl-devel
Any solution ?

2- can someone tell me how when i want to monitor a 2nd windows host , how i must modify this ? :

Code: Select all

define command{
	command_name	check_nt
	command_line	$USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -s PASSWORD -v $ARG1$ $ARG2$
	}
i just need to copy paste and change USER1 to USER2 and another PASSWORD
or just let it and add argument -s PASSWORD2 in the same command_line ???

Re: Porblem installing the Windows Agent

Posted: Fri Jan 23, 2015 12:29 pm
by lgroschen
I think the apt rpm you need is libssl-dev instead of openssl-dev