Problema na geração de gráficos MRTG

1. Problema na geração de gráficos MRTG

Thiago
th2mil

(usa Ubuntu)

Enviado em 21/11/2011 - 11:08h

Estou com problema para geração de gráficos no MRTG.
O arquivo feito com cfgmaker para windows funciona, mas para Linux ele não gera nenhuma consulta válida (ainda não sei porque).

Peguei os scripts abaixo aqui no próprio site, mas quando vou gerar retorna os seguintes erros, alguém sabe o que pode ser.

Estou utilizando o Ubuntu 10.10 e estou tentando gerenciar máquinas com Ubuntu 10.10, Windows XP e Windows 7


2011-11-21 11:00:04: ERROR: Target[tcpopen][_IN_] ' $target->[1]{$mode} ' did not eval into defined data
2011-11-21 11:00:04: ERROR: Target[tcpopen][_OUT_] ' $target->[1]{$mode} ' did not eval into defined data


2011-11-21 11:00:04: ERROR: Target[cpuidle][_IN_] ' $target->[2]{$mode} ' did not eval into defined data
2011-11-21 11:00:04: ERROR: Target[cpuidle][_OUT_] ' $target->[2]{$mode} ' did not eval into defined data


2011-11-21 11:00:04: ERROR: Target[root_boot_disk][_IN_] ' $target->[3]{$mode} ' did not eval into defined data
2011-11-21 11:00:04: ERROR: Target[root_boot_disk][_OUT_] ' $target->[3]{$mode} ' did not eval into defined data


2011-11-21 11:00:04: ERROR: Target[memory][_IN_] ' $target->[4]{$mode} - $target->[5]{$mode} - $target->[6]{$mode} ' (warn): Use of uninitialized value in subtraction (-) at (eval 8841) line 1.
2011-11-21 11:00:04: ERROR: Target[memory][_OUT_] ' $target->[4]{$mode} - $target->[5]{$mode} - $target->[6]{$mode} ' (warn): Use of uninitialized value in subtraction (-) at (eval 8842) line 1.


2011-11-21 11:00:04: ERROR: Target[swap_memory][_IN_] ' $target->[7]{$mode} - $target->[8]{$mode} ' (warn): Use of uninitialized value in subtraction (-) at (eval 9410) line 1.
2011-11-21 11:00:04: ERROR: Target[swap_memory][_OUT_] ' $target->[7]{$mode} - $target->[8]{$mode} ' (warn): Use of uninitialized value in subtraction (-) at (eval 9411) line 1.


Estou utilizando a comunidade public e o IP dos equipamentos aqui.

Target[tcpopen]: tcpCurrEstab.0&tcpCurrEstab.0:COMMUNITY@IP_SERVIDOR
Options[tcpopen]: nopercent, gauge
Title[tcpopen]: Open TCP connections
PageTop[tcpopen]: <h1>Open TCP connections</H1>
MaxBytes[tcpopen]: 1000000
YLegend[tcpopen]: # conns
ShortLegend[tcpopen]: connections
LegendI[tcpopen]: Connections:
LegendO[tcpopen]:
Legend1[tcpopen]: Open TCP connections

Target[cpuidle]: ssCpuRawIdle.0&ssCpuRawIdle.0:COMMUNITY@IP_SERVIDOR
# put here 100 * the number of cpu's you have
MaxBytes[cpuidle]: 100
Title[cpuidle]: CPU IDLE time percentage
PageTop[cpuidle]: <H1>CPU IDLE time percentage </H1>
ShortLegend[cpuidle]: %
YLegend[cpuidle]: CPU Utilization
Legend1[cpuidle]: IDLE CPU in % (Load)
Legend2[cpuidle]:
Legend3[cpuidle]:
Legend4[cpuidle]:
LegendI[cpuidle]: idle:
LegendO[cpuidle]:
Options[cpuidle]:

Target[root_boot_disk]: dskPercent.1&dskPercent.1:COMMUNITY@IP_SERVIDOR
MaxBytes[root_boot_disk]: 100
Title[root_boot_disk]: DISK USAGE
PageTop[root_boot_disk]: <H1>DISK /root and /boot Usage %</H1>
Unscaled[root_boot_disk]: ymwd
ShortLegend[root_boot_disk]: %
YLegend[root_boot_disk]: DISK Utilization
Legend1[root_boot_disk]: / disk:
Legend2[root_boot_disk]:
Legend3[root_boot_disk]:
Legend4[root_boot_disk]:
LegendI[root_boot_disk]: / disk:
LegendO[root_boot_disk]:
Options[root_boot_disk]: gauge,nopercent

Target[memory]:memTotalReal.0&memTotalReal.0:COMMUNITY@IP_SERVIDOR - memAvailReal.0&memAvailReal.0:COMMUNITY@IP_SERVIDOR - memCached.0&memCached.0:COMMUNITY@IP_SERVIDOR
MaxBytes[memory]: 520000
Title[memory]: Physical memory usage
PageTop[memory]: <H1>Physical memory usage</H1>
Unscaled[memory]: ymwd
YLegend[memory]: Memory Usage
Legend1[memory]: Real memory in use
Legend2[memory]:
Legend3[memory]:
Legend4[memory]:
LegendI[memory]: real mem in use :
LegendO[memory]:
ShortLegend[memory]: B
kMG[memory]: K,M,G,T,P
Options[memory]: gauge,nopercent

Target[swap_memory]:memTotalSwap.0&memTotalSwap.0:COMMUNITY@IP_SERVIDOR - memAvailSwap.0&memAvailSwap.0:COMMUNITY@IP_SERVIDOR
MaxBytes[swap_memory]: 1010000
Title[swap_memory]: Swap memory usage
PageTop[swap_memory]: <H1>Swap memory usage</H1>
Unscaled[swap_memory]: ymwd
YLegend[swap_memory]: Memory Usage
Legend1[swap_memory]: Swap memory in use
Legend2[swap_memory]:
Legend3[swap_memory]:
Legend4[swap_memory]:
LegendI[swap_memory]: Swap mem in use :
LegendO[swap_memory]:
ShortLegend[swap_memory]: B
kMG[swap_memory]: K,M,G,T,P
Options[swap_memory]: gauge,nopercent


Obrigado


  


2. Re: Problema na geração de gráficos MRTG

Thiago
th2mil

(usa Ubuntu)

Enviado em 22/11/2011 - 10:13h

Estou utilizando a seguinte consulta

Target[memory]: 3.6.1.4.1.2021.4.11.0:public@192.168.1.101
MaxBytes[memory]: 520000
Title[memory]: Physical memory usage
PageTop[memory]: <H1>Physical memory usage</H1>
Unscaled[memory]: ymwd
YLegend[memory]: Memory Usage
Legend1[memory]: Real memory in use
#Legend2[memory]:
#Legend3[memory]:
#Legend4[memory]:
#LegendI[memory]: real mem in use :
#LegendO[memory]:
ShortLegend[memory]: B
kMG[memory]: K,M,G,T,P
Options[memory]: gauge,nopercent


Se faço por
snmpwalk -c 2v public 192.168.1.101 .1.3.6.1.4.1.2021.4.11.0  
ele retorna a informação correta

Porém quando executo dá o seguinte erro

env LANG=C mrtg /etc/mrtg/teste.cfg

[code]SNMP Error:
Received SNMP response with error code
error status: noSuchName
index 2 (OID: 1.3.6.1.2.1.2.2.1.16.0)
SNMPv1_Session (remote host: "192.168.1.101" [192.168.1.101].161)
community: "public"
request ID: 682391940
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/share/perl5/SNMP_util.pm line 492
SNMPGET Problem for ifInOctets.0 ifOutOctets.0 sysUptime sysName on public@200.131.34.96::::::v4only
at /usr/bin/mrtg line 2251
2011-11-22 10:09:20: ERROR: Target[memory][_IN_] '1.3.6.1.4.1.2021.4.11. $target->[1]{$mode} ' (warn): Use of uninitialized value in concatenation (.) or string at (eval 3246) line 1.
2011-11-22 10:09:20: ERROR: Target[memory][_OUT_] '1.3.6.1.4.1.2021.4.11. $target->[1]{$mode} ' (warn): Use of uninitialized value in concatenation (.) or string at (eval 3247) line 1.






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts