Memory Usage Linux
Re: Memory Usage Linux
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
/usr/lib/nagios/plugins/check_mem.sh: /bin/ksh: bad interpreter: No such file or directory
Re: Memory Usage Linux
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:
If rhel/centos, try:
Code: Select all
yum install ksh
Code: Select all
apt-get install ksh
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: Memory Usage Linux
the su nagios command, it asks for a password, what password am i suppose to be putting in?
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Memory Usage Linux
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.
Code: Select all
su nagios
Can you remove the password? If not, please run:
Code: Select all
grep nagios /etc/passwd
Re: Memory Usage Linux
this is what i got from running the command grep nagios/etc/passwd on the remote client:
nagios106:109::/var/lib/nagios:/bin/false
nagios106:109::/var/lib/nagios:/bin/false
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Memory Usage Linux
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.
http://www.cyberciti.biz/faq/linux-dele ... -password/
Then verify you have a shell installed as Andy pointed out.
Re: Memory Usage Linux
alright, i deleted the password, and verified the ksh is installed
Re: Memory Usage Linux
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.
/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
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
/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
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Memory Usage Linux
Can you share your current service configuration for this check_mem service in Nagios?