Icinga icon   Icinga – Installation / Setup on Debian Linux (1)

As you can see in previous posts…, Im in love with Nagios to monitor my systems… after creating some powerful, customized plugins for my Checkpoint firewalls, Exchange servers… cannot live with it… but maybe, it's "a bit" old fashioned and I have decided to try the Icinga monitoring tool. If it fits my environment, I'll have to replace my old … Read more

IRONPORT icon   Ironport – Automate commands / scripts from Linux

In a previous post (Linux: SSH connection without password (RSA public-key) I showed the way to configure a non-interactive SSH connection from-to a Linux system.

If the target system is a Ironport ESA device, the configuration is almost the same (generation of the key pair and configuration of the private one). But to install the new public key on … Read more

Linux   Linux – Create custom inetd service

The inetd (also known as superserver) is a daemon that provides (commonly on Linux and Unix systems) internet services. The configuration file inetd.conf contains the list of the offered services by the daemon. The clients connect to certain port and inetd launches the corresponding program to process the connection.

This example shows how to setup a service that executes remote … Read more

Linux   Mounting windows shares (CIFS-SMB) via fstab

Simple CIFS fstab entry

# cat /etc/fstab | grep SHARE
//FILESERVER/SHARE$       /mnt/SHARE     cifs   username=domain\user,password=mypassword 0 0

# mount /mnt/SHARE
# ls -ld /mnt/SHARE/
drwxrwxrwx 1 root root 4096 2014-07-01 08:34 /mnt/SHARE/


Avoid saving plain text password in /etc/fstab

# cat /etc/fstab | grep SHARE
//FILESERVER/SHARE$       /mnt/SHARE     cifs    credentials=/root/.smbcredentials 0 0

# cat /root/.smbcredentials

Dont forget .smbcredentials permissions

Read more

Linux   Linux – Bash scripting useful commands and tips

Some examples of very simple commands and features that become very powerful when used together. In future posts we'll see real examples of bash scripts used to create custom nagios checks/plugins.

Concatenate files – cat

# cat FILE1
this is the file1

# cat FILE2
this is the file2

# cat FILE1 FILE2
this is the file1
this is the 
Read more

Linux   Linux: snmpwalk command mini-howto

snmpwalk command allows us to perform SNMP queries to recover a single or multiple values (depending on the OID we use). I find it very useful in shellscripts, and then configured as Nagios custom service check or plugin.

There are lots of options (this post is a very basic howto. You can read the manpage for further information), but basically … Read more

Linux   Linux: SSH connection without password (RSA public-key)

Configuring an SSH connection based on public key authentication can be very useful to script and automatize tasks. This way the SSH sessions can be non-interactive.

This is the particular example to configure a Nagios system to connect to a Checkpoint VSX, but can be used to connect to any system with SSHD daemon running.

So, in this case we … Read more