Working on a little script the other day I had the need to determine if the input to the script was coming from a pipe or from the terminal. Seems like a simple enough thing to determine but nothing jumped immediately to mind and a quick internet search didn't help much either. After a bit of pondering I came up with two solutions: the stat command and using information from the proc file system.
Alert Manager was created to run a (alert) command, monitor the status of that command's output, and guarantee that if something goes wrong it won't go unnoticed. Alert Manager has been successfully deployed in several fortune 500 companies providing guaranteed alert delivery and command execution. It has a very flexable configuration file that allows creation of "alert chains" - chains of commands, each with their own fallback command, failure command, timeout, retry counter, and other advanced options. It has a method for passing messages from the command line into the various commands defined in the configuration file and many other useful features. Alert Manager is licensed under the GPL.
Logdog is a tool that monitors messages passing through syslogd and takes action based on key words and phrases. Logdog has a configuration file which allows you to specify a list of key words or phrases to alert on, and a list of commands that can be run when those words are encountered. Logdog is licensed under the GPL.
swatch (the “Simple WATCHer”) does. swatch, written 100% in Perl, monitors logs as they're being written to and takes action when it finds something you've told it to look for. This simple, flexible and useful tool is a must-have for any healthily fearful system administrator.
5. Optimizing NFS Performance Getting network settings right can improve NFS performance many times over -- a tenfold increase in transfer speeds is not unheard of. The most important things to get right are the rsize and wsize mount options. Other factors listed below may affect people with particular hardware setups.
Modular Object-Oriented Dynamic SpreadSheet (Moodss) is a graphical monitoring application with a complete graphical user interface (GUI) to conveniently monitor network services and send alerts when thresholds are crossed. Moodss is a deceptively simple tool that could characterized as a dynamic network-aware spreadsheet. It can poll devices using the Simple Network Management Protocol (SNMP), receive and send SNMP traps, and perform network service checks via Nagios plug-ins. It can optionally be used with the Modular Object-Oriented Multi-Purpose Service (Moomps) monitoring daemon to delegate monitoring tasks to a separate lightweight application after all thresholds have been defined with Moodss. The best way to see how Moodss operates is to walk through some examples so that’s what I’ll do in the steps below. I wish to give special thanks to Jean-Luc for his valuable assistance with Moodss on OS X, and for writing such a fine program.
"Make Open Source Monitoring Easy Lilac is a configuration tool for Nagios, the industry standard in open source monitoring. Lilac makes configuration easy with simple to use screens and tools for auto-discovery and importing of existing configurations. Lilac is an open source application under the GPLv2 license. It is a project provided and maintained by Lilac Networks, a provider of quality support and services for open source monitoring solutions. "
"LVM cannot stop/remove LV, cannot stop/delete dead RAID situation. Hi, I am having an issue with LVM and RAID in some failure cases: It seems that any operations on a LVM LV (lvchange, lvremove, etc..), require this LV's metadata to be readable. In case a LVM LV is setup ontop of a RAID 0, or a RAID 5 for instance, if two disks are lost from the RAID array, the array dies. Now that the array is dead, I would like to recreate a new RAID 0 or 5 using the remaining alive disks and some new ones. For this reason, I'd like to stop the previous dead RAID using mdadm. However, because the LVM LV does still exists, it seems to have a handle on the dead RAID, as shon below: # /opt/soma/bin/mdadm/mdadm --stop /dev/md/d0 raid manager: fail to stop array /dev/md/d0: Device or resource busy Perhaps a running process, mounted filesystem or active volume group?"
Here's a dirty script I wrote to install nagios and Lilac on a clean CentOS 5.4 install. This script doesn't care about anyone other than itself (it'll change the mysql password for instance) so may not be entirely perfect for your needs.
SystemImager is software which automates Linux installs, software distribution, and production deployment. SystemImager makes it easy to do automated installs (clones), software distribution, content or data distribution, configuration changes, and operating system updates to your network of Linux machines. You can even update from one Linux release version to another! It can also be used to ensure safe production deployments. By saving your current production image before updating to your new production image, you have a highly reliable contingency mechanism. If the new production enviroment is found to be flawed, simply roll-back to the last production image with a simple update command! Some typical environments include: Internet server farms, database server farms, high performance clusters, computer labs, and corporate desktop environments.
Central Loghost Mini-HOWTO This page is simply a collection of open source tools you can use to glue together your own centralized (syslog) loghost. Included are example configuration settings so that you can configure your loghost in a manner similar to mine. There is very little that you need to read and understand in order to use these tools. Also, these tools are widely used and therefore easy to get help with on internet mailing lists. I established a centralized location for syslog collection in order to facilitate: Log reporting real time alerting periodic (several times per day) summary reporting Log storage long term archival for possible later analysis Tools used: UNIX hosts (Linux and Solaris) Modified logcheck script(s). Syslog-NG Swatch though I'm slowly moving to SEC, this page will be updated once I've completely switched Splunk for a GUI interface Stunnel