Thanks for visiting! Don't forget to visit "Techno Blogs"

Jul 25

Sys Admin go crazy when they are unable to run some commands. Recently I found that people have been facing lots of issues while copying huge files over to a remote server via “scp” command.  This mainly happens when the connections gets closed and the scp command does not restart itself once the connection is established again with the remote server. SCP also fails to transfer file when there are limits set on server for transfers at various levels.

To over come this issue, we could use rsync command. It resumes the download process unlike scp.

Here is how rsync command looks :

rsync --partial --progress --rsh=ssh --archive <source file> <destination>

if you don’t want to recall all the options mentioned above and  would like to continue using a command which is just like scp, continue reading.

I just created an alias called rscp (resumable scp) with the options mentioned above.

alias rscp="rsync --partial --progress --rsh=ssh --archive"

You can  execute the above line in the console before using the rscp command to transfer the files. Or you can even put this inside .profile or .bashrc file of your home directory. (Do ensure that you open a new shell before you use the command if you’re adding the alias line in .bashrc or .profile as these files will be read when a new shell is opened)

Now its time to use your alias :

rscp <sourcefile> <destination>

The transfer will not break like earlier.  Let me know if you still continue facing error with this.

Jul 25

I couldn’t belive that FM stations started giving more preferences to Kannada songs and there is more Kannada to listen whole day to the entire city.

Here is a small video from UTVi Coverage and an article which talks about the statistics and truth behind the same.

Jul 25

Serial bomb blast shatters the busy life of Bangalore today afternoon. Investigation is on and you can get the live updates on NDTV at the moment.

Here is more from Rediff news as I write this post :

9 blasts rock Bengaluru; 2 killed, 6 injured

Terrorism is on, but Why?

Did intelligence and authorities know about this?

Who is responsible?

Jul 25

You had read about nagios plugin which I use in my firefox browser in my previous articles. Let me give you an insight about nagios remote server monitoring. Nagios has been a reliable monitoring tool for many clients for years now.

Nagios comes with lots of plugins which can be used to fine tune the results. While monitoring the remote servers we need to check the service status locally on those servers to understand the condition of service status. check_nrpe is one of those tools which facilitates this feature on Nagios.

The NRPE addon is designed to allow you to execute Nagios plugins on remote Linux/Unix machines. The main reason for doing this is to allow Nagios to monitor “local” resources (like CPU load, memory usage, etc.) on remote machines. Since these public resources are not usually exposed to external machines, an agent like NRPE must be installed on the remote Linux/Unix machines.

The NRPE addon consists of two pieces:

  • The check_nrpe plugin, which resides on the local monitoring machine
  • The NRPE daemon, which runs on the remote Linux/Unix machine

When Nagios needs to monitor a resource of service from a remote Linux/Unix machine:

  • Nagios will execute the check_nrpe plugin and tell it what service needs to be checked
  • The check_nrpe plugin contacts the NRPE daemon on the remote host over an (optionally) SSL-protected connection
  • The NRPE daemon runs the appropriate Nagios plugin to check the service or resource
  • The results from the service check are passed from the NRPE daemon back to the check_nrpe plugin, which then returns the check results to the Nagios process.

Note: The NRPE daemon requires that Nagios plugins be installed on the remote Linux/Unix host. Without these, the daemon wouldn’t be able to monitor anything.

Today I found the answer for one of my questions. I wanted to monitor a server which is not directly connected to internet. I used the above mentioned NRPE plugin to check the status of MySQL service via an another server which had privilege to interact with the db server. It has been made possible via Nagios Indirect checks via check_nrpe. You can find the block diagram explaining the same below.

Its quite easy to configure this just like any other remote service checks done via nrpe daemon. Now I can monitor anything on servers which are locked in a DMZ. Nagios and NRPE made for each other.

Read more : Nagios