Monitorar Asterisk com Munin

Vamos instalar e configurar o Munin para obter estatísticas com gráficos do Asterisk.
# aptitude install munin munin-node

Após instalado vamos as configurações
# cd /etc/munin
# vi munin.conf

dbdir /var/lib/munin
htmldir /var/www/munin
logdir /var/log/munin
rundir /var/run/munin

Vamos indicar qual servidor iremos monitorar
[TriboSys]
address 127.0.0.1
use_node_name yes

Podemos ainda configurar para enviar alertas por e-mail porem para isso precisamos o sendmail instalado.
contact.admin.command sendmail -t “Munin notification” admin@tribosys.com.br

Vamos aos plugins
# cd /usr/share/munin/plugins/

Para asterisk 1.6
# wget http://www.magnussolution.com/tmp/munin-asterisk.1.6.tar

Para asterisk 1.4
# wget http://www.magnussolution.com/tmp/munin-asterisk.1.4.tar

Descompactando
# tar xvf munin-asterisk-1.x.tar

Ativar plugins no munin-node
# vi /etc/munin/plugins-conf.d/munin-code
[asterisk_*]
user root

Precisamos configurar nosso asterisk tambem gerar as estatisticas atraves do AMI (Asterisk Manager Interface) para isso adicionaremos o conteudo no fim do arquivo manager.conf

# vi /etc/asterisk/manager.conf
[munin]
secret = munin
write = system,call,log,verbose,command,agent,user
read = system,call,log,verbose,command,agent,user

Após as mudanças precisamos alterar todos plugins de:
my $username = $ENV{‘username’};
my $secret = $ENV{‘secret’};
Para:
my $username = $ENV{‘munin’};
my $secret = $ENV{‘munin’};

Criar os links simbolicos para o munin aceitar os plugins.
# cd /etc/munin/plugins
# ln –s /usr/share/munin/plugins/asterisk_channels asterisk_channels
# ln –s /usr/share/munin/plugins/asterisk_sippeers asterisk_sippeers

Iniciamos munin-node:
/etc/init.d/munin-node start

Fonte: http://magnussolution.com/blog-asterisk-billing/36-blog/91-monitorar-asterisk-com-munin-em-centos

4 thoughts on “Monitorar Asterisk com Munin”

  1. Thanks for some quality points there. I am kind of new to online , so I printed this off to put in my file, any better way to go about keeping track of it then printing?

Leave a Reply

Your email address will not be published. Required fields are marked *