Page 2 of 5
Re: Memory Usage Linux
Posted: Wed Jun 12, 2013 12:01 pm
by ofadl
this is what I got when I ran those commands on the server im trying to monitor
/usr/lib/nagios/plugins/check_mem.sh: /bin/ksh: bad interpreter: No such file or directory
Re: Memory Usage Linux
Posted: Wed Jun 12, 2013 12:27 pm
by abrist
AH, looks like you are missing the ksh shell. What distro is running on the remote host?
If rhel/centos, try:
If debian/ubuntu try:
Re: Memory Usage Linux
Posted: Thu Jun 13, 2013 9:34 am
by ofadl
the su nagios command, it asks for a password, what password am i suppose to be putting in?
Re: Memory Usage Linux
Posted: Thu Jun 13, 2013 9:57 am
by slansing
When you set nagios up, did you somehow add a password to the Nagios user..? There should not be one, if you:
From root it should just switch.
Can you remove the password? If not, please run:
And share the output.
Re: Memory Usage Linux
Posted: Thu Jun 13, 2013 10:01 am
by ofadl
this is what i got from running the command grep nagios/etc/passwd on the remote client:
nagios
106:109::/var/lib/nagios:/bin/false
Re: Memory Usage Linux
Posted: Thu Jun 13, 2013 10:06 am
by slansing
To remove the password please follow this guide:
http://www.cyberciti.biz/faq/linux-dele ... -password/
Then verify you have a shell installed as Andy pointed out.
Re: Memory Usage Linux
Posted: Thu Jun 13, 2013 10:15 am
by ofadl
alright, i deleted the password, and verified the ksh is installed
Re: Memory Usage Linux
Posted: Thu Jun 13, 2013 10:26 am
by ofadl
ok, so i just ran the command:
/usr/lib/nagios/plugins/check_mem.sh 85 95
and got the following output:
/usr/lib/nagios/plugins/check_mem.sh[60]: /usr/bin/bc: not found [No such file or directory]
/usr/lib/nagios/plugins/check_mem.sh[61]: /usr/bin/bc: not found [No such file or directory]
/usr/lib/nagios/plugins/check_mem.sh[72]: bc: not found [No such file or directory]
/usr/lib/nagios/plugins/check_mem.sh[72]: [: argument expected
/usr/lib/nagios/plugins/check_mem.sh[75]: bc: not found [No such file or directory]
/usr/lib/nagios/plugins/check_mem.sh[75]: [: argument expected
/usr/lib/nagios/plugins/check_mem.sh[78]: bc: not found [No such file or directory]
/usr/lib/nagios/plugins/check_mem.sh[78]: [: argument expected
Unable to determine memory usage.
Re: Memory Usage Linux
Posted: Thu Jun 13, 2013 10:47 am
by ofadl
ok so i installed bc, and when i ran the command :
/usr/lib/nagios/plugins/check_mem.sh 85 95
it returned:
OK - Memory usage is 10.800% (222736)
but problem is now, its still giving me the unknown error on the nagios website
Re: Memory Usage Linux
Posted: Thu Jun 13, 2013 10:50 am
by slansing
Can you share your current service configuration for this check_mem service in Nagios?