A custom_check_mem error value too big.

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
lee.krause
Posts: 86
Joined: Wed Jan 20, 2016 8:38 am

A custom_check_mem error value too big.

Post by lee.krause »

When I run the custom_check_mem script i get the following errors:
./custom_check_mem: line 111: 111G: value too great for base (error token is "111G")
./custom_check_mem: line 132: [[: stack
0: syntax error in expression (error token is "0")
./custom_check_mem: line 136: [[: stack
0: syntax error in expression (error token is "0")
./custom_check_mem: line 150: [: -gt: unary operator expected
OK - / 262144 MB (stack
0%) Free Memory, Used: MB, Shared: MB | total=262144MB free=MB used=MB shared=MB


Is there an update to this script? I'm running Solaris 10.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: A custom_check_mem error value too big.

Post by Box293 »

How did you install this plugin? Was it installed via this method?

https://assets.nagios.com/downloads/nag ... _Agent.pdf
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
lee.krause
Posts: 86
Joined: Wed Jan 20, 2016 8:38 am

Re: A custom_check_mem error value too big.

Post by lee.krause »

Yes it was installed as the document says.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: A custom_check_mem error value too big.

Post by Box293 »

Can you please show us the full command you are using to test at the command line. For example:

Code: Select all

/opt/nagios/libexec/custom_check_mem -w 20 -c 10
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
lee.krause
Posts: 86
Joined: Wed Jan 20, 2016 8:38 am

Re: A custom_check_mem error value too big.

Post by lee.krause »

~ # /opt/nagios/libexec/custom_check_mem -w 20 -c 10
/opt/nagios/libexec/custom_check_mem: line 110: 110G: value too great for base (error token is "110G")
/opt/nagios/libexec/custom_check_mem: line 131: [[: stack
0: syntax error in expression (error token is "0")
/opt/nagios/libexec/custom_check_mem: line 135: [[: stack
0: syntax error in expression (error token is "0")
/opt/nagios/libexec/custom_check_mem: line 149: [: -gt: unary operator expected
OK - / 262144 MB (stack
0%) Free Memory, Used: MB, Shared: MB | total=262144MB free=MB used=MB shared=MB
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: A custom_check_mem error value too big.

Post by Box293 »

Would you be able to upload the plugin here as a text file. I am unable to reproduce on a test server I have so I want to make sure we have the same version of the plugin.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
lee.krause
Posts: 86
Joined: Wed Jan 20, 2016 8:38 am

Re: A custom_check_mem error value too big.

Post by lee.krause »

Here's the txt file
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: A custom_check_mem error value too big.

Post by Box293 »

I think this forum thread has the answer to your problem:

https://support.nagios.com/forum/viewto ... 10#p187375

Can you see if this modified version fixes your issue:
custom_check_mem.txt
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
lee.krause
Posts: 86
Joined: Wed Jan 20, 2016 8:38 am

Re: A custom_check_mem error value too big.

Post by lee.krause »

I changed the code in that section for SunOS and have noted in the text document.
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: A custom_check_mem error value too big.

Post by rkennedy »

The file you just posted looks to be different from what @Box293 attached as a fix, could you try the fixed version and let us know the new output you're seeing?
Former Nagios Employee
Locked