th2mil
(usa Ubuntu)
Enviado em 21/11/2011 - 11:28h
Eu não estou rodando a partir do mrtg.cfg
Eu crio um arquivo de configuração pelo cfgmaker --output /etc/mrtg/xxx.cfg comunidade@ip_dispositivo
Quando crio, para o Windows ele retorna uma série de consultas com dados sobre tráfego da rede
Para o linux ou ele não retorna nada, ou as consultas comentadas, porém quando descomento ela não dá resultado nenhum.
# Created by
# /usr/bin/cfgmaker --output /etc/mrtg/teste.cfg public@192.168.1.101
### Global Config Options
# for UNIX
# WorkDir: /home/http/mrtg
# for Debian
WorkDir: /var/www/mrtg/teste
# or for NT
# WorkDir: c:\mrtgdata
### Global Defaults
# to get bits instead of bytes and graphs growing to the right
Options[_]: growright, bits
EnableIPv6: no
######################################################################
# System: Thiago
# Description: Linux Thiago 2.6.35-31-generic #62-Ubuntu SMP Tue Nov 8 14:00:30 UTC 2011 i686
# Contact: Me <me@example.org>
# Location: Sitting on the Dock of the Bay
######################################################################
### Interface 1 >> Descr: 'lo' | Name: 'lo' | Ip: '127.0.0.1' | Eth: '' ###
### The following interface is commented out because:
### * it is a Software Loopback interface
#
# Target[192.168.1.101_lo]: #lo:public@192.168.1.101:
# SetEnv[192.168.1.101_lo]: MRTG_INT_IP="127.0.0.1" MRTG_INT_DESCR="lo"
# MaxBytes[192.168.1.101_lo]: 1250000
# Title[192.168.1.101_lo]: Traffic Analysis for lo -- Thiago
# PageTop[192.168.1.101_lo]: <h1>Traffic Analysis for lo -- Thiago</h1>
# <div id="sysdetails">
# <table>
# <tr>
# <td>System:</td>
# <td>Thiago in Sitting on the Dock of the Bay</td>
# </tr>
# <tr>
# <td>Maintainer:</td>
# <td>Me <me@example.org></td>
# </tr>
# <tr>
# <td>Description:</td>
# <td>lo </td>
# </tr>
# <tr>
# <td>ifType:</td>
# <td>softwareLoopback (24)</td>
# </tr>
# <tr>
# <td>ifName:</td>
# <td>lo</td>
# </tr>
# <tr>
# <td>Max Speed:</td>
# <td>1250.0 kBytes/s</td>
# </tr>
# <tr>
# <td>Ip:</td>
# <td>127.0.0.1 (localhost.localdomain)</td>
# </tr>
# </table>
# </div>
### Interface 2 >> Descr: 'eth0' | Name: 'eth0' | Ip: '192.168.1.101' | Eth: '30-78-30-38-30-30-32-37-34-64-32-66-35-32' ###
### The following interface is commented out because:
### * has a speed of 0 which makes no sense
#
# Target[192.168.1.101_eth0]: #eth0:public@192.168.1.101:
# SetEnv[192.168.1.101_eth0]: MRTG_INT_IP="192.168.1.101" MRTG_INT_DESCR="eth0"
# MaxBytes[192.168.1.101_eth0]: 0
# Title[192.168.1.101_eth0]: Traffic Analysis for eth0 -- Thiago
# PageTop[192.168.1.101_eth0]: <h1>Traffic Analysis for eth0 -- Thiago</h1>
# <div id="sysdetails">
# <table>
# <tr>
# <td>System:</td>
# <td>Thiago in Sitting on the Dock of the Bay</td>
# </tr>
# <tr>
# <td>Maintainer:</td>
# <td>Me <me@example.org></td>
# </tr>
# <tr>
# <td>Description:</td>
# <td>eth0 </td>
# </tr>
# <tr>
# <td>ifType:</td>
# <td>ethernetCsmacd (6)</td>
# </tr>
# <tr>
# <td>ifName:</td>
# <td>eth0</td>
# </tr>
# <tr>
# <td>Max Speed:</td>
# <td>0.0 Bytes/s</td>
# </tr>
# <tr>
# <td>Ip:</td>
# <td>192.168.1.101 (Thiago)</td>
# </tr>
# </table>
# </div>
mrtg /etc/mrtg/teste.cfg
-----------------------------------------------------------------------
ERROR: Mrtg will most likely not work properly when the environment
variable LANG is set to UTF-8. Please run mrtg in an environment
where this is not the case. Try the following command to start:
env LANG=C /usr/bin/mrtg /etc/mrtg/teste.cfg
-----------------------------------------------------------------------
Na pasta quando rodo o env LANG=C mrtg /etc/mrtg/xxx.cfg ele cria o arquivo html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>MRTG Index Page</TITLE>
<!-- Command line is easier to read using "View Page Properties" of your browser -->
<!-- But not all browsers show that information. :-( -->
<meta http-equiv="content-type" content="text/html; charset=iso-8859-15" >
<META NAME="Command-Line" CONTENT="/usr/bin/indexmaker --output=/var/www/mrtg/teste/index.html /etc/mrtg/teste.cfg" >
<META HTTP-EQUIV="Refresh" CONTENT="300" >
<META HTTP-EQUIV="Cache-Control" content="no-cache" >
<META HTTP-EQUIV="Pragma" CONTENT="no-cache" >
<META HTTP-EQUIV="Expires" CONTENT="Mon, 21 Nov 2011 13:24:43 GMT" >
<LINK HREF="favicon.ico" rel="shortcut icon" >
<style type="text/css">
/* commandline was: /usr/bin/indexmaker --output=/var/www/mrtg/teste/index.html /etc/mrtg/teste.cfg */
/* sorry, no style, just abusing this to place the commandline and pass validation */
</style>
</HEAD>
<BODY bgcolor="#ffffff" text="#000000" link="#000000" vlink="#000000" alink="#000000">
<H1>MRTG Index Page</H1>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=10>
<tr>
<td></td>
</tr>
</TABLE>
<BR>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR>
<TD WIDTH=63><A
HREF="http://oss.oetiker.ch/mrtg/"><IMG
BORDER=0 SRC="mrtg-l.png" WIDTH=63 HEIGHT=25 ALT="MRTG"></A></TD>
<TD WIDTH=25><A
HREF="http://oss.oetiker.ch/mrtg/"><IMG
BORDER=0 SRC="mrtg-m.png" WIDTH=25 HEIGHT=25 ALT=""></A></TD>
<TD WIDTH=388><A
HREF="http://oss.oetiker.ch/mrtg/"><IMG
BORDER=0 SRC="mrtg-r.png" WIDTH=388 HEIGHT=25
ALT="Multi Router Traffic Grapher"></A></TD>
</TR>
</TABLE>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
<TR VALIGN=top>
<TD WIDTH=88 ALIGN=RIGHT><FONT FACE="Arial,Helvetica" SIZE=2>
version 2.16.3</FONT></TD>
<TD WIDTH=388 ALIGN=RIGHT><FONT FACE="Arial,Helvetica" SIZE=2>
<A HREF="http://tobi.oetiker.ch/">Tobias Oetiker</A>
<A HREF="mailto:tobi+mrtglink@oetiker.ch"><tobi@oetiker.ch></A>
and <A HREF="http://www.bungi.com/">Dave Rand</A> <A HREF="mailto:dlr@bungi.com"><dlr@bungi.com></A></FONT>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>