scripting

Monitor Your Site on Google Safe Browsing with Nagios

Submitted by superdave on Sat, 07/31/2010 - 14:21

Today a friend of mine had his site hacked, and when browsing to the site with Google Chrome it warned me that the site was infected with malicious code. Awhile back I provided an article regarding Monitor MythTV with Nagios. I figured I could write a Nagios check to see if a given site was listed on the Google Safe Browsing list.

Convert a Hex Address to an IP Address

Submitted by superdave on Mon, 08/03/2009 - 11:09

Recently I have been using a proprietary application which stores IP address in a hex notation. Unfortunately this hex address is far from useful when doing troubleshooting or diagnosing. Originally I was told to pull each two hex digits and convert them via the calculator of my operating system. This was very manual and annoying to say the least. I decided to write a short script with the limited tools available on the machine I had to use for this purpose. While I am sure there would be a more elegant way of doing this, it gets the job done.

Checking Out Drupal Modules from CVS

Submitted by superdave on Fri, 08/08/2008 - 09:09

One of the great advantages of using Drupal for website content, is the enormous amount of modules available to enhance end-user experiences. In general I try to use the CVS versions of Drupal, for easy upgrade capabilities. In the same way I prefer to use CVS to check-out the modules that I add-on.

I have written a simple script to automate the download of modules from CVS into the site. The script lives outside the Drupal folder, to keep the Drupal folder clean.

Monitor MythTV with Nagios

Submitted by superdave on Wed, 12/26/2007 - 17:58

I have been using MythTV (http://www.mythtv.org) for several years, and recently realized I should better monitor the health of the system. Nagios (http://www.nagios.org) is currently deployed to monitor most of the components (i.e. memory, cpu, disk usage, processes, etc). However, it is not uncommon for issues to arise, which may cause problems with obtaining the Guide Data. I have a desire to create a more thorough system, but have temporarily made a simple check for how many days of guide data is currently available.

Calculate Subnet Information with ipcalc

Submitted by superdave on Mon, 12/03/2007 - 16:53

When doing any moderate to advanced networking, you are likely to have to deal with subnetting. While some people have an ability to do the binary math in their head to figure out the correct subnet-mask, I prefer to use a tool to give me the answer. I have used “ipcalc” on my FreeBSD machines for years, to give me the answers to my subnetting problems. I recently tried to use the ipcalc tool on my Fedora machine and found it to be completely different. Apparently RedHat has developed their own ipcalc tool, with the same name as another project. It is not terribly surprising that this situation could have happened, as both projects attempt to provide similar information.

In my humble opinion the RedHat ipcalc is not nearly as informative as the tool created by Krischan Jodies found at: http://jodies.de/ipcalc At their site they provide an online version, for quick access. If you want to download the tool for use on a Linux/Unix machine, it can be found at: http://jodies.de/ipcalc-archive/

Create Random Passwords with Linux

Submitted by superdave on Mon, 12/03/2007 - 10:21

When creating user accounts on servers and devices, it is important to use strong passwords that will be difficult to guess or crack. It is often preferred to at least create accounts with a random password, and allow the user to change it to something they can remember. A great Linux tool for creating passwords is “pwgen”. Most distributions have “pwgen” available in their package management resources. To install the tool on Fedora, use:

Backup MySQL Databases Automatically on a Linux Server

Submitted by superdave on Sat, 12/01/2007 - 19:00

Dumping a MySQL database to a file is not a difficult task, but it is nice to be able to automate the process and have several versions archived. There is a project called “AutoMySQLBackup” available at: http://sourceforge.net/projects/automysqlbackup/.

Using Samba's smbclient to Backup Files from Linux to a Windows Server

Submitted by superdave on Fri, 08/17/2007 - 17:45

I recently needed to setup a way to backup files from a linux workstation to a windows server. I found that the utility, from the Samba project, smbclient was able to be scripted to provide such services. Smbclient acts much like a command line ftp program.

Syndicate content
Copyright (c) 2007-2011 TechSneeze.com





Add to Technorati FavoritesTechnorati Profile Drupal theme by Kiwi Themes.