Monthly Archives: November 2013

centos install munin

yum –enablerepo=epel -y install munin munin-node
vi /etc/httpd/conf/httpd.conf:

Alias /munin /var/www/html/munin

Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all

/etc/init.d/httpd restart
chkconfig –levels 235 munin-node on
/etc/init.d/munin-node start

munin add mysql plugins

# Save this to /etc/munin/plugin-conf.d/mysql_
[mysql_*]
env.mysqlconnection DBI:mysql:mysql;host=127.0.0.1;port=3306
env.mysqluser munin
env.mysqlpassword pass

mysql> CREATE USER [email protected] IDENTIFIED BY ‘pass’;
mysql> GRANT SUPER,PROCESS ON *.* TO [email protected];
mysql> GRANT SELECT ON mysql.* TO [email protected];
mysql> FLUSH PRIVILEGES;

yum install perl-Cache-Cache

munin-node-configure –suggest 2>&1 | grep mysql
(munin-node-configure –shell 2>&1 | grep mysql | /bin/bash); service munin-node restart

check:
munin-run mysql_connections
max_connections.value 151
Max_used_connections.value 3
Aborted_clients.value 2
Aborted_connects.value 1
Threads_connected.value 3
Connections.value 36

telnet localhost 4949
Trying 1.2.3.4…
Connected to localhost.
Escape character is ‘^]’.
# munin node at localhost
fetch mysql_connections
max_connections.value 151
Max_used_connections.value 3
Aborted_clients.value 2
Aborted_connects.value 1
Threads_connected.value 3
Connections.value 38
.
quit
Connection closed by foreign host.

fail2ban configuration files

/etc/fail2ban/
├── action.d
│ ├── dummy.conf
│ ├── hostsdeny.conf
│ ├── iptables.conf
│ ├── mail-whois.conf
│ ├── mail.conf
│ └── shorewall.conf
├── fail2ban.conf
├── fail2ban.local
├── filter.d
│ ├── apache-auth.conf
│ ├── apache-noscript.conf
│ ├── couriersmtp.conf
│ ├── postfix.conf
│ ├── proftpd.conf
│ ├── qmail.conf
│ ├── sasl.conf
│ ├── sshd.conf
│ └── vsftpd.conf
├── jail.conf
└── jail.local

this will dumps current configuration:

fail2ban-client -d

/usr/libexec/gam_server

Gamin is a file and directory monitoring system which allows applications to detect when a file or a directory has been added, removed or modified by somebody else.

Gamin has been designed as a drop-in replacement for FAM with security and maintainability in mind and can use Linux’s advanced inotify service when available.