Monthly Archives: October 2014

Tools to monitor a Redis database?

Redis Commander

Redis-Commander is a node.js web application used to view, edit, and manage a Redis Database

http://joeferner.github.io/redis-commander/

 

Redmon

Simple sinatra based dashboard for redis. After seeing the fnordmetric project I was inspired to write this. Some of the ideas there have be carried over here.

https://github.com/steelThread/redmon

 

Real time dashboard for redis

I often find myself wondering how our redis instances are being used and which areas of the application are the heavy consumers. It’s also useful to predict how the memory consumption is growing over a period of time. Luckily, redis offers a couple of commands, INFO and MONITOR that expose some useful bits of information. Using the data from these two commands, it’s easy to build up a trend over a period of time.

 

http://www.nkrode.com/article/real-time-dashboard-for-redis

 

redis-stat

redis-stat is a simple Redis monitoring tool written in Ruby.

It is based on INFO command of Redis, and thus generally won’t affect the performance of the Redis instance unlike the other monitoring tools based on MONITOR command.

redis-stat allows you to monitor Redis instances

  • either with vmstat-like output from the terminal

  • or with the dashboard page served by its embedded web server.

https://github.com/junegunn/redis-stat

 

sensu – The open source monitoring framework.

Highly Composable

By providing an agent, message bus, & event processor, Sensu enables developers and operations teams to compose comprehensive telemetry systems to meet unique business requirements.

Designed for the Cloud

The Cloud introduces new challenges to monitoring tools, Sensu was created with them in mind. Sensu will scale along with the infrastructure that it monitors.

Passionate Community

The Sensu open source project is propelled by an ever growing community of passionate people, helping each other solve common problems, and working together to create solutions to new problems.

 Uchiwa -Official dashboard

http://sensuapp.org/docs/latest/dashboards_uchiwa

Continue reading sensu – The open source monitoring framework.

etsy/statsd – Network & IT Systems Monitoring

StatsD is a front-end proxy for the Graphite/Carbon metrics server, originally written by Etsy’s Erik Kastner. It is based on ideas from Flickr and this post by Cal Henderson: Counting and Timing. The server was written in Node, though there have been implementations in other languages since then.

A network daemon that runs on the Node.js platform and listens for statistics, like counters and timers, sent over UDP or TCP and sends aggregates to one or more pluggable backend services (e.g., Graphite).

We (Etsy) blogged about how it works and why we created it.

 

Continue reading etsy/statsd – Network & IT Systems Monitoring

Sh*ts that I install on every new server to run wordpress and laravel

  • whois
  • htop
  • iotop (monitorize disk IO)
  • iostat (sysstat – monitorize disk IO)
  • fail2ban
    • sendmail
    • iptables-persistent
  • nginx
  • mysql
  • php-fpm
    • php5-mysql
    • php5-gd
    • php5-json
    • php5-curl
    • php5-mcrypt
    • libssh2-php
    • php5-cli
    • allow short_open_tag = On on /etc/php5/fpm/php.ini
  • curl
  • vnstat
  • vnstati
  • at
    • edit /etc/at.allow and /etc/at.deny to allow/deny specific users

 

– too much IO stats? IO is important!, if we are serving thousands of files per hour.

 

ssdvirtual

 

Continue reading Sh*ts that I install on every new server to run wordpress and laravel

Some MYSQL CLI tricks/commands

Import full mysql dump on CLI

mysql -uroot -p database_name < /file/path/filename.sql

Import full mysql dump on MYSQL CLI

use database_name;
source /file/path/filename.sql;

View users on MYSQL CLI

SELECT User,Host FROM mysql.user;

Delete an user on MYSQL CLI

DROP USER 'testuser'@'localhost';

Change user password on MYSQL CLI

update user set password=PASSWORD('your_new_password') where User='root';

 

Ubuntu 32bits or 64bits?

I’m setting up a new machine with 8cores and 8Gb of RAM.
I had to choose between Ubuntu 32bits or 64bits

Ubuntu 64bits was the choice. Why?

If you have more than 4 GB of RAM go for 64 bit else 32 bit is just fine.

 

Use 64bit in case you do

  • video editing and processing
  • sound editing and processing
  • graphic editing and processing
  • work with large files (e.g. databases, large log files,…)

 

Got it from http://askubuntu.com/questions/19803/for-better-performance-should-i-install-32-bit-or-64-bit

 

 

Simply backups under Linux

Backup a folder

tar -cvpzf /BackupDirectory/backupfilename.tar.gz /ImportantData/directory/path

c =  Create
v =  Verbose mode
p = Preserving Files and Directory Permissions.
z = This will tell tar that compress the files further to reduce the size of tar file.
f =  It is allows to tar get file name.

Backup a MySQL database

mysqldump --opt -u [username] -p[password] [dbname] > [dbname.sql]

Backup all MySQL databases

mysqldump -u root -p --all-databases > all_databases.sql

ssdvirtual