Archive for the 'Linux Support' Category

We can set up an automatic rsync and place the files into daily folders. For this to work we need to setup automatic ssh login first and then use cron to run your bash script.

The base of the automatic rsync is a very simple bash script.

#!/bin/bash
dest=/backup/buddy/`date +%A`
mkdir -p $dest
rsync -e ’ssh -p 2222′ -avl –delete –stats –progress root@192.168.1.1:/home/buddy $dest/

Using Cron to run the above script every day.

# run rsync at 23.00hrs every day
00 23 * * * sh /home/backup/bin/backup
SBDavid

NRPE

NRPE

NRPE allows you to remotely execute Nagios plugins on other Linux/Unix machines. This allows you to monitor remote machine metrics (disk usage, CPU load, etc.). NRPE can also communicate with Windows agent addons like NSClient++, so you can check metrics on remote Windows machines as well.

http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz

This is useful if you need to monitor local resources/attributes like disk usage, CPU load, memory usage, etc. on a remote host. Similiar functionality can be accomplished by using the check_by_ssh plugin, although it can impose a higher CPU load on the monitoring machine - especially if you are monitoring hundreds or thousands of hosts.

SBDavid

NSClient++

NSClient++

NSClient++ is a windows service that allows performance metrics to be gathered by Nagios (and possibly other monitoring tools). It is an attempt to create a NSClient and NRPE compatible but yet extendable performance service for windows.

http://nsclient.org/nscp/

Using NSClient++ with nagios

http://nsclient.org/nscp/wiki/doc/usage/nagios

NSClient++ supports several transports and you can use either one or several of these or you can create your own cusom transport. Transports are methods which facilitates communication between Nagios and your server. You can look at this much like for instance HTTP (which you are using now) and FTP. They both support transferring files but they have slightly different approaches so things work differently but the end result is the same. A file gets transfered. In our case the end result is that a monitoring result gets submitted to Nagios.

How to do rpm test install to check potential conflicts.

–test Do not install the package, simply check for and report potential conflicts.

–test Don’t really uninstall anything, just go through the motions. Useful in conjunction with the -vv option for debugging.

How can I backup a currently installed RPM

–repackage Re-package the files before erasing.

The previously installed package will be named according to the macro %_repackage_name_fmt and will be created in the directory named by the macro %_repackage_dir (default value is /var/spool/repackage).

–replacefiles

Install the packages even if they replace files from other, already installed, packages.

–replacepkgs

Install the packages even if some of them are already installed on this system.

Once the package has been downloaded, install it with the –repackage option.

This will create an RPM from the existing package and install the new one.

rpm -Fvh –repackage rpm-file-name.rpm

« Prev - Next »