Posts

Observium vs. Cacti

I have deployed observium in an Ubuntu (12.04) today. I have stumbled upon observium while searching for Network Monitoring software, and the demo seemed pretty impressive. The installation was not very hard, and observium has been running quite smoothly. Below, I give my opinion - Both observium and cacti have similar graph. But observium gives cool previews when the cursor is placed over the graph. observium has tool for real time graph ( with update interval as low as 1 sec O_O ) whereas cacti graphs are updated every 5 minutes. observium is an auto-discovery program, whereas in cacti, every graph has to be manually added. By auto-discovery, I mean that whenever a device is added, all possible graphs are automatically generated. Both observium and cacti provide a lot of customization for user access. Still, I think I will be continuing using cacti. The main reason behind this decision is- observium can not work without proper DNS. Actually, auto-discovery protocol states t...

Custom Mail Log Rotation Script

Thanks to google, I was able to find a command to create files as filename_DATE. Usually, all logs are automatically rotated if logrotate is installed. However, I’m creating a custom script to rotate mail logs. Thought I'd share. ^_^ Paste your text here.# vim /root/rotate ##### this script will be used by crond to rotate mail log ##### #!/bin/sh /etc/init.d/postfix stop /etc/init.d/dovecot stop cat /var/log/maillog > "/var/log/maillog_`date '+%d-%m-%Y'`" echo > /var/log/maillog gzip "/var/log/maillog_`date '+%d-%m-%Y'`" /etc/init.d/postfix start /etc/init.d/dovecot start ##### end of script ##### # chmod 744 /root/rotate CRON # crontab -e #### run the script every 10 days #### 00 00 */10 * * /root/rotate :wq /etc/init.d/crond restart

Ipplan on CentOS 6

Image
Ipplan is a cool piece of open source software that can be used to manage IP. It can be used by both Service Providers to maintain their IP block leased from RIRs, as well as by private organizations to keep track of the IP addresses in their LAN. It is a web based application, and setting up is not a tough job. I will be using a CentOS6 box and unzip method. Mysql, php and httpd is needed to run Ipplan. Setting up the dependencies [root@localhost ~]# yum install httpd php-mysql mysql-server php-common unzip php php-cli wget Now that the necessary softwares are installed, time to start 'em. [root@localhost ~]# service httpd start; service mysqld start; chkconfig httpd on; chkconfig mysq Downloading Package Ipplan can be downloaded using the following link [root@localhost ~]# wget http://downloads.sourceforge.net/project/iptrack/ipplan-win/Release%204.92/ipplan-4.92a.zip?r=http%3A%2F%2Fnews.mali77.com%2Findex.php%2F2011%2F03%2Finstalling-ippla...

Nagios: Monitoring a custom

I'm using Debian 6 and Nagios3. Sometimes, it becomes essential to monitor a non-standard port in Nagios. An example may be monitoring TCP port 5555. Before we start, there is something that needs to be known-  Nagios has included a bunch of custom command. The commands are defined in the directory /etc/nagios-plugins/config / The executable for these defined commands are located in /usr/lib/nagios/plugins/ Since we want to monitor a custom TCP port, we will use Nagios's existing TCP checking tool. We will just add port 5555 as an argument to the command. Checking root@dragonfly:~# /usr/lib/nagios/plugins/check_tcp -H 192.168.10.2 -p 5555 TCP OK - 0.001 second response time on port 55|time=0.000502s;;;0.000000;10.000000 So, we can certainly conclude that port 5555 is accessible. Defining the command vim /etc/nagios-plugins/config/tcp_udp.cfg #### ADD THE CUSTOM SECTION #### define command{ command_name check_tcp_5555 command_line $USER1$/c...

GUI Grub Customizer for Ubuntu

Image
For those who want a GUI to easily maintain grub entries, for example, to change the default OS to be booted, here is a handy tool - sudo add-apt-repository ppa:danielrichter2007/grub-customizer sudo apt-get update sudo apt-get install grub-customizer Here's a thumbnail. Grub Customizer Hope this helps.

Secondary DNS Server in CentOS 6

Please consult this article to check how the primary DNS Server is configured in chroot environment. A secondary DNS Server is used as a backup DNS Server in case the primary fails. The configuration is almost identical. Here are the details: Domain: testdom.inv Primary: ns1.testdom.inv (192.168.1.13) Secondary: ns2.testdom.inv (192.168.1.14)   Secondary DNS Server Phase1: Again, the host names must be properly specified. We have to modify the following lines in the mentioned files - [root@centu ~]# vim /etc/sysconfig/network HOSTNAME=ns2.testdom.inv [root@ns2 ~]# vim /etc/hosts 192.168.1.14 ns2.testdom.inv ns2 Finally, we set the resolver IP to the primary DNS Server [root@ns2 ~]# vim /etc/resolv.conf nameserver 192.168.1.13 nameserver 192.168.1.14    Phase 2: Now we set up necessary packages - [root@ns2 ~]# yum install bind bind-chroot Loaded plugins: fastestmirror, presto Determining fastest mirrors Setting up Install...

Primary DNS Configuration in CentOS 6 (with chroot)

This tutorial is based on a previous  article . The configuration of the DNS Servers using chroot and not using chroot are almost identical. Here's how it's done -   Objective We would be configuring the primary DNS Server for the domain testdom.inv (yes, the top level domain is inv i.e. 'invalid').  The FQDN (Fully Qualified Domain Name) of the server is ns1.testdom.inv . This is a simulation , so you better get your Server off the Internet- make sure the Server does not have any real IP make sure that the file /etc/resolv.conf does not contain any IP address of a valid DNS Server. Here is the IP Database DNS Server 192.168.1.13 Web Server 192.168.1.12 FTP Server 192.168.1.11 Procedure Phase1: The first thing when it comes to configuring any Server is setting up the hostname of the Server properly. We have to modify the following lines in the mentioned files - [root@centu ~]# vim /etc/sysconfig/n...