LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-16-2013, 03:17 AM   #1
hesisaboury
Member
 
Registered: Dec 2010
Location: iran
Posts: 199

Rep: Reputation: 0
nagios show incorrect info


hello,
i have this script in my server
num=$(lsof | grep peykasa-mail-monitor.jar | wc -l)

if [[ "$num" == "2" ]]
then
echo "MailMonitor is UP"
exit 0
elif [[ "$num" == "0" ]]
then
echo "MailMonitor is DOWN"
exit 2
else
echo "UNKOWN"
exit 1
fi

when i run this in server it shows "MailMonitor is UP" but nagios show "MailMonitor is DOWN" ,, i also checked by check_nrpe ..

any suggestion..
 
Old 11-16-2013, 05:03 AM   #2
hesisaboury
Member
 
Registered: Dec 2010
Location: iran
Posts: 199

Original Poster
Rep: Reputation: 0
Hi
i figured out that user nagios doe not see the process i'm looking for ,, but no how can i monitor for this process , this process is run by root and is in background ...
 
Old 11-16-2013, 05:17 AM   #3
hesisaboury
Member
 
Registered: Dec 2010
Location: iran
Posts: 199

Original Poster
Rep: Reputation: 0
Thank U ALL
solved by adding user nagios to visudo
nagios ALL=(ALL) NOPASSWD:/usr/lib/nagios/plugins/check_mailmonitor.sh

now nagios can see this process
 
  


Reply


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
bash shell prompt show incorrect hostname. hari85 Linux - Newbie 3 06-22-2010 04:10 AM
uptime, top, w and who: incorrect users info pdi Slackware 5 07-11-2008 09:22 PM
df -h show incorrect information ryanjliles Linux - Networking 2 07-25-2007 04:26 PM
top and ps commands show incorrect pids joepgjm Linux - Newbie 3 04-25-2007 11:23 AM
df -h vs cfdisk info, incorrect size of new drive csDraco_ Linux - Hardware 2 09-21-2003 03:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:56 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration