Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm half expecting the answer to this is Nagios, but I just wanted to check against certain specific requirements we have with our infrastructure and custom applications.

We need to monitor for custom events like the ones outlined below:

  1. Alert if there is a .CSV or .TXT in a specific folder that's been there for more than 30 mins
  2. Warn if a specific POP3 mailbox has more than 3 items in there
  3. A specific folder should have a file with the pattern 'standard_file_name_ddmmyy' by 1700 each day
  4. An XML file should be in a folder by no later than 0300 each morning, except on weekends.

Essentially, it's to monitor different file-related activity which otherwise is difficult to keep on top of.

Any suggestions?

share|improve this question
add comment

2 Answers

You can definitely do it with Nagios with a custom check command, and it would be easy. That's a strength of Nagios, that it's easy to extend. Moreover, you can write (or find from a third party, publicly available, etc) custom checks that are configurable with parameters. In other words, you could write this script once and then reuse it for any similar checks throughout.

And for what you describe, it'd be easy with Nagios. You could definitely write just a few lines of perl to implement the custom check command plugin for items 1, 3, and 4; I can already see the code in my head (an ls with the ctime for #1, an ls and strftime for #3, and really just an ls for #4) . Custom checks are really quite easy to write. Take a look at the documentation; it's extremely friendly. and 1/3/4 just take some lsing and comparing dates. I can't vouch for the equal ease of #2 since I haven't actually done that. But I'm very sure there's an easy to use POP module in CPAN, and that just counting how many messages are in a folder is not more than a handful of lines with it.

Oh yeah, and before you bother to write those custom checks, actually you could look around (check the nagios exchange @ http://exchange.nagios.org/etc as well as Google) to see if someone's already written a publicly available plugin to make it easier.

share|improve this answer
add comment

AFAIK, I don't think there is a monitoring software which can monitor these specific events. In nagios, I need to write my own scripts to do such type of custom events checks. I think this applies to other monitoring software as well.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.