Tag: perl

Monitoring the servers could be well – “not difficult” but boring and monotonous. And since this is something that you should ideally do on daily basis, so why not have a script for the same.

You can’t possibly copy your ssh-keys to all the servers that you are monitoring, better if you can, then you need to do ssh to server with password. So, here is link to my github repo for monitoring servers with perl script. Preety straight forward script and you can schedule this in cron to get a daily mail.

SysUsage grabs all system activities using Sar and system commands allowing
you to keep tracks of your computer or server activity during his life.
It is a great help for performance analysis and resources management. The
threshold notification can alarm you when the system capabilities are
reached by sending SMTP messages or throught Nagios reports.

By default it will monitor all you need to know on your server activity, it
is written in Perl and should works on all Unix like plateforms. It doesn’t
require a Database system like MySQL or PostgreSQL but lie on rrdtool. In
addition you can embeded your own plugins written in any programing language.

Since release 5.0 SysUsage can be run from a centralized place where
collected statistics will be stored and where graphics will be rendered.
Unless other monitoring tools with lot of administration work, SysUsage is
design to have the lesspossible things to configure and a high level of admin
system knowledge. Each server can also be self monitored and you just have to
connect your browser to the web interface to know his health level.

SysUsage is design with simplicity in mind. I want all relevant statistics
from my servers within an intuitive web interface and without spending too
much time to configure it, if you know Nagios, you know what I mean. You will
especially like SysUsage for that.

And now for the installation:

sudo yum install sysusage sysusage-httpd

Once you have installed, you would need to enable the crontab to collect the data. And the sysusage-httpd is for the apache server configure to enable you to access http://localhost/sysusage

And you are done. It pretty good to see the overall system usage wrt to CPU, Disk and network.

To create simple text tables to paste in emails or to use in any other document where you want to show a table, here is something that you can use. There is a perl module which provides “tablify“. And here is how to use it:

sudo yum install perl-Text-RecordParser

This will install a command “tablify” that you can use in number of ways. Here is a simple example to use it. You can read the man pages to see how you can use it.