Nagios: Check iSCSI Initiator

In the last few weeks I reworked our internal Nagios configuration and added a few checks to some of our internal servers. Since we do not have a dedicated SAN for our environment, we are using iSCSI as a low-cost storage solution. However, the Microsoft iSCSI Initiator implementation sometimes has trouble connecting to the iSCSI target. As a result, we had to monitor the iSCSI Initiator.

So here is our implementation of check_iscsi for the Microsoft iSCSI Initiator. It uses the iscsicli utility provided together with the iSCSI Initiator and runs on the remote server. To use it, place the following batch file in the scripts/ folder of your NSClient++ installation.

Read the rest of this entry

WMI client (WMIC) for Linux

One excellent tool for Systems Management on Windows is the Windows Management Instrumentation (WMI), which allows you to remotely execute commands and query parameters on a Windows Host. Of course, all modern Windows systems have the WMI Client installed, but what about the Linux clients?

To get the same functionality on a Linux system (I am using Debian in this example), we need to get the following two packages from this website:

Read the rest of this entry

Freitag Dragnet Review: After one year

About one year ago, I posted my initial review of my Freitag Dragnet bag. Since then, this post has been one of the most successful posts of my site. So here comes the follow-up post with some of my thoughts after one year of usage.


First of all, I am happy to report that the bag is still going strong after all this time and a nearly daily usage (I use this bag for both school and work so it gets a lot of wear and tear). Well, now you can definately tell that the bag is no longer new and got a bit of usage, but it is still without any damages and holds up extremely well. So lets get to it…

Read the rest of this entry

Nagios 3.3.1 “make install”: Error 1

To monitor our software, we use the free Nagios supervision system fitted with custom checks for our application. This way, we can make sure that not only the Operating System is properly monitored but also the core components of our application including the Application Server and the Oracle Databases.

Today I tried to update to the latest version of Nagios 3.3.1 on one of our supervision servers running Ubuntu Server. So I downloaded the package, ran “./configure” and ran “make fullinstall“. I then stumbled upon the following (quite meaningless) error:

/usr/bin/install: omitting directory `includes/rss/extlib'
/usr/bin/install: omitting directory `includes/rss/htdocs'
/usr/bin/install: omitting directory `includes/rss/scripts'
make[1]: *** [install] Error 1
make[1]: Leaving directory `/tmp/nagios-3.3.1/nagios/html'
make: *** [install] Error 2
root@watchtower:/tmp/nagios-3.3.1/nagios#

Phew. Alright, using my trusty friend Google I quickly discovered a thread on ubuntuforums.org with the solution.

Read the rest of this entry

Nicer SQL*Plus prompt

In the last weeks, I had a few projects involving Oracle Advanced Replication and immediately stumbled upon the problem of not knowing which user and which instance was on which prompt. Instead of constantly issuing “SHOW USER” and “SELECT * FROM global_name“, I decided to add a few lines to my glogin.sql.

So before investing precious time, I fired up Google and found that other people also had the idea of changing the SQL*Plus prompt. I found the template for my own glogin.sql here and modified it so it fits my needs.

Note that my script does not display the GLOBAL_NAME of the databse, but only the INSTANCE_NAME read from v$instance. This means the prompt is usually a lot shorter:

repadmin@kdb3:SQL>

To change the prompt, append the following lines to your $ORACLE_HOME/sqlplus/admin/glogin.sql:

Read the rest of this entry

logrotate for the Oracle Listener

When deploying a new database, one thing I usually do is to set up a logrotate configuration for the Oracle Listener log. The Oracle Listener logs every connection he makes and when using an Application Server to interface the database, this file can grow quite a bit. So we need to make sure that we properly rotate this log and compress the old logs.

To achieve this, I usually create the following configuration for logrotate:

Read the rest of this entry

LIGHTTPD: Google+ Redirection

Lately, I have seen a few personal sites that redirect /+ to the personal Google+ profile. I thought “What a good idea!”. Sadly, my quick search on Google itself only showed how to do it with Apache (see here for example). Since I am using lighttpd this obviously does not work for me.

So here is how to do it with lighttpd:

$HTTP["host"] =~ "(^|\.)krenger\.ch" {
        # Redirect /+ to Google+
        url.redirect = ( "^/\+" => "https://plus.google.com/115712438575389450995/about")
}

ORAPWD example

I just noticed that every time I need to create a password file, I have to look up the Oracle documentation for the correct syntax of the ORAPWD arguments. So this post is mainly for my own reference and contains the proper syntax for UNIX and Windows systems as well as an example for each system.

UNIX syntax:

Read the rest of this entry

Hello world

My name is Simon Krenger, I am a Technical Account Manager (TAM) at Red Hat. I advise our customers in using Kubernetes, Containers, Linux and Open Source.

Elsewhere

  1. GitHub
  2. LinkedIn
  3. GitLab