Skip to content

Munin: MySQL InnoDB free tablespace WARN

Munin: MySQL InnoDB free tablespace WARN published on Aucun commentaire sur Munin: MySQL InnoDB free tablespace WARN

Munin: MySQL InnoDB free tablespace WARN :

Comment corriger cette alerte !

 

Editer le fichier /etc/munin/plugin-conf.d/mysql_innodb

Et y mettre ceci :

[mysql_innodb]
env.warning 0
env.critical 0

 

Relancer Munin : /etc/init.d/munin-node restart

 

L’alerte devrait disparaitre

Tutoriel installation de Munin sous Debian

Tutoriel installation de Munin sous Debian published on Aucun commentaire sur Tutoriel installation de Munin sous Debian

Tutoriel : installation de Munin sous Debian

 

https://www.howtoforge.com/tutorial/server-monitoring-with-munin-and-monit-on-debian/

 

  • apt-get update
  • apt-get upgrade
  • apt-get install apache2 libcgi-fast-perl libapache2-mod-fcgid
  • a2enmod fcgid
  • Installer Munin :
    • apt-get install munin munin-node munin-plugins-extra

 

  • Créer des liens symboliques pour MYSQL :
    • cd /etc/munin/plugins
      • ln -s /usr/share/munin/plugins/mysql_ mysql_
      • ln -s /usr/share/munin/plugins/mysql_bytes mysql_bytes
      • ln -s /usr/share/munin/plugins/mysql_innodb mysql_innodb
      • ln -s /usr/share/munin/plugins/mysql_isam_space_ mysql_isam_space_
      • ln -s /usr/share/munin/plugins/mysql_queries mysql_queries
      • ln -s /usr/share/munin/plugins/mysql_slowqueries mysql_slowqueries
      • ln -s /usr/share/munin/plugins/mysql_threads mysql_threads

 

  • Éditer le fichier de configuration de Munin et décommenter les lignes suivantes :
    • nano /etc/munin/munin.conf :
      • dbdir /var/lib/munin
      • htmldir /var/cache/munin/www
      • logdir /var/log/munin
      • rundir /var/run/munin
      • tmpldir /etc/munin/templates
      • # a simple host tree
        [NOM DE VOTRE SERVEUR]
        address 127.0.0.1
        use_node_name yes
        […]

 

  • Sécuriser l’accès :
    • Définir un nom d’utilisateur et un mot de passe :
      • htpasswd -c /etc/munin/munin-htpasswd admin
    • Éditer le fichier de configuration « Apache »  en remplacant avec les lignes suivantes:
      • nano /etc/munin/apache24.conf
      • Alias /munin /var/cache/munin/www
        <Directory /var/cache/munin/www>
        # Require local
        # Require all granted
        AuthUserFile /etc/munin/munin-htpasswd
        AuthName « Munin »
        AuthType Basic
        Require valid-user
        Options None
        </Directory>

        ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph
        <Location /munin-cgi/munin-cgi-graph>
        # Require local
        # Require all granted
        AuthUserFile /etc/munin/munin-htpasswd
        AuthName « Munin »
        AuthType Basic
        Require valid-user
        <IfModule mod_fcgid.c>
        SetHandler fcgid-script
        </IfModule>
        <IfModule !mod_fcgid.c>
        SetHandler cgi-script
        </IfModule>
        </Location>

 

  •   Relancer le service Apache et Munin :
    • Apache : service apache2 restart
    • Munin : service munin-node restart

Munin PortSentry

Munin PortSentry published on Aucun commentaire sur Munin PortSentry

Munin PortSentry

 

portsentry_tcp :

#!/usr/bin/perl -w
#
# Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2 dated June,
# 1991.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place – Suite 330, Boston, MA  02111-1307, USA.
#
# If you improve this script please send your version to my email address
# with the copyright notice upgrade with your name.
#
# Plugin to monitor number of tcp ports attack detected by portsentry
#
# $Log$
# Revision 1.1  2006/03/28 21:04:01  rodo
# Created by Rodolphe Quiedeville
#
# Add following lines to etc/munin/plugin-conf.d/munin-node file
#
# [portsentry*]
#   user root
#
#%# family=network
#%# capabilities=autoconf

use strict;

my ($port,$number,$name);
my (%ports, %names);
my $a = « </var/lib/portsentry/portsentry.blocked.tcp »;
my $line = undef;

if ($ARGV[0] and $ARGV[0] eq « config »)
{
print « graph_title Portsentry TCP Attacks Detected\n »;
print « graph_args –base 1000 -l 0\n »;
print « graph_category network\n »;
print « graph_vlabel attacks blocked\n »;
print « graph_total total\n »;

open(PTCP,$a) || die « cannot open $a: $! »;
while ($line = <PTCP>)
{
$ports{$1}++ if $line =~ /.*Port: ([0-9]+) TCP Blocked$/;
}
close(PTCP);

my @np = (keys(%ports));
foreach my $x (@np) {
$names{$x} = « inconnu »;
open(PETC, »grep $x/tcp /etc/services| ») || die « cannot open /etc/services : $! »;
while ($line = <PETC>){
$names{$x} = $1 if $line =~ /^(\w*)\s*$x\/tcp.*/;
}
close(PETC);
}

while (($port,$number) = each(%ports))
{
print « port_$port.label Port $port\n »;
print « port_$port.info $names{$port}\n »;
}

exit 0;
}

open(PTCP,$a) || die « cannot open $a: $! »;
while ($line = <PTCP>)
{
$ports{$1}++ if $line =~ /.*Port: ([0-9]+) TCP Blocked$/;
}
close(PTCP);

while (($port,$number) = each(%ports))
{
print « port_$port.value $number\n »;
}

# vim:syntax=perl

 

portsentry_udp :

#!/usr/bin/perl -w
#
# Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2 dated June,
# 1991.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place – Suite 330, Boston, MA  02111-1307, USA.
#
# If you improve this script please send your version to my email address
# with the copyright notice upgrade with your name.
#
# Plugin to monitor number of tcp ports attack detected by portsentry
#
# $Log$
# Revision 1.1  2006/03/28 21:04:01  rodo
# Created by Rodolphe Quiedeville
#
#%# family=network
#%# capabilities=autoconf

use strict;

my ($port,$number);
my %ports;
my $a = « /var/lib/portsentry/portsentry.blocked.udp »;
my $line = undef;

if ($ARGV[0] and $ARGV[0] eq « config »)
{
print « graph_title Portsentry UDP Attacks Detected\n »;
print « graph_args –base 1000 -l 0\n »;
print « graph_category network\n »;
print « graph_vlabel attacks blocked\n »;

open(PUDP,$a) || die « cannot open $a: $! »;
while ($line = <PUDP>)
{
$ports{$1}++ if $line =~ /.*Port: ([0-9]+) UDP Blocked$/;
}
close(PUDP);

while (($port,$number) = each(%ports))
{
print « port_$port.label Port $port\n »;
print « port_$port.info Port UDP $port\n »;
}

exit 0;
}

open(PUDP,$a) || die « cannot open $a: $! »;
while ($line = <PUDP>)
{
$ports{$1}++ if $line =~ /.*Port: ([0-9]+) UDP Blocked$/;
}
close(PUDP);

while (($port,$number) = each(%ports))
{
print « port_$port.value $number\n »;
}

# vim:syntax=perl

Primary Sidebar