Tuesday, August 14, 2012

Introducing the 'Zabbix Deployment Series'

This article will serve as the jump-spot for the implementation of the Zabbix monitoring system in an environment I recently inherited via a new position.  My goal with Zabbix is to monitoring everything that I can including the approx. 40 devices in the data center location and up to 500,000+ end devices.  To take it one step at a time I will be documenting the initial implementation with the data center devices.  I will outline the contents of the series then link them as each item becomes documented.


Zabbix Homepage: http://www.zabbix.com/


Table of contents:

  • Installation of the Zabbix Monitoring System
  • General Monitoring of Linux Servers
  • Monitoring MySQL (Linux) Servers
  • Monitoring of DNS (Linux) Servers
  • Monitoring of EMC SAN
  • Monitoring of APC RackPDUs
  • Monitoring of VMware ESXi Servers
  • Monitoring of Network Devices

Wednesday, August 8, 2012

rpm --queryformat


Looking to see what packages are installed and their associated version.  A common command associated with the rpm command is `rpm -qa` which will provide details regarding all of the packages installed on the system.


# rpm -qa | head -n 3
libtermcap-2.0.8-46.1
mgetty-1.1.33-9.fc6
cyrus-sasl-plain-2.1.22-5.el5_4.3

There is another option available that will make processing the same information easier for both the eyes and any script that may be processing this information.  The option in question is the `--queryformat` option.  Briefly described in the man page and http://linux.die.net/man/8/rpm with further discussion available via http://rpm5.org/docs/api/queryformat.html  An example is provided below for reference:

# rpm -qa --queryformat '%{NAME}\n' | head -n 3 
libtermcap
mgetty
cyrus-sasl-plain

# rpm -qa --queryformat '%{NAME} %{VERSION}\n' | head -n 3 
libtermcap 2.0.8
mgetty 1.1.33
cyrus-sasl-plain 2.1.22

Further Examples: 
# rpm -qa --queryformat '%{NAME} %{VERSION} %{RELEASE} 
# rpm -qa --queryformat '%{NAME} %{VERSION} %{RELEASE} %{INSTALLTIME}\n'
# rpm -qa --queryformat '%{NAME} %{INSTALLTIME:date}\n'