Hey everyone,
So i recently set up a memory usage check, thanks to the nagios support forum team, and now for some reason on one of my servers im getting a weird error message on the website. Im getting this on the website:
AWK=/bin/awk
then when i try to run the check_mem.sh on the nagios machine with :
/usr/lib/nagios/plugins/check_nrpe -H 10.100.50.43 -c check_mem
i get this as output:
AWK=/bin/awk
BC=/usr/bin/bc
CRITICAL_STATE=2
CRITLEVEL=95
ENV='(null)/.kshrc'
FCEDIT=/bin/ed
FREE=/usr/bin/free
GREP=/bin/grep
HEAD=/usr/bin/head
HISTCMD=0
IFS=$' \t\n'
JOBMAX=0
KSH_VERSION=.sh.version
LANG=en_US.UTF-8
LINENO=48
MAILCHECK=600
NRPE_MULTILINESUPPORT=1
NRPE_PROGRAMVERSION=2.12
OK_STATE=0
OPTIND=1
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
PPID=9794
PS2='> '
PS3='#? '
PS4='+ '
PWD=/
RANDOM=27890
SECONDS=0.003
namespace sh
{
file=/usr/lib/nagios/plugins/check_mem.sh
lineno=0
match=([0]=)
math=''
stats=()
subshell=0
version='Version JM 93u 2011-02-08'
}
SHELL=/bin/sh
SHLVL=1
TAIL=/usr/bin/tail
TERM=xterm
TMOUT=0
UNKNOWN_STATE=3
WARNING_STATE=1
WARNLEVEL=85
Unable to determine memory usage.
trouble with memory usage on a linux server
Re: trouble with memory usage on a linux server
What happens when you run it locally? On the remote system run:
Code: Select all
/usr/lib/nagios/plugins/check_mem.sh
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: trouble with memory usage on a linux server
get pretty much the same script, with the addition of this:
(standard_in) 2: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
/usr/lib/nagios/plugins/check_mem.sh[72]: [: argument expected
(standard_in) 1: syntax error
/usr/lib/nagios/plugins/check_mem.sh[75]: [: argument expected
(standard_in) 1: syntax error
/usr/lib/nagios/plugins/check_mem.sh[78]: [: argument expected
Unable to determine memory usage.
(standard_in) 2: syntax error
(standard_in) 1: syntax error
(standard_in) 1: syntax error
/usr/lib/nagios/plugins/check_mem.sh[72]: [: argument expected
(standard_in) 1: syntax error
/usr/lib/nagios/plugins/check_mem.sh[75]: [: argument expected
(standard_in) 1: syntax error
/usr/lib/nagios/plugins/check_mem.sh[78]: [: argument expected
Unable to determine memory usage.
Re: trouble with memory usage on a linux server
Run the following command and show the output:
Code: Select all
/usr/lib/nagios/plugins/check_mem.sh -h
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: trouble with memory usage on a linux server
i fixed it, it was a problem on the server itself, thanks for the help though
Re: trouble with memory usage on a linux server
No problem, have a good week.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.