LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 08-27-2010, 10:00 AM   #1
babaqga
LQ Newbie
 
Registered: Aug 2010
Posts: 18

Rep: Reputation: 1
NRPE problem with Nagios


Hi guys, I have the following problem:

I am using the following baSH! script that I wrote so I can check mysql parameters:

Code:
#!/bin/sh
NRTHREADS=`"/usr/bin/mysqladmin" status -ppassword | awk '{print$4}' | bc`
if [ $NRTHREADS -gt 200 ]
then
        RC="2"
        COMMENT="CRITICAL"
elif [ $NRTHREADS -gt 150 ]
then
        RC="1"
        COMMENT="WARNING"
else
        RC="0"
        COMMENT="OK"
fi
echo "SERVICE: $COMMENT, threads: $NRTHREADS threads | threads=$NRTHREADS"
if I call the script using
Code:
# ./check_mysql_threads.sh
SERVICE: OK, threads: 3 threads | threads=3
However, if I call the script from nrpe:
Code:
#./check_nrpe -H localhost -c check_mysql_threads_remote
SERVICE: OK, threads:  threads | threads=
As one can see, the service check_mysql_threads_remote is defined on my
client in the following way:
Code:
command[check_mysql_threads_remote]=[PATH]/check_mysql_threads.sh
However, it doesn't display the results as it somehow can't find mysqladmin and make a call to it eventhough I gave it the absolute path. I have other scripts on the same client that DO WORK that are built the same way making calls, I even have a script that writes to a file outside the libexec directory, using absolute paths to find where to find the commads/scripts/files it manipulates.However, for some reason the mysqladmin is a super exception. I am wondering if any of you faced the issue and how to resolve it.

Last edited by babaqga; 08-30-2010 at 01:49 AM.
 
Old 08-27-2010, 10:49 AM   #2
valen_tino
Member
 
Registered: Jan 2008
Posts: 105

Rep: Reputation: 28
Does the nagios user have the permission to run the script that you may have created as either root or a sql user?
 
  


Reply

Tags
nagios, nrpe


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
nagios + nrpe configuration aeby Linux - Server 6 05-29-2012 11:52 AM
Installing Nagios agent nrpe, problems following nrpe install steps rfreiberger Linux - Newbie 3 04-19-2010 08:43 AM
Nagios--- NRPE lazylark Linux - Software 1 04-11-2007 01:57 PM
Nagios/NRPE issue JF1980 Linux - Security 1 05-18-2006 02:59 PM
Nagios NRPE twantrd Linux - Software 1 10-20-2004 08:24 AM


All times are GMT -5. The time now is 03:44 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration