Vim: vim behaves as vi and drives you nuts – how to fix

For some reason vim on Debian went crazy and stopped worked as vim. This is how to make it work like vim instead of vi.

cp /usr/share/vim/vim74/vimrc_example.vim ~/.vimrc

and change

" In many terminal emulators the mouse works just fine, thus enable it.
if has('mouse')
set mouse=a
endif

to

" In many terminal emulators the mouse works just fine, thus enable it.
if has('mouse')
set mouse=r
endif

Hooray.

Monitoring Galera cluster using Percona Nagios plugins on Debian

1. Download the repository packages:

wget https://repo.percona.com/apt/percona-release_0.1-3.$(lsb_release -sc)_all.deb

2. Install it:

dpkg -i percona-release_0.1-3.$(lsb_release -sc)_all.deb

3. Update the packages list:

apt-get update

4. Install

apt-get install percona-nagios-plugins

5. Grant the privileges:

GRANT USAGE, SELECT, REPLICATION CLIENT on *.* to 'test'@'localhost' IDENTIFIED BY 'password';

6. Test:

/usr/lib64/nagios/plugins/pmp-check-mysql-status -x wsrep_cluster_status -C == -T str -c non-Primary -l test -p password