Monitoring of Memcached
Memcached is an ideal platform for accelerating application performance. It is important to identify and resolve the problem before it impact business. phpMemcachedAdmin is a great tool to proactively monitor the health and performance of Memcached. It will give you clear picture of hit and miss ratio and as well eviction rate in real time. It also support command execution and dumping keys value.
Configuration Steps:-
1. PhpMemcachedAdmin Installation.
2. Nginx configuration.
3. Check Cache Stats.
1. PhpMemcachedAdmin Installation:-
[js]
cd /var/www/html/admin/
wget
tar xvf phpMemcachedAdmin*
chmod 0777 Config/Memcache.php
chmod 0777 Temp/
[/js]
To edit configuration file run below command:-
[js]
sed -i s/127.0.0.1/<Memcahce End Point>/g Config/Memcache.php
[/js]
2. Nginx configuration:-
In Nginx set credentials, allow access from your IP. So, it can be accessible only from your premises.
[js]
vi /etc/nginx/sites-enabled/default
location /admin/ {
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/.htpasswd/passwd;
allow x.x.x.x; #enter your ip here
allow 127.0.0.1;
deny all;
}
[/js]
With help of htpasswd command set username and password and then restart service:-
[js]
mkdir /etc/nginx/.htpasswd/
htpasswd -c /etc/nginx/.htpasswd/passwd admin
service nginx restart
[/js]
3. Check Cache Stats:-
We have done with configuration steps and to access front end type your server IP in the browser.
I hope it would help you to monitor the availability and statistics of Memcached.