Why Nagios shows more memory than the real?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
User avatar
rhassing
Posts: 412
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Why Nagios shows more memory than the real?

Post 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
        }
Rob Hassing
Image
xerez
Posts: 77
Joined: Wed Apr 22, 2015 7:50 am

Re: Why Nagios shows more memory than the real?

Post 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
        }
User avatar
rhassing
Posts: 412
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: Why Nagios shows more memory than the real?

Post 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$
        }
Rob Hassing
Image
xerez
Posts: 77
Joined: Wed Apr 22, 2015 7:50 am

Re: Why Nagios shows more memory than the real?

Post 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!
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Why Nagios shows more memory than the real?

Post by tgriep »

Under this section
[/settings/NRPE/server]

Make sure these settings are there.

Code: Select all

use ssl = true
allowed ciphers = ADH
Be sure to check out our Knowledgebase for helpful articles and solutions!
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Why Nagios shows more memory than the real?

Post 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]
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
xerez
Posts: 77
Joined: Wed Apr 22, 2015 7:50 am

Re: Why Nagios shows more memory than the real?

Post 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!!
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: Why Nagios shows more memory than the real?

Post by jolson »

xerez,

No problem. Would it be fine if we locked this thread?
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
xerez
Posts: 77
Joined: Wed Apr 22, 2015 7:50 am

Re: Why Nagios shows more memory than the real?

Post by xerez »

Yes, thanks for your help!
Locked