Slashdot Mirror


Monitoring Your Unix Boxen?

Griim asks: "I've been using Linux for years and loving it, and have also worked a bit on a few Sun stations and BSD boxes as well. My question is this: what is the easiest way to keep tabs on all of the activity?"

"I know a few people who 'tail -f' the main log files, or who run 'top' every so-often. These require constant monitoring though, and you could miss essential error messages if you step away for too long. Are there any projects that do this successfully? I've seen a couple out there that started to do this, but appear to be abandoned.

Ideally, I would like some type of all-in-one, that possibly generates a daily (email/web) report of network statistics, user logins, and (web)server traffic/hits, as well as anything 'suspicious' that might be happening, perhaps what apps have been taking most of the processor time, or if any of the daemons have been busier than they normally would be. I know there probably isn't one single app out there that does all of this, so what's the best configuration , for keeping tabs on multiple machines, something I can skim for a minute or two each day, to make sure things are the way they should be? I want to know what works best, and just as importantly, what *doesn't* work (I do realize that relying on a single solution would be bad here too, so if you have more than one suggestion, that would be appreciated)."

59 comments

  1. Tripwire by daeley · · Score: 4, Informative

    I cron tripwire on an old BSD box I have running and it works well enough. Linxen:

    Tripwire.org

    FAQ

    sourceforge page

    --
    I watched C-beams glitter in the dark near the Tannhauser gate.
  2. Big Brother by MJArrison · · Score: 5, Informative

    I've user Big Brother for many years and it is very configurable. You can monitor anything from cpu usage, memory, disk space, available services, to random things like the weather and server room temp.

    All that being said, I found it to be flukey in its behavoir. Sometimes it would report that everything was not responding and it had to be punted before I would get the all clear. The other negative is the license. The program consists of nothing more than shell/perl scripts so it's obviously open, but it has some strange clauses about Non-Commercial use.

    Overall, I'd recommend trying something else, because BB was unreliable in my use, but YMMV.

    1. Re:Big Brother by Zocalo · · Score: 4, Informative
      If you look at, or already use, Big Brother then *please* make sure you read the article on it in issue #60 of Phrack as well. Owing to the way the software is implemented, the thing can be a goldmine of information for hackers and it is *essential* that your BB box is properly secured.

      That said, it does appear to be a capable, fully-featured package and I'd guess that as long as you take the proper precautions you should be OK. I can't comment on the stability though; the security concerns I had were enough to cause me to move along to the next product on my list.

      --
      UNIX? They're not even circumcised! Savages!
    2. Re:Big Brother by schon · · Score: 2, Insightful

      *please* make sure you read the article on it in issue #60 of Phrack

      I've run BB for a number of years, and I got a good laugh from that article.. thanks..

      the security concerns I had were enough to cause me to move along to the next product

      The thing is, that if you've got security concerns, then you souldn't have a problem with using BB, because you're already aware of what needs to be done to prevent this information leakage.

      The article you linked to didn't provide me with anything I didn't know before I originally installed BB - I run BB as an untrusted user without a valid login (why in the world would a daemon process require a password? - just set it to '*', and be done with it.).. and my status page is password protected, and encrypted.

      BB's "security" is only a problem for people who don't understand security in the first place. If you know how to adequately secure a box, BB is no different than any other application.

    3. Re:Big Brother by toddler420 · · Score: 1

      Thanks to the parent.

      At a previous employer, I ran BB from a Linux machine to monitor a pretty diverse set of boxes (Irix, FreeBSD, Win2k, WinNT4, AS400, Cisco 2500 and 7500 series, etc...) One of the best parts about BB is it's extensibility; any kind of shell script can be implemented as an monitor/alarm generator for BB, making it *extremely* nimble.

      Securing the installation is easy enough, if you're not a numnuts.

  3. Re:first boxen! by Anonymous Coward · · Score: 0, Offtopic

    maybe it is now
    times change and you sound like grandpa saying 'Back when I was young ....'

  4. Keep an eye on your network traffic by forged · · Score: 4, Informative

    Any network monitoring applet docked to your environment will do for real-time stuff, but for historical logs you should consider keeping MRTG logs as well. MRTG works with *everything* and the log file format it uses doesn't grow over time (magic!)

    1. Re:Keep an eye on your network traffic by cymen · · Score: 2, Interesting

      I am currently using MRTG but have been reading up on Cricket. Do you, or anyone else, have any opinions on Cricket?

    2. Re:Keep an eye on your network traffic by Anonymous Coward · · Score: 1, Funny

      I sure do.

      The insect - there is one outside my window right now that just wont shutup. I think they irritate me mostly.

      The game - Well, its pretty long and slow to watch, but i'm Australian and we rule the world in both test and one-day, so I guess I like it.

      The program - Meh. I can take it or leave it.

    3. Re:Keep an eye on your network traffic by phamlen · · Score: 1

      We used Cricket at my old company - it was great. We essentially replaced MRTG with Cricket and it just rocked.

      We ended up graphing all sorts of interesting stats (CPU time, disk access, network latency times, etc.).

      One of the best things that Cricket gave us was the ability to see correlations between our webserver response times and various other stats. So, for instance, we found out that our webserver response times dropped at the same time that our NFS file system times dropped and our iostats on one box skyrocketed. A little investigation found the culprit that was flooding the network.

      I give Cricket a big thumbs up!

      -Peter

  5. logcheck by Col.+Klink+(retired) · · Score: 4, Informative

    I use logcheck (available as a Debian package). I run it only one one machine and I have all the other machines send their syslogs to that machine.

    --

    -- Don't Tase me, bro!

  6. To quote a recent job candidate I interviewed.. by Nathan+Ramella · · Score: 5, Funny

    'top' apparently is the best tool for monitoring boxen. :)

    --
    http://www.remix.net/
    1. Re:To quote a recent job candidate I interviewed.. by Anonymous Coward · · Score: 0

      why is this funny?

      it depends on what you want to monitor

      if you want to monitor users/process then top is indeed the best

  7. He's watching you.... by mpechner · · Score: 5, Informative
    Take a look at big brother. http://bb4.com. Big brother is cross platform and has many hooks. It will monitor all unix and win machines. I do suggest using a UNIX machine as the server. BB has both email and pager support.

    The extensions for BB are at http://www.deadcat.net/

    I also like tripwire. Checksums of files on the system to know if important files have been changed. last time I used TripWire it has email alerts. The paid for version has an enterprise monitor.

    LogWatch is another. Generates email.

    Go through your linux and bsd daily, hourly and weekly scripts to see all the tools they run by default. These can be moved to most Unixs. Since most of these are shell and perl rpograms, some might be adaptable under windows using activeXPerl or Cygwin.

    The hardest part is fine tuning the emails and alerts to those things you really care about.

    MTRG and agreat snmp tool and tied in with BigBrother.

    I've has to set these up for security purposes at one site. For monitoring a server fam at another site. A compile farm for doing builds at my current job.

  8. Re:first boxen! by psyconaut · · Score: 0, Offtopic

    Actually, boxen IS a word. I quote: [B]boxen[/B] \Box"en\ (b[o^]ks"'n), a. Made of boxwood; pertaining to, or resembling, the box (Buxus). [R.] The faded hue of sapless boxen leaves. --Dryden. [I]Source: Webster's Revised Unabridged Dictionary, © 1996, 1998 MICRA, Inc.[/I]

  9. It's all about Nagios... by Dimwit · · Score: 4, Informative

    Nagios rocks my socks. Does everything most commercial apps do, and it's free. Rock solid too.

    --
    ...but it's being eaten...by some...Linux or something...
    1. Re:It's all about Nagios... by Deagol · · Score: 4, Informative
      Nagios is pretty sweet -- we use it at our shop. It's handy to be notified as soon as a key server goes down.

      One thing I like to do personally is randomly pick a startup script (that's actually used in a particular server's configuration), and bury a single line in it that emails me "hostname has rebooted!" as the subject whenever it reboots. That way I know if a machine is ever rebooted with or (more importantly) without my knowledge.

    2. Re:It's all about Nagios... by mpechner · · Score: 1

      Good comment: Nagios looks good. I wish it was cross platform. I have always been places with mixed environments. Troll comment: We posting singles ads? Let me know if you have luck.

  10. syslogd? by Drakon · · Score: 1

    I always thought syslogd could do this over SNMP... that is transport all your logs to your workstation
    or something
    I'm not sure if I'm bullshitting or not :-)
    I'm likely misinformed

    1. Re:syslogd? by unixbob · · Score: 3, Informative

      you need a central syslog server. Syslogd can automatically send it's logs to a central syslog server using udp. Just look in your syslog.conf.

      We've got a nifty setup where we have syslog-ng running on our central syslog server. syslog-ng then squirts the data directly into a MySQL database. We've then got a custom PHP interface which sorts the errors by severity and colour codes them so we can always see what is going on. Our switches write to it. Our nokia firewalls write to it. Even the F5 load balancers and the Network Applicance NAS systems. It's so useful that we have installed ntsyslog onto our win2k servers so that all the info is in one place.

      --
      The Romans didn't find algebra very challenging, because X was always 10
  11. Nagios by nocomment · · Score: 5, Informative

    I'm running Nagios. It was SAINT, and before that it was known as SATAN. I've also used big sister before. That's a pretty good big brother clone. Nagios will do what your after though. Just remember that whatever you build will probably take awhile. Creating the config files takes forever.

    --
    /* oops I accidentally made a comment, sorry */
    /* http://allyourbasearebelongto.us */
    1. Re:Nagios by .@. · · Score: 1

      Nitpick: SATAN was a security assessment tool, not SAINT's predecessor.

      --
      .@.
    2. Re:Nagios by Mr_Person · · Score: 3, Informative

      Nope. SATAN was a vulnerability probing tool that came out of SGI quite a while back. SAINT was based on it (at least in function, I don't know if the code was based on it). They have nothing to do with Nagios.

      The previous version of Nagios was called Netsaint, but they changed the name to Nagios because of possible trademark problems with WebSAINT, which is a web based tool that uses SAINT.

      From the notice at the bottom of netsaint.org: NetSaint is not affiliated with World Wide Digital Security, Inc. (WWDSI); Richard S. Carson and Associates, Inc; and the marks WEB SAINT, SAINT, SAINTWRITER, SAINTEXPRESS, and SAINTBASIC owned by Richard S. Carson and Associates, Inc.

      And I may as well mention that Nagios/Netsaint is a really great tool and I highly recommend it. It won't, however, keep you up to date on "suspicious" activity - it's mostly for just making sure that your server and any services that run on it are going.

    3. Re:Nagios by PerryMason · · Score: 3, Informative

      It won't, however, keep you up to date on "suspicious" activity - it's mostly for just making sure that your server and any services that run on it are going.

      Well actually it _can_ keep you up to date on 'suspicious activity' if you are willing to write a plugin to say, monitor your IDS output.

      Nagios itself is nothing more than a web-based system of notification. The plugins provide whatever functionality you code into them, from monitoring a network service, to parsing a logfile, to monitoring temperature. Pretty much anything that provides you with feedback can be used as the input to a plugin.

      I actually wrote a little plugin that parses the output from my Win2k Terminal Server logs (via BackLogNT) on my central syslog server to email me everytime my boss logs on and logs off from Windows so I can figure out when he is leaving home and on his way into the office.....and he has yet to catch me playing games when I should be working. :)

      The long and the short is that Nagios handles the notifications, the plugins handle what is being measured/monitored.

      --
      "I'm tired of all this 'Aren't humanity great' bullshit. We're a virus with shoes" - Bill Hicks
    4. Re:Nagios by Anonymous Coward · · Score: 0

      We use BMC Patrol in my office, though you've got to pay (generally, through the nose) for that package. Works really well once you've custom-built all the plugins you need to monitor your situation. I've looked just slightly at Nagios, and one thing that seems missing is something to really grab your attention when stuff fails: the Windows NT console for Patrol will pop up and go to the top of your screen when something goes pear-shaped. Hard to avoid seeing that, no matter how important that IRC session is. :-)

  12. Orca by geog33k · · Score: 3, Informative

    I use Orca (but then I'm its author :) ) to monitor Solaris and Linux boxes. I used it at Yahoo!/GeoCities to monitor 200 boxes and it was easy to see when systems were doing odd stuff.

    Sample Solaris and Linux plots. The Solaris version shows a whole ton of web server stats.

  13. Lots of stuff by vadim_t · · Score: 4, Informative

    logcheck will mail you about unusual stuff that appears in log files.

    monit will monitor running damons and can restart them if they crash, use too much CPU/RAM, etc, mailing about anything interesting.

    tripwire or lire are nice for monitoring filesystem integrity, but these tools aren't easy to use. The database they use must not be located in a safe place, which can make them impractical.

    I think the best thing would be doing all logging to a safe computer that only runs the logging daemon, so that you can be sure you're not missing anything.

  14. User of the word boxen by monthos · · Score: 0, Troll


    I know this is slightly offtopic, even though he used it in the topic of this article. but seriously, the use of the word boxen is stupid, we dont say "a box factory makes boxen", so dont use the term for computers.

    Whenever someone uses that word to me i turn around and stop listening to them, it really makes me question there inteligence both in the IT field and in general inteligence.

    1. Re:User of the word boxen by quiddity · · Score: 2, Funny

      I tend towards pedantic nitpickering on the occasion also, but it's good to bare in mind that playing [to destruction!] with language is both edumacational and amusin'.

      i like "boxen" for the same intriguing subcultural contexts as i like "w00t" and "geek".

      remain happily hypocritical :)

      --
      .
      . hmmm
    2. Re:User of the word boxen by monthos · · Score: 0, Troll


      I agree, i use w00t on the occasion as well, like when i frag a clanmate after he/she trash talking for over an hour or so. but its just the word boxen doesnt fit well into sentences on the online community. typically words created are meant to make the typing easier or to make it sound short, sweet and cool. boxen does nothing of the short.

      Perhaps it could also be the first time i heard it was the time a script kiddie tried harrassing me, and i went forward to making fun of it. bandwith did rise on my machine as he attempted to dos it though, good thing hes not good at it :)

    3. Re:User of the word boxen by david+duncan+scott · · Score: 2, Informative

      I could be wrong here, but I think there is a history involved. Back in the day, there was no good plural for "VAX", and many DEC people started referring to "VAXen" (these were, after all, the same people who often called themselves "VAXherds".) I believe "boxen" to be derived from "VAXen", and as such I find it has a certain old-fashioned charm.

      --

      This next song is very sad. Please clap along. -- Robin Zander

    4. Re:User of the word boxen by br0ken2o0o · · Score: 2, Funny

      I guess I will bite....

      Whenever someone uses that word to me i turn around and stop listening to them, it really makes me question there inteligence both in the IT field and in general inteligence.

      Perhaps we should turn around and stop listining now....

      Josh

      --
      This post was generated by a Team of Elite Monkeys for br0ken2o0o (569914).
    5. Re:User of the word boxen by doobray · · Score: 1

      inteligence? twice?

    6. Re:User of the word boxen by Anonymous Coward · · Score: 0

      ...which, of course, was patterned after the ox - oxen.

    7. Re:User of the word boxen by Anonymous Coward · · Score: 0

      Strangely enough, any time someone makes a snap judgement based on someone's using a term that is used in common parlance whether the listener thinks it appropriate or not, I write the complainant off as a fucking asshole.

      BTW way to go on the spelling there, professor. That always makes your belittlement of the intellegence of others that much more amusing. Please keep up the good work.

  15. Red Hat Comes with Logwatch by man1ed · · Score: 2, Informative

    Logwatch is a pretty decent system. I comes with Red Hat (and probably other distributions as well) and mails you a summary of the system log. The main thing I use it for is to keep track of what IPs are connecting to which services how many times.

  16. Adminux by jkidd · · Score: 4, Informative

    Have you looked at http://www.adminux.com It does security monitoring, error monitoring, performance monitoring. Cross platform support. It does cost... I used it to monitor 50 HP-UX boxes, 30 AIX boxes, some Suns, and Linux systms.

  17. I rolled my own by MarkusQ · · Score: 2, Interesting

    I rolled my own, mostly in Ruby (and ran it in parallel with the previous solution for several months). The main reason? I wanted to know about the things I wanted to know about, and not have to dig the information out of a lot of other cruft. So I do a lot of filtering to supress details that fall within what I define as "normal" for my setup, and only report the exceptions.

    The main benifit of this turned out to be that I learned a lot about a configuration that I thought I knew inside and out. Yes, it was more work than dropping in a ready made package, but in retrospect it was well worth it.

    -- MarkusQ

  18. LogMon by Atzanteol · · Score: 1



    I wrote an app called LogMon that allows the user to sorta have multiple 'tail -f' sessions in one terminal (does a 'split-screen' effect). Also does syntax coloring in a user configurable file...

    --
    "Ignorance more frequently begets confidence than does knowledge"

    - Charles Darwin
  19. Tabs on Servers? by MegaHamsterX · · Score: 1

    what is the easiest way to keep tabs on all of the activity?

    Well, Office Depot has an excellent selection of tabs, I prefer the plain clear ones, but they also have packs of the colored ones................

    When I fist ran across the problem of monitoring servers, I downloaded every one I could find, got free trials of all the commercial ones. I ended up with netsaint, not because it was better, but because it did exactly what I wanted it to do and nothing more. I wrote a couple of little modules for some switches and I was in business. I needed monitoring yesterday, so I didn't wan't anything too complex, I needed something with a GUI for others, hey it worked....

  20. monitoring, no one size fits all by perlchild · · Score: 5, Insightful

    owing to the fact almost no product will fit everyone's needs

    here are aspects where you can compare what you will find

    aspects of monitoring:
    -availability
    -uptime(subtly different from availability)
    -performance
    -security
    -capacity
    -log or otherwise event-based monitoring

    nature of tools:
    -web based
    -daemon with web based front end
    -daemon without web based front end
    -other

    language tool is written in, license and source
    -closed source, nuff said, available in licensed per cpu, licensed per target/service, etc...
    -open source, but with paid-for license that includes support(shameless plug... I do support for this kinda thing)
    -open source, roll your own support
    -perl
    -php
    -java
    -python
    -c/c++

    integration with other products
    -by snmp traps
    -by snmp agent extensibility(smux/agentx/proxysnmp,etc...)
    -by proprietary methods
    -by sharing a RDBMS with another monitoring tool(usually used for things like remedy ARS)

    measure of performance/capacity/throughput/usage
    -by the exec family of functions
    -by the language of choice's own internal library conventions
    -by snmp
    -by proprietary methods to a Manager of Manager or NMS system
    -by ciscoflow/other hardware vendor's protocol
    -by parsing logs
    -by exec-over-ssh-connexion

    examples that don't fit neatly into any category that comes to mind is monitoring of backups(were they performed, how much, which files were skipped, etc, location in jukebox of which tape for which file...

    Hope this helps you even draw the lines towards evaluating the product that meets YOUR needs

  21. Palantir by hkon · · Score: 3, Informative

    Palantir kan be found at www.netsonde.com. It's a system not entirely unlike Nagios, written mostly in Perl. Works with all the unix-like OSs I can think of in addition to Windows.

  22. my 2 lines of perl... by Smoking · · Score: 3, Informative

    I had good experience with the following tools: cacti
    It's based on RRD the successor of MRTG (not much developed anymore, but still a good tool). Thanks Tobi btw.
    OpenNMS is a really powerful realtime monitoring tool
    Nagios also...
    Don't forget snort for your IDS needs and add acidlab for good visualization of snort's results.

  23. Cacti by jdurham · · Score: 2, Informative

    I've been extremely impressed with Cacti for statistic monitoring. It can be found at: http://www.raxnet.net/products/cacti/ It's quite easy to set up, and for larger sites, it has an excellent user privilege system.

    1. Re:Cacti by Anonymous Coward · · Score: 0

      I concur, cacti is great. The only downside is that there is only one developer and it is moving forward very slowly.

  24. deja intermapper by rakerman · · Score: 1

    InterMapper is what I said the last time someone asked this question on Slashdot.

  25. One size fits none by ader · · Score: 1

    Unfortunately, as you might guess by the wide varity of recommendations here, you need a combination of packages to create a complete solution. There isn't one program that will satisfy all requirements (monitoring, notification, performance stats, reporting, trending, etc.).

    As an example, we use the following:

    Nagios
    Notifications and real-time monitoring.
    Logcheck
    Daily syslog reports.
    cfengine
    Configuration and limited problem correction.
    SAR
    Performance data. Well, it was free with the OS. Unfortunately, we don't have a good solution to collate and analyse this data.
    WebSphere Resource Analyser
    Actually, we just fire this up for a laugh and to impress management. Ghod forbid we ever took anything it said seriously. Avoid proprietary crack!

    There are other tools we run on an adhoc basis, like nmap. I think snort is an excellent security tool, but our network isn't set up to support it yet. If you bite the bullet, you can probably achieve a lot by installing NET-SNMP everywhere, with a decent SNMP monitoring package.

    Remember this: syslog is your friend. If you have a lot of locally-developed scripts that run regularly, you can make a big gain by inserting commands to log important events at a single, reserved syslog priority level, which is directed to a monitored file on a central loghost. E.g.:

    logger -p local1.info -t $0 "ran OK"
    logger -p local1.warning -t $0 "failed"

    etc.

    Be prepared to spend several weeks or months configuring and tuning this stuff to give you what you want. If you want something integrated or complex, be prepared to write the code for gluing it all together.

    Ade_
    /

    --
    Big Bubbles (no troubles) - what sucks, who sucks and you suck
  26. gkrellm by dooby · · Score: 2, Informative
    is what I like to use for monitoring real-time stuff - like if my network traffic suddenly rockets, or memory is disappearing.

    It's skinnable, configurable and supports plugins. I've seen it working on Solaris and Linux, YMMV. It's here (with screenshots).

  27. Zabbix by Tim+Macinta · · Score: 1

    I installed Zabbix on some boxes recently with good results. It monitors the health of your boxes as well as the health of numerous programs running on those boxes and it will email you whenever certain conditions (which you define) change. It focuses more on making sure all programs are running properly and tracking system resources, so it may not be as security oriented as it sounds like you want, but it isn't too hard to add monitoring of new things, so you could probably add triggers for what you consider suspicious without a whole lot of trouble.

  28. Horrible Configuration by waldoj · · Score: 1

    I spent an hour trying to configure Nagios recently before finally giving up. As a result of its great flexibility and tremendous feature set, it's a horrible bitch to configure. Think Sendmail before m4, and you've got a good idea.

    I'll just check back on their site every few months. When they've got m4 for Nagios, we'll talk.

    -Waldo Jaquith

  29. FWIW: Not what you're looking for, but... by Doctor+Hu · · Score: 1

    ... somewhat related. The best situation is where the machines stay stable and don't give trouble in the first place. So avoid bleeding-edge products, use the best-engineered hardware you can afford, and run the machines well within their resource and performance limits. Works for Unix-type machines, and it worked for VMS-controlled boxen back when I was still working with them. Admittedly, it's the 'gold-plated' approach, but if the main thing you need to worry about is whether the box is dead or alive then monitoring becomes much easier.

  30. Re:One size fits all! by Anonymous Coward · · Score: 0
    There isn't one program that will satisfy all requirements (monitoring, notification, performance stats, reporting, trending, etc.).
    I believe you haven't seen Zabbix yet. The software is made as "one size fits all" solution. Monitoring, flexible notifications, performance stats, graphs, system maps, reports, trends, high-level IT service - everything required for monitoring is in place. Check home page of the project to see how it looks like. And I haven't mentioned that this is centralised monitoring system with WEB interface and SQL backend! It does the job for me monitoring more than 40 servers and plenty of workstations.
  31. Sitescope takes the cake! by cplater · · Score: 1

    I would wholeheartedly reccomend SiteScope from Freshwater Software. I was introduced to this software at my last job. It does a great job of monitoring multiple sites on a host, as well as monitoring the host itself (i.e. CPU utilization, memory utilization, etc.)
    The best part about SiteScope is that it does not require any sort of client on the servers that it monitors. It uses SSH/telnet/rlogin/etc to make a connection and use normal system utilities to parse out the data that it needs. You can even monitor NT boxes with SiteScope, but you have to install SiteScope on an NT box in order to remotely monitor other NT boxes.
    It can be pricey, but it is proven. You can also extend it to do whatever types of monitors you can think of via custom scripts that you write. They do offer a free demo verson from their website if you want to try it out.

    --
    -- Charles A. Plater