como obter um gráfico de largura de banda total em Munin

4

Eu tenho munin-node em uma configuração padrão básica em todos os meus servidores, gostaria de criar um gráfico de resumo que exiba largura de banda total in / out http e outro gráfico mostrando a largura de banda total in / out para todas as interfaces. p>

[Editar] Depois de seguir as primeiras sugestões de pôster, estou no momento aqui;

Estou tentando obter um gráfico SUM agregado de up / down para o serviço if_eth0

com base nos detalhes do FAQ; link

e o exemplo detalhado; link

e este post interessante sobre agregados; link

Eu tenho o seguinte para definir meus hosts em /etc/munin/munin.conf;

    [cirrusj1605.hpl.com]
    address 19x.xx.xx.205
    use_node_name yes
    [cirrusj1606.hpl.com]
    address 19x.xx.xx.206
    use_node_name yes

...

e um host virtual de agregações assim;

[hpl.com; aggregates]         atualizar não         contatos não

    total_bandwidth.graph_title Aggregated bandwidth
    total_bandwidth.upload.label upload
    total_bandwidth.upload.sum \
    cirrusj1605.hpl.com:if_eth0:up \
    cirrusj1606.hpl.com:if_eth0:up

Se eu tentar executar o munin-graph manualmente, recebo o seguinte erro ao produzir cada um dos gráficos;

2011/02/24 20:04:39 [RRD ERROR] Não é possível fazer o gráfico /var/www/html/munin/hpl.com/aggregates/total_bandwidth-month.png: expressão rpn inválida em: az1_0, ONU, 0, az1_0, IF , +

rastro completo segue, qualquer sugestão sobre qual poderia ser o problema?

Obrigado T

> -bash-3.2$ /usr/share/munin/munin-graph --debug
> --nofork --nolazy --host aggregates 2011/02/24 20:04:39 [DEBUG] Creating
> new lock file
> /var/run/munin/munin-graph.lock
> 2011/02/24 20:04:39 [DEBUG] Creating
> lock : /var/run/munin/munin-graph.lock
> succeeded 2011/02/24 20:04:39 Starting
> munin-graph 2011/02/24 20:04:39
> [DEBUG] Doing work synchrnonously
> 2011/02/24 20:04:39 [DEBUG] Node name:
> total_bandwidth 2011/02/24 20:04:39
> [DEBUG] Expanding specials for
> total_bandwidth: "upload". 2011/02/24
> 20:04:39 DEBUG: expand_specials
> (cirrusj1605.hpl.com:if_eth0:up):
> Doing sum... 2011/02/24 20:04:39
> [DEBUG] Checking field lengths for
> total_bandwidth:
> "z1_0=cirrusj1605.hpl.com:if_eth0:up".
> 2011/02/24 20:04:39 [DEBUG] Treating
> fields
> "z1_0=cirrusj1605.hpl.com:if_eth0:up","upload".
> 2011/02/24 20:04:39 [DEBUG] Processing
> field "z1_0" [z1_0]. 2011/02/24
> 20:04:39 [PERL WARNING] Use of
> uninitialized value in subroutine
> entry at
> /usr/lib/perl5/vendor_perl/5.8.8/Munin/Master/GraphOld.pm
> line 757. 2011/02/24 20:04:39 DEBUG:
> single_value: Checking field "z1_0".
> 2011/02/24 20:04:39 DEBUG:
> single_value: Checking field "upload".
> 2011/02/24 20:04:39 [DEBUG] service
> hpl.com :: aggregates ::
> total_bandwidth has 2 elements.
> 2011/02/24 20:04:39 [PERL WARNING] Use
> of uninitialized value in
> concatenation (.) or string at
> /usr/lib/perl5/vendor_perl/5.8.8/Munin/Master/GraphOld.pm
> line 774. 2011/02/24 20:04:39 [DEBUG]
> RRD name / filename: z1_0 / 2011/02/24
> 20:04:39 [PERL WARNING] Use of
> uninitialized value in concatenation
> (.) or string at
> /usr/lib/perl5/vendor_perl/5.8.8/Munin/Master/GraphOld.pm
> line 783. 2011/02/24 20:04:39 [PERL
> WARNING] Use of uninitialized value in
> concatenation (.) or string at
> /usr/lib/perl5/vendor_perl/5.8.8/Munin/Master/GraphOld.pm
> line 785. 2011/02/24 20:04:39 [PERL
> WARNING] Use of uninitialized value in
> concatenation (.) or string at
> /usr/lib/perl5/vendor_perl/5.8.8/Munin/Master/GraphOld.pm
> line 786. 2011/02/24 20:04:39 [DEBUG]
> Field name after cdef set to cdefz1_0
> 2011/02/24 20:04:39 [DEBUG] Drawing
> field "z1_0". 2011/02/24 20:04:39
> 
> rrdtool 'graph' '--font' \
>     'LEGEND:7:/usr/share/fonts/bitstream-vera/VeraMono.ttf'
> \
>     '--font' \
>     'UNIT:7:/usr/share/fonts/bitstream-vera/VeraMono.ttf'
> \
>     '--font' \
>     'AXIS:7:/usr/share/fonts/bitstream-vera/VeraMono.ttf'
> \
>     '-W' \
>     'Munin 1.4.5' \
>     '/var/www/html/munin/hpl.com/aggregates/total_bandwidth-month.png'
> \
>     '--title' \
>     'Aggregated bandwidth - by month' \
>     '--start' \
>     '-33d' \
>     '--height' \
>     '175' \
>     '--width' \
>     '400' \
>     '--imgformat' \
>     'PNG' \
>     'DEF:az1_0=:42:MAX' \
>     'DEF:iz1_0=:42:MIN' \
>     'DEF:gz1_0=:42:AVERAGE' \
>     'CDEF:acdefz1_0=az1_0,UN,0,az1_0,IF,,+'
> \
>     'CDEF:icdefz1_0=iz1_0,UN,0,iz1_0,IF,,+'
> \
>     'CDEF:gcdefz1_0=gz1_0,UN,0,gz1_0,IF,,+'
> \
>     'CDEF:ccdefz1_0=gcdefz1_0' \
>     'COMMENT:      ' \
>     'COMMENT: Cur\:' \
>     'COMMENT:Min\:' \
>     'COMMENT:Avg\:' \
>     'COMMENT:Max\:  \j' \
>     'LINE1.6:gcdefz1_0#00CC00:upload ' \
>     'GPRINT:ccdefz1_0:LAST:%6.2lf%s' \
>     'GPRINT:icdefz1_0:MIN:%6.2lf%s' \
>     'GPRINT:gcdefz1_0:AVERAGE:%6.2lf%s' \
>     'GPRINT:acdefz1_0:MAX:%6.2lf%s\j' \
>     'COMMENT:Last update\: Wed Dec 31 16\:00\:00 1969\r' 2011/02/24 20:04:39
> [RRD ERROR] Unable to graph
> /var/www/html/munin/hpl.com/aggregates/total_bandwidth-month.png
> : invalid rpn expression in:
> az1_0,UN,0,az1_0,IF,,+ 2011/02/24
> 20:04:39
> 
> rrdtool 'graph' '--font' \
>     'LEGEND:7:/usr/share/fonts/bitstream-vera/VeraMono.ttf'
> \
>     '--font' \
>     'UNIT:7:/usr/share/fonts/bitstream-vera/VeraMono.ttf'
> \
>     '--font' \
>     'AXIS:7:/usr/share/fonts/bitstream-vera/VeraMono.ttf'
> \
>     '-W' \
>     'Munin 1.4.5' \
>     '/var/www/html/munin/hpl.com/aggregates/total_bandwidth-week.png'
> \
>     '--title' \
>     'Aggregated bandwidth - by week' \
>     '--start' \
>     '-8d' \
>     '--height' \
>     '175' \
>     '--width' \
>     '400' \
>     '--imgformat' \
>     'PNG' \
>     'DEF:az1_0=:42:MAX' \
>     'DEF:iz1_0=:42:MIN' \
>     'DEF:gz1_0=:42:AVERAGE' \
>     'CDEF:acdefz1_0=az1_0,UN,0,az1_0,IF,,+'
> \
>     'CDEF:icdefz1_0=iz1_0,UN,0,iz1_0,IF,,+'
> \
>     'CDEF:gcdefz1_0=gz1_0,UN,0,gz1_0,IF,,+'
> \
>     'CDEF:ccdefz1_0=gcdefz1_0' \
>     'COMMENT:      ' \
>     'COMMENT: Cur\:' \
>     'COMMENT:Min\:' \
>     'COMMENT:Avg\:' \
>     'COMMENT:Max\:  \j' \
>     'LINE1.6:gcdefz1_0#00CC00:upload ' \
>     'GPRINT:ccdefz1_0:LAST:%6.2lf%s' \
>     'GPRINT:icdefz1_0:MIN:%6.2lf%s' \
>     'GPRINT:gcdefz1_0:AVERAGE:%6.2lf%s' \
>     'GPRINT:acdefz1_0:MAX:%6.2lf%s\j' \
>     'COMMENT:Last update\: Wed Dec 31 16\:00\:00 1969\r' 2011/02/24 20:04:39
> [RRD ERROR] Unable to graph
> /var/www/html/munin/hpl.com/aggregates/total_bandwidth-week.png
> : invalid rpn expression in:
> az1_0,UN,0,az1_0,IF,,+ 2011/02/24
> 20:04:39
> 
> rrdtool 'graph' '--font' \
>     'LEGEND:7:/usr/share/fonts/bitstream-vera/VeraMono.ttf'
> \
>     '--font' \
>     'UNIT:7:/usr/share/fonts/bitstream-vera/VeraMono.ttf'
> \
>     '--font' \
>     'AXIS:7:/usr/share/fonts/bitstream-vera/VeraMono.ttf'
> \
>     '-W' \
>     'Munin 1.4.5' \
>     '/var/www/html/munin/hpl.com/aggregates/total_bandwidth-day.png'
> \
>     '--title' \
>     'Aggregated bandwidth - by day' \
>     '--start' \
>     '-30h' \
>     '--height' \
>     '175' \
>     '--width' \
>     '400' \
>     '--imgformat' \
>     'PNG' \
>     'DEF:az1_0=:42:MAX' \
>     'DEF:iz1_0=:42:MIN' \
>     'DEF:gz1_0=:42:AVERAGE' \
>     'CDEF:acdefz1_0=az1_0,UN,0,az1_0,IF,,+'
> \
>     'CDEF:icdefz1_0=iz1_0,UN,0,iz1_0,IF,,+'
> \
>     'CDEF:gcdefz1_0=gz1_0,UN,0,gz1_0,IF,,+'
> \
>     'CDEF:ccdefz1_0=gcdefz1_0' \
>     'COMMENT:      ' \
>     'COMMENT: Cur\:' \
>     'COMMENT:Min\:' \
>     'COMMENT:Avg\:' \
>     'COMMENT:Max\:  \j' \
>     'LINE1.6:gcdefz1_0#00CC00:upload ' \
>     'GPRINT:ccdefz1_0:LAST:%6.2lf%s' \
>     'GPRINT:icdefz1_0:MIN:%6.2lf%s' \
>     'GPRINT:gcdefz1_0:AVERAGE:%6.2lf%s' \
>     'GPRINT:acdefz1_0:MAX:%6.2lf%s\j' \
>     'COMMENT:Last update\: Wed Dec 31 16\:00\:00 1969\r' 2011/02/24 20:04:39
> [RRD ERROR] Unable to graph
> /var/www/html/munin/hpl.com/aggregates/total_bandwidth-day.png
> : invalid rpn expression in:
> az1_0,UN,0,az1_0,IF,,+ 2011/02/24
> 20:04:39
> 
> rrdtool 'graph' '--font' \
>     'LEGEND:7:/usr/share/fonts/bitstream-vera/VeraMono.ttf'
> \
>     '--font' \
>     'UNIT:7:/usr/share/fonts/bitstream-vera/VeraMono.ttf'
> \
>     '--font' \
>     'AXIS:7:/usr/share/fonts/bitstream-vera/VeraMono.ttf'
> \
>     '-W' \
>     'Munin 1.4.5' \
>     '/var/www/html/munin/hpl.com/aggregates/total_bandwidth-year.png'
> \
>     '--title' \
>     'Aggregated bandwidth - by year' \
>     '--start' \
>     '-400d' \
>     '--height' \
>     '175' \
>     '--width' \
>     '400' \
>     '--imgformat' \
>     'PNG' \
>     'DEF:az1_0=:42:MAX' \
>     'DEF:iz1_0=:42:MIN' \
>     'DEF:gz1_0=:42:AVERAGE' \
>     'CDEF:acdefz1_0=az1_0,UN,0,az1_0,IF,,+'
> \
>     'CDEF:icdefz1_0=iz1_0,UN,0,iz1_0,IF,,+'
> \
>     'CDEF:gcdefz1_0=gz1_0,UN,0,gz1_0,IF,,+'
> \
>     'CDEF:ccdefz1_0=gcdefz1_0' \
>     'COMMENT:      ' \
>     'COMMENT: Cur\:' \
>     'COMMENT:Min\:' \
>     'COMMENT:Avg\:' \
>     'COMMENT:Max\:  \j' \
>     'LINE1.6:gcdefz1_0#00CC00:upload ' \
>     'GPRINT:ccdefz1_0:LAST:%6.2lf%s' \
>     'GPRINT:icdefz1_0:MIN:%6.2lf%s' \
>     'GPRINT:gcdefz1_0:AVERAGE:%6.2lf%s' \
>     'GPRINT:acdefz1_0:MAX:%6.2lf%s\j' \
>     'COMMENT:Last update\: Wed Dec 31 16\:00\:00 1969\r' 2011/02/24 20:04:39
> [RRD ERROR] Unable to graph
> /var/www/html/munin/hpl.com/aggregates/total_bandwidth-year.png
> : invalid rpn expression in:
> az1_0,UN,0,az1_0,IF,,+ 2011/02/24
> 20:04:39 Graphed service :
> total_bandwidth (0.01 sec * 4)
> 2011/02/24 20:04:39 Munin-graph
> finished (0.11 sec)
    
por Tom H 24.02.2011 / 04:25

1 resposta

4

Sim, isso é feito no lado do servidor, criando um gráfico combinado.

Basicamente, é feito descrevendo um novo gráfico na configuração do servidor munin ( munin.conf ), onde os dados representados graficamente são a soma de duas fontes de dados:

[some.machine.boo]
    total_http_bw.graph_order total_received
    total_http_bw.graph_title HTTP traffic recived by machine1 and machine2
    total_http_bw.graph_vlabel Kb/s
    total_http_bw.total_received.label HTTP received traffic
    total_http_bw.total_received.sum \
            machine1.machine.boo:http_bw:received \
            machine2.machine.boo:http_bw:received

Você pode encontrar um exemplo de empilhamento (representando duas fontes de dados uma na parte superior da outra) na web munin local. Se você quiser representar graficamente a soma de duas fontes de dados, você pode usar a função total_received.sum em vez de total_received.stack .

[editar] ive adicionou as estrofes necessárias para ter a largura de banda da interface da rede para essa resposta, pois ela fornece uma resposta mais completa à pergunta original (e eu não posso selecionar 2 respostas corretas, etc.)

Eu tive um lote de problemas para fazer com que as interfaces da rede dessem seus valores como SUM, então aqui está o resultado final de muitas mudanças aleatórias de tentativa e erro para obter um gráfico de linha SUM vários nós munin

    [mydomain.com;aggregates]
    total_bandwidth.graph_args --base 1000 -l 0
    total_bandwidth.cdef 0
    total_bandwidth.graph_category Network
    total_bandwidth.graph_title Aggregated bandwidth
    total_bandwidth.graph_vlabel Bits/sec
    total_bandwidth.upload.label upload
    total_bandwidth.total.graph yes
    total_bandwidth.upload.sum \
    mybox1.mydomain.com:if_eth0.up \
    mybox2.mydomain.com:if_eth0.up
    total_bandwidth.upload.type COUNTER
    total_bandwidth.download.type COUNTER
    total_bandwidth.download.label download
    total_bandwidth.graph_order upload download
    total_bandwidth.total.graph no
    total_bandwidth.download.sum \
    mybox1.mydomain.com:if_eth0.down \
    mybox2.mydomain.com:if_eth0.down

Eu suspeito que algumas dessas diretivas são desnecessárias ou totalmente erradas, mas espero que seja um ponto de partida para qualquer um que tente alcançar o mesmo.

Eu também suspeito que funciona melhor se você explicitamente se certificar de que todos os hosts estão no grupo de agregados, por exemplo, mydomain.com mesmo que seus hosts sejam nomeados incorretamente localmente, por exemplo, hostname -f está errado

    
por 24.02.2011 / 13:18