Memory Usage Graph Issue
Re: Memory Usage Graph Issue
Here is the requested output:
Memory: 16G phys mem, 1329M free mem, 25G total swap, 25G free swap
Memory: 16G phys mem, 1329M free mem, 25G total swap, 25G free swap
Re: Memory Usage Graph Issue
Please edit the plugin and around line 105 change these two lines from:
To:
Let us know if that resolves the issue for you.
Code: Select all
total=`echo $topout | awk '{print $2}' | sed -e 's/M$//'`
free=`echo $topout | awk '{print $5}' | sed -e 's/M$//'`Code: Select all
total=`echo $topout | awk '{print $2}' | sed -e 's/\(M\|G\)$//'`
free=`echo $topout | awk '{print $5}' | sed -e 's/\(M\|G\)$//'`Re: Memory Usage Graph Issue
Well here's probably a stupid question but I assume the plugin would be check_mem? If not what then? I used the Solaris wizard when configuring and when I go to where the plugins are, I don't see anything that looks like checking memory.
--Berto
--Berto
Re: Memory Usage Graph Issue
The plugin should be installed on the Solaris server and it's location is here
That is the plugin that has to be edited for the check to work.
Code: Select all
/opt/nagios/libexec/custom_check_memBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Memory Usage Graph Issue
I edited the plugin and this is what the output was. I also disable/enabled NRPE on the Solaris server before trying the plugin again.
solarishost# /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
solarishost# /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
Please attach your modified plugin, it doesn't look like it was modified.
Re: Memory Usage Graph Issue
I have uploaded the plugin but had to add a .txt to the end for it to be upload.
--Berto
--Berto
You do not have the required permissions to view the files attached to this post.
Re: Memory Usage Graph Issue
Apologies, sed works differently on SunOS, please replace them with this:
Let us know the results.
Code: Select all
total=`echo $topout | awk '{print $2}' | sed -e 's/G$//' -e 's/M$//'`
free=`echo $topout | awk '{print $5}' | sed -e 's/G$//' -e 's/M$//'`Re: Memory Usage Graph Issue
That seems to have fixed it as I now get;
/opt/nagios/libexec/custom_check_mem -w 30 -c 10
OK - 1222 / 16 MB (7637%) Free Memory, Used: -1206 MB, Shared: 0 MB, Cached: 4451 MB | total=16MB free=1222MB used=-1206MB shared=0MB cached=4451MB
So my next question then would is there a way to update the wizard for any future installs on Solaris servers?
--Berto
/opt/nagios/libexec/custom_check_mem -w 30 -c 10
OK - 1222 / 16 MB (7637%) Free Memory, Used: -1206 MB, Shared: 0 MB, Cached: 4451 MB | total=16MB free=1222MB used=-1206MB shared=0MB cached=4451MB
So my next question then would is there a way to update the wizard for any future installs on Solaris servers?
--Berto
Re: Memory Usage Graph Issue
Which wizard? Are you talking about the linux-nrpe-agent.tar.gz file that you download and install?