Showing posts with label sage. Show all posts
Showing posts with label sage. Show all posts

Wednesday, January 9, 2008

Where Do I Put My Crontabs?

There's another good discussion forming around where to put your crontabs on the SAGE mailing list.

On linux based systems, there are typically 4 places to stick your crontabs:

  1. Where ever crontab -e puts them on your system (per user crons)
  2. /etc/crontab
  3. /etc/cron.daily, /etc/cron.hourly, /etc/cron.weekly and /etc/cron.monthly
  4. /etc/cron.d
My opinion is that crons should go into /etc/cron.d only. They should ideally be grouped into one file per application, or some other logical breakout (database maintenance, health checks, email crons, etc).

Putting them into /etc/cron.d makes it easy to revision control the files and keep track of changes. It's also handy for package management -- you can build a custom RPM or DEB of your app and have it drop any required crontabs into /etc/cron.d.

Crons should never run as human user account. When they are configured this way, they tend to break if someone leaves or an account is shut down for other reasons. Depending on what the cron needs access to, it should run as nobody, apache, and in special cases, root. It's easy to configure which user a cron runs as in these files since each entry in the file requires you to specify which user to run as.

Of course, if your cron doesn't support /etc/cron.d, ignore everything I said :)

Saturday, January 5, 2008

Network Monitoring: Auto Discovery vs. Configuration Management

There is some discussion on the SAGE-members list regarding network monitoring solutions. The first post was about Zenoss vs. Nagios. I haven't been involved in the conversation, I've only been lurking. 


I have maintained a few Nagios installs, usually configured via fruity. Before my Nagios/Cacti days, I ran a couple of large mon installs. 

I've been unsuccessful and unsatisfied with Zenoss in the past. I felt it wasn't monitoring what's important to me (mostly raid arrays). I couldn't figure out how to add custom monitoring in. I also had a brief stint with Hyperic, but the free version didn't give me access to the features I wanted.

An interesting comment was added today. Neil Watson said:
I am planning to move to a system that I can configure with my configuration management system instead of auto discovery (probably Nagios as I have used it before).
I've long thought that the division between people who want to use auto discovery and manual configuration has to do with the number of systems you need to maintain. I've been on the manual config side as I've never had more than 100 systems to monitor. I typically write macros to quickly add systems of similar types.

When I was at Scale5x last spring, the OpenNMS people were talking about how many tens of thousands of systems they could monitor with one station and how quickly they could get it up and running. I thought it was cool, but it didn't matter all that much to me.

To me, it's more important to use source control systems to maintain configuration management than using auto discovery. I also want to specify what I monitor -- I'll hand pick what's important for my environment. I also want to know how and why it changes.

I can think of two things that would make me switch camps:
  1. I'm in a position where I monitor 200+ machines
  2. A monitoring system lets your write customer monitors in perl/ruby/python and the interface includes the ability to add auto discovery code to your monitor

Thursday, November 15, 2007

SAGE-members email list is great

Of all the mailing lists I'm on, sage-members has the greatest solutions:noise ratio. It's basically 1:0. There are about 3 or 4 threads a week with a lot of really great advice.

For instance, this poster seems to have solved his problem. The other threads on the list are also interesting, possibly because they are so varied, as are the people posting responses. I participate in several other lists, like CentOS, Asterisk and MySQL. Those lists are typically noisy with the same questions answered with the same perspectives all the time (that's why FAQ's were born).

The email list alone is worth the SAGE member fees. Now they need an affiliate program so I can get paid for my awesome reviews :)