Page 2 of 2

Re: Why Nagios shows more memory than the real?

Posted: Wed May 13, 2015 7:25 am
by rhassing
what happens if you'd do:

Code: Select all

# 'check_mem_win' command definition
define command{
        command_name    check_mem_win
        command_line    $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ -C public -m ^[P] -w 90 -c 95
        }

Re: Why Nagios shows more memory than the real?

Posted: Wed May 13, 2015 7:43 am
by xerez
It works too: Physical Memory: 54%used(692MB/1278MB) (<90%) : OK

But the arguments passed for windows.cfg still not work:

Code: Select all

define service{
        use                     generic-service
        host_name               <host name>
        service_description     Memory Usage
#       check_command           check_nt!MEMUSE!-w 90 -c 95
        check_command           check_mem_win!80!85
        }

Re: Why Nagios shows more memory than the real?

Posted: Wed May 13, 2015 7:48 am
by rhassing
Than you should change it as follows:

Code: Select all

# 'check_mem_win' command definition
define command{
        command_name    check_mem_win
        command_line    $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ -C public -m ^[P] -w $ARG1$ -c $ARG2$
        }

Re: Why Nagios shows more memory than the real?

Posted: Wed May 13, 2015 8:04 am
by xerez
Works perfect! Thanks you very much!

Now I will like try with NRPE. I hope that you help me with that error:

Code: Select all

CHECK_NRPE: Error - Could not complete SSL handshake.
If in nsclient.ini I change:

Code: Select all

use ssl = true 
To:

Code: Select all

use ssl = false
And I execute:

Code: Select all

nagios@localhost:/usr/local/nagios/libexec$ ../../libexec/check_nrpe -H <host ip> -n
I (0.4.3.131 2015-02-15) seem to be doing fine...
Works!

I need anything in Windows for it works with SSL?

Thanks!

Re: Why Nagios shows more memory than the real?

Posted: Wed May 13, 2015 4:06 pm
by tgriep
Under this section
[/settings/NRPE/server]

Make sure these settings are there.

Code: Select all

use ssl = true
allowed ciphers = ADH

Re: Why Nagios shows more memory than the real?

Posted: Wed May 13, 2015 4:08 pm
by jolson
tgrieps answer is likely correct. Here is a working example nsclient.ini file for comparison:

Code: Select all

[/settings/default]
allowed hosts = nagios.server.ip.address
password = somepass

[/modules]
NSClientServer = 1
CheckSystem = 1
CheckDisk = 1
NRPEServer = 1
CheckExternalScripts=enabled

[/settings/NRPE/server]
use ssl = 1
payload length = 1024
allow nasty characters = false
allowed ciphers = ADH
ssl = 1
allow arguments = 1
insecure = 1

[/settings/external scripts/scripts]

Re: Why Nagios shows more memory than the real?

Posted: Thu May 14, 2015 3:17 am
by xerez
The configuration of jolson works perfect. I tried commenting and uncommenting the options of [/settings/NRPE/server] and finally, I needed add:

Code: Select all

use ssl = true
allowed ciphers = ADH
And comment:

Code: Select all

;verify mode = peer-cert
Thanks!!

Re: Why Nagios shows more memory than the real?

Posted: Thu May 14, 2015 9:36 am
by jolson
xerez,

No problem. Would it be fine if we locked this thread?

Re: Why Nagios shows more memory than the real?

Posted: Mon May 18, 2015 3:21 am
by xerez
Yes, thanks for your help!