Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-11-2012, 09:47 AM   #1
LQ Newbie
Registered: Oct 2012
Posts: 1

Rep: Reputation: Disabled
Gentoo Linux & Nagios

Hey fellow Linux users,

seeing as I feel a bit silly asking a question before introducing myself, I'll start with a small introduction.

I'm a 22 year old kid living in Berlin, and February this year I started an apprenticeship to become a (direct translation) information science technician specialising in systems integration. So easily put, Network and System administration. Started with IT just this year, loving it though.

So my question and project is to impress my boss and help out with Company back up problems. How it runs is that once a week a Backup is done over Windows 7 Backup. The Backup is then uploaded to a Fileserver which is run on Linux Gentoo.

I've gotten around to figuring out Gentoo pretty well, and can pull of one or tricks. Yet what I would like to do is, write a bash script which runs on the fileserver checking (maybe with find?) if a specific backup folder as been updated in the past 8 days. And if not it returns a warning or critical to the Nagios server notifying me about it.

So, i'm not asking for a script but maybe a little help to put me in the right direction. I have obv. already googled alot, yet no real help other then letting Nagios check on its Host server if specific files exist with a time stamp.

Thanks alot,

Old 10-11-2012, 10:31 AM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Wow, that sounds really impressive a way to get started.

So is your motivation to achieve the end result, or to write a mostly arbitrary script file?

For the end result, there are a fair few scripts around for Nagios, e.g. Note that Nagios scripts will work locally or remotely, you just need to run them via another remote check script, e.g. check_ssh or check_nrpe (i really dislike nrpe though...)

For learning... well here's a bash script doign mostly what you're after - and from the way you talk, I'd think that as long as you take the time to understand what's going on you'll be fine. This solution doesn't use find though, so if you do want to use find, which is also a very legit way to do it, you'd want to use the -mtime option and check the exit code of find after it's completed (echo $?) as one way to work out a success or failure.


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
i am unable to monitor or connect remote linux server uning nagios 3.3 on nagios linn nandunay Linux - Server 2 05-09-2012 05:56 AM
nagios & OTRS Integration rajiv.patil82 Linux - Software 2 07-22-2011 12:35 PM
gentoo 2007.0 & ati radeon 9700 pro & direct rendering jimerickso Linux - Desktop 10 04-01-2008 10:05 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:37 AM.

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