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
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
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
I was looking for a way to access my Ironport appliance folders remotely so I can execute scripts applied to them.
By installing the curlftpfs package and configuring a fstab entry I have been able to access via a local mount the contents my Ironport offers via FTP
Install the curlftpfs package
This example is for Debian, but the package … Read more
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 username=domain\user password=mypassword
Dont forget .smbcredentials permissions
… Read more
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
… Read more
# cat FILE1 this is the file1 # cat FILE2 this is the file2 # cat FILE1 FILE2 this is the file1 this is the
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
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