Linux

Useful Linux stuff.

Nagios - Switch Interface Traffic

I recently wanted to start monitoring some ports on my switch stack. Specifically several uplink ports and several trunk ports. Doing a little research I found the best plugin was the "check_iftraffic3" plugin available from the Nagios Plugin Exchange. Ref: http://exchange.nagios.org/directory/Plugins/Network-Connections%2C-Stats-and-Bandwidth/check_iftraffic3/details

How To - Linux Server Performance

It is important to have a basic understanding of how to check out your Linux server's performance to help diagnose / troubleshoot various issues. Below is some useful tools and reference materials I have found helpful.

FIX - CHECK_ESX3.PL Script

In my Nagios testing I was trying to work with the CHECK_ESX3.PL script to run some scripts against the ESX hosts in the environment. I installed the required VMware vSphere Perl SDK (latest from VMware's site). I was able to run "./check_esx3.pl" without any errors. However when I tried to run an actual check against a host I received:

Puppet on Ubuntu Configuration Notes Part 2

Some additional notes after working more with Puppet to try to accomplish the desired results. Specifically I wanted to trigger updates right away in select scenarios vs. waiting until the next puppetd update interval. This can be accomplished with the "puppetrun" command. You need to make a few configuration updates to enable this.

Puppet on Ubuntu Configuration Notes

Knowing I will be working with a cluster of Ubuntu servers that should be identically configured, I decided to teach myself Puppet to simplify the deployment of packages and configurations. Below are some notes on the configuration of the various files. I used NTP as a nice, simple test for a simple service that should be deployed and configured identically on each host.

  

Local Ubuntu Mirror Notes

My notes on configuring a local repository for Ubuntu that hosts on private internal LAN will use to update packages. I installed apt-mirror package on the "master" server. Also a proxy server is in place to protect the LAN.

apache conf file for sharing

Listen 192.168.0.64:8888

  DocumentRoot /storage/aptmirror/repo/mirror

Linux Tip - Disable Reverse DNS for SSHD

A very typical fix to disable DNS reverse lookups by the SSH daemon. Several reasons to disable it including:

  • non-Production test/dev/lab environments where there may be no reverse DNS
  • external facing servers who may get scripted SSH brute force attacks
  • laggy DNS and you really want to get in fast

HowTo: Find ESX Server UUID aka Host ID

Recently I had a need to find the Host ID / UUID of an ESX server for some maintenance tasks.  However it was not nearly as easy as I thought it would be.  After googling around for a bit, I found a link that said I could use the following URL:

https://<ESX HOST IP>/mob/?moid=ha-host&doPath=hardware.systemInfo

Sendmail - Masquerading multiple domains

I have a little VPS that is used as platform for POP'ing and SMTP relaying for internal projects and testing.  Originally it was all setup under a single domain and I had turned on masquerading.  However I needed to add another domain for a different project.

error - expat.h: No such file or directory

While trying to get a perl utility working, I had to install a bunch of prerequisite perl modules on my CentOS 5 VPS.  One requirement was XML::Parser.  However when I tried to install it like so:

[root@localhost]perl -MCPAN -e shell
cpan> install XML::Parser

I received errors with the below being the most relevent bit...