LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 01-21-2010, 12:13 PM   #1
rutledgetome
LQ Newbie
 
Registered: Jan 2010
Posts: 5

Rep: Reputation: 0
nagios plugin - check_procs


I need to check if a backup process has hung. That is, the backups on the system being checked normally finish in under 2 hours, so I would like to find any backup process that is older than 2 hours.

The nagios plugin check_procs lists the option of elapsed time, but does not seem to work in my environment. I have compiled plugins version 1.4.12 on AIX 5.3.

Anyone have any suggestions?
 
Old 01-22-2010, 05:04 AM   #2
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello and welcome to LinuxQuestions,

What's the exact command you are running, i.e. with what parameters are you executing the check_procs plugin?

Kind regards,

Eric
 
Old 01-22-2010, 05:39 AM   #3
rutledgetome
LQ Newbie
 
Registered: Jan 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Here is the command:

/usr/local/nagios/libexec/check_procs -m ELAPSED 120 -C tsm_db2_backup

This does find a process (when it exists) but no matter how much elapsed time this process has, this command returns

ELAPSED OK: 1 process with the command name "tsm_db2_backup"

Note: I have tried to check commands like init and sshd, but still, no success.

In doing this follow up, I see that check_procs version 1.4.12 for AIX does not have the option metric=ELAPSED. (The Linux version does) And, AIX is where I need this option.

In the end, what I need is a way to find a runaway process. If you know of other checks for this, please share.

Thanks for taking a look at this problem. All suggestions are welcome.
 
Old 01-22-2010, 06:09 AM   #4
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

I noticed the 'tsm' in the command name you used so I imagine that you're checking up on Tivoli Storage Manager backups. Have a look at this script:
Check TSM on AIX. Maybe it'll give you better results.
From the same site there's also this one.

Kind regards,

Eric
 
Old 01-22-2010, 08:08 AM   #5
rutledgetome
LQ Newbie
 
Registered: Jan 2010
Posts: 5

Original Poster
Rep: Reputation: 0
Smile

I have found a shell script that does what I need

http://exchange.nagios.org/directory...untime/details

check_proc_time.sh works under bash or ksh (change first line for proper shell), so I get the results I need under AIX.

check_proc_time.sh -p tsm_db2_backup -w 3600 -c 7200

gives a WARNING if tsm_db2_backup runs for 1 hour, and CRITICAL if it is running for 2 hours - and OK if process NOT running. Just what I needed.

Thank you all for taking a look at my query.
 
Old 01-22-2010, 09:51 AM   #6
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hi,

That's great news. Glad to hear you found a solution and thanks for posting the link here. If you consider your problem/question solved please mark this thread as solved using the Thread tools.

Kind regards,

Eric
 
  


Reply



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
How to use Nagios plugin? dwarf007 Linux - Software 20 10-03-2011 06:11 AM
nagios plugin check_url_status vanderbult Linux - Software 2 05-14-2009 10:36 AM
Need Help with Development of Nagios Plugin monkinsane Linux - Newbie 10 04-23-2009 04:55 AM
Nagios Plugin fullgore *BSD 3 10-22-2008 08:52 AM
Nagios: Raid Plugin kegwell Linux - Software 2 05-01-2005 11:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:31 PM.

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