Showing posts from August, 2012

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 that every devi…

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

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…

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.

root@dragonfly:~# /usr/lib/nagios/plugins/check_tcp -H -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 commandvim /etc/nagios-plugins/config/tcp_udp.cfg #### ADD THE CUSTOM SECTION #### define command{ command_name check_tcp_5555 command_line $USER1$/check_tcp -h $HOSTADDRESS$ -p …

GUI Grub Customizer for Ubuntu

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.

Hope this helps.