Aug 7

Howto remote monitor cPanel with Nagios via installing NRPE

Using a Nagios plug-in called  NRPE to monitor the health of a server in conjunction with external checking (aka checking for open ports) gives a little more in-depth check. It can also allow you to catch some problems before they result in a service being unavailable.

Firstly make sure  you have opened the NRPE port on your firewall 5666 tcp.

Install

nagios-plugin installation

cd /usr/src/
/usr/sbin/useradd nagios
passwd nagios
wget http://prdownloads.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.15.tar.gz
tar -xvzf nagios-plugins-1.4.15.tar.gz
cd nagios-plugins-1.4.15
./configure
make
make install
chown nagios.nagios /usr/local/nagios
chown -R nagios.nagios /usr/local/nagios/libexec

Make sure that xinetd has installed on the server. Else install using :

yum install xinetd


Check for Openssl-devel

this should should give a result.

rpm -qa | grep openssl-devel

If you dont please install via yum

yum install openssl*

nrpe daemon installation

cd /usr/src/
wget http://prdownloads.sourceforge.net/sourceforge/nagios/nrpe-2.12.tar.gz
tar -xvzf nrpe-2.12.tar.gz
cd nrpe-2.12
./configure
make all
make install-plugin
make install-daemon
make install-daemon-config
make install-xinetd

edit /etc/xinetd.d/nrpe Change the IP at the “only_from” option. To the IP of the server that will monitor it. Should end up looking like this:

# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 11.11.11.11
}


echo "nrpe 5666/tcp # Nagios Plugin NRPE" >> /etc/services
chkconfig xinetd on
service xinetd restart

That is all that should be needed for the default setup of NRPE checks. The default checks should be found in /usr/local/nagios/etc/nrpe.cfg

To test if this is working from your monitoring nagios server run one of the following (depending where check_nrpe was installed to)

/usr/local/nagios/libexec/check_nrpe -H ip_of_cPanel_server
/usr/lib64/nagios/plugins/check_nrpe -H ip_of_cPanel_server

And all going well should end up with a responce like this
NRPE v2.12

Jul 29

I’ve been working with CSS and HTML for quite some time, PHP almost as long.  One thing that I was never very good at was Javascript, which is weird since PHP and Javascript are both scripting languages.  Not too long ago, Ned got me into jQuery and AJAX.  It is a very powerful tool and I firmly believe that no successful website is complete without it.

Today I created a Header for a Maple Story fan site.  Never played the game personally but it seems to have a pretty strong following.  The site owner found a menu he liked at basilmarket.com and wanted something similar without copying from them.

basilmarketmenu

I spent some time creating the layout which was just HTML and CSS to make thing pretty.  Then I added some simple jQuery and voila, a nice looking menu.

maplepalace

Click the images above and you can see for yourself exactly how the menus work ;)

The menu was built from looking at the image below and seeing how the BasilMarket menu worked.

MaplePalace Concept

MaplePalace Concept

Jul 16

Just installed the new Syntax Highlighter plugin http://alexgorbatchev.com/wiki/SyntaxHighlighter

$foo = "PHP is ";
$bar = "the Awesomest!!!";
echo $foo.$bar;