Memory Usage Linux

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Re: Memory Usage Linux

Postby ofadl » Wed Jun 12, 2013 12:01 pm

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
ofadl
 
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Postby abrist » Wed Jun 12, 2013 12:27 pm

AH, looks like you are missing the ksh shell. What distro is running on the remote host?
If rhel/centos, try:
Code: Select all
yum install ksh

If debian/ubuntu try:
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.
abrist
Red Shirt
 
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Memory Usage Linux

Postby ofadl » Thu Jun 13, 2013 9:34 am

the su nagios command, it asks for a password, what password am i suppose to be putting in?
ofadl
 
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Postby slansing » Thu Jun 13, 2013 9:57 am

When you set nagios up, did you somehow add a password to the Nagios user..? There should not be one, if you:

Code: Select all
su nagios


From root it should just switch.

Can you remove the password? If not, please run:
Code: Select all
grep nagios /etc/passwd


And share the output.
slansing
 
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Memory Usage Linux

Postby ofadl » Thu Jun 13, 2013 10:01 am

this is what i got from running the command grep nagios/etc/passwd on the remote client:

nagios:x:106:109::/var/lib/nagios:/bin/false
ofadl
 
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Postby slansing » Thu Jun 13, 2013 10:06 am

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.
slansing
 
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Memory Usage Linux

Postby ofadl » Thu Jun 13, 2013 10:15 am

alright, i deleted the password, and verified the ksh is installed
ofadl
 
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Postby ofadl » Thu Jun 13, 2013 10:26 am

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.
ofadl
 
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Postby ofadl » Thu Jun 13, 2013 10:47 am

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
ofadl
 
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: Memory Usage Linux

Postby slansing » Thu Jun 13, 2013 10:50 am

Can you share your current service configuration for this check_mem service in Nagios?
slansing
 
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

PreviousNext

Return to Community Support

Who is online

Users browsing this forum: No registered users and 16 guests

cron