Page 1 of 3

Memory Usage Graph Issue

Posted: Thu Jun 16, 2016 10:46 am
by Berto
Hello,

I was asked to pull some information from Nagios regarding memory on a few Solaris 10 servers we have and when I run a report no graphs or data is showing up for our Solaris servers. I can create graphs and see data values for the Linux servers but not for any of the Solaris servers.

I've added a screenshot of what I'm seeing for our Solaris servers.

--Berto

Re: Memory Usage Graph Issue

Posted: Thu Jun 16, 2016 1:27 pm
by tgriep
Can you go to that same service and provide a screen capture of the Advanced Tab?
What we need to see is if the check is returning Performance Data and that it is formatted correctly.

Re: Memory Usage Graph Issue

Posted: Thu Jun 16, 2016 4:02 pm
by Berto
I have attached a screenshot of the advanced tab.

Re: Memory Usage Graph Issue

Posted: Thu Jun 16, 2016 4:25 pm
by tgriep
The performance data isn't correct from what I see, none of the values have any valid data except MB which will not graph.
Here is an example of what it should look like.

Code: Select all

Memory usage'=21776.94MB;52335.28;58877.19;0.00;65419.10
Can you post which plugin you are using and the configurations for that service so we can review it?

Re: Memory Usage Graph Issue

Posted: Thu Jun 16, 2016 4:39 pm
by Berto
For our Solaris servers I used the Solaris wizard and took the defaults from the wizard, so not exactly sure which plugin(s) get used, is there a way I can check? I add the service configuration file from one of the Solaris servers along with a screenshot of the wizard I used.

Re: Memory Usage Graph Issue

Posted: Thu Jun 16, 2016 5:08 pm
by Box293
Can you execute this command on your Nagios XI server in an SSH session and paste back the result:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H solaris_server_ip -c check_mem -a '-w 30 -c 10'
Can you also provide the command definition from your solaris server. If will be in the file nrpe.cfg or common.cfg, the line will start with:
command[check_mem]

Re: Memory Usage Graph Issue

Posted: Thu Jun 16, 2016 5:22 pm
by Berto
This is the output from the Nagios server

OK - / MB (stack
stack
100%) Free Memory, Used: MB, Shared: MB | total=MB free=MB used=MB shared=MB

Looking in the nrpe.cfg on the Solaris servers I don't see a check command for check_mem, this is what I see;

# The following examples use hardcoded command arguments...

#command[check_users]=/opt/nagios/libexec/check_users -w 5 -c 10
#command[check_load]=/opt/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
#command[check_hda1]=/opt/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
#command[check_zombie_procs]=/opt/nagios/libexec/check_procs -w 5 -c 10 -s Z
#command[check_total_procs]=/opt/nagios/libexec/check_procs -w 150 -c 200

I looked at one of our Linux servers to see if the nrpe.cfg on it had a command for check_mem but it didn't either yet I can see a graph from our Linux servers.

Re: Memory Usage Graph Issue

Posted: Thu Jun 16, 2016 6:48 pm
by Box293
I'm pretty sure the command will be defined in common.cfg and it'll be in a subfolder called nrpe (where the nrpe.cfg lives).

I think it is:

Code: Select all

command[check_mem]=/opt/nagios/libexec/custom_check_mem $ARG1$
If thats the case, what is the output of executing this command on your solaris server:

Code: Select all

/opt/nagios/libexec/custom_check_mem -w 30 -c 10

Re: Memory Usage Graph Issue

Posted: Fri Jun 17, 2016 9:22 am
by Berto
This is what I get back from the Solaris server and I also don't see a common.cfg file in /etc/nagios as this is where the nrpe.cfg is located.

# /opt/nagios/libexec/custom_check_mem -w 30 -c 10
/opt/nagios/libexec/custom_check_mem: line 104: 16G: value too great for base (error token is "16G")
/opt/nagios/libexec/custom_check_mem: line 125: [[: stack
stack
100: syntax error in expression (error token is "stack
100")
/opt/nagios/libexec/custom_check_mem: line 129: [[: stack
stack
100: syntax error in expression (error token is "stack
100")
/opt/nagios/libexec/custom_check_mem: line 143: [: -gt: unary operator expected
OK - / MB (stack
stack
100%) Free Memory, Used: MB, Shared: MB | total=MB free=MB used=MB shared=MB

Re: Memory Usage Graph Issue

Posted: Fri Jun 17, 2016 1:38 pm
by ssax
Please run this command on the Solaris server and paste the output:

Code: Select all

top -n | grep "^Memory"
It looks like the G in the 16G is causing a problem, the plugin will need to be updated, send that info and we should be able to get it functioning.


Thank you