Bonjour,
J'ai renseigné le répertorie de travail (WorkDir) dans le fichier mrtg.cfg.
Effectué la configuration du MRTG mais lorsque j'effectue la commande :
env LANG=C /usr/bin/mrtg /var/www/mrtg/mrtg.cfg
J'ai l'erreur suivante :
SNMP Error:
no response received
SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
community: "public"
request ID: 616563925
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/bin/../lib64/mrtg2/SNMP_util.pm line 492
SNMPGET Problem for ifInOctets.2 ifOutOctets.2 sysUptime sysName on public@localhost::::::v4only
at /usr/bin/mrtg line 2202
2009-02-25 11:54:41: WARNING: skipping because at least the query for ifInOctets.2 on localhost did not succeed
2009-02-25 11:54:41: WARNING: no data for ifInOctets&ifOutOctets:public@localhost. Skipping further queries for Host localhost in this round.
sh: lynx: command not found
2009-02-25 11:54:51: ERROR: Target[localhost_2][_IN_] ' $target->[0]{$mode} ' did not eval into defined data
2009-02-25 11:54:51: ERROR: Target[localhost_2][_OUT_] ' $target->[0]{$mode} ' did not eval into defined data
Je vous montre le contenu du fichier mrtg.cfg
### http://www.monsiteweb.fr
#active ou non l' ipV6
EnableIPv6: no
#indique le repertoire de travail
WorkDir: /var/www/mrtg/
#indique la langue
Language: french
#indique les options qui seront appliquees en generale
Options[_]: bits,growright
######################################################################
# System: localhost
# Description:
# Contact: contact @ siteweb.fr
# Location:XXXXXXXXXX
######################################################################
###interface localhost que je ne souhaite pas monitorer
### Interface 1 >> Descr: 'lo' | Name: '' | Ip: '127.0.0.1' | Eth: '' ###
### The following interface is commented out because:
### * it is a Software Loopback interface
#
# Target[192.168.0.2_1]: 1:public@192.168.0.2:
# SetEnv[192.168.0.2_1]: MRTG_INT_IP="127.0.0.1" MRTG_INT_DESCR="lo"
# MaxBytes[192.168.0.2_1]: 1250000
# Title[192.168.0.2_1]: lo -- z1on
# PageTop[192.168.0.2_1]: <H1>lo -- z1on</H1>
# <TABLE>
# <TR><TD>System:</TD> <TD>z1on in titaxium.net</TD></TR>
# <TR><TD>Maintainer:</TD> <TD>titax@rezium.net</TD></TR>
# <TR><TD>Description:</TD><TD>lo </TD></TR>
# <TR><TD>ifType:</TD> <TD>softwareLoopback (24)</TD></TR>
# <TR><TD>ifName:</TD> <TD></TD></TR>
# <TR><TD>Max Speed:</TD> <TD>10.0 Mbits/s</TD></TR>
# <TR><TD>Ip:</TD> <TD>127.0.0.1 (z1on)</TD></TR>
# </TABLE>
### Interface de liaison avec internet que je monitor
### Interface 2 >> Descr: 'eth0' | Name: '' | Ip: 'XXXXXXXX' | Eth: '00-10-ee-68-dd-81' ###
Target[localhost_2]: 2:public@localhost:
SetEnv[localhost_2]: MRTG_INT_IP="XXX.XXX.XXX.XXX" MRTG_INT_DESCR="eth0"
MaxBytes[localhost_2]: 12500000
Title[localhost_2]: eth1 -- SiteWeb
PageTop[localhost_2]: <H1>eth1 -- Machine</H1>
#---------Apache hits-----------------------
Target[apache]: `/var/www/mrtg/webstat.pl hits`
Options[apache]: perhour, nopercent, growright, noinfo, nobanner, noi
MaxBytes[apache]: 1000000
YLegend[apache]: hits/heure
ShortLegend[apache]: par heure
LegendO[apache]: Hits:
Legend2[apache]: Hits horaires
Legend4[apache]: Hits Horaires max
Title[apache]: Hits horaires du serveur Apache
#PageTop[apache]: Hits Apache tous sites
PageTop[apache]: <H1>Hits Apache tous sites</H1>
WithPeak[apache]: wmy
#------------End Apache Hits------------------
J'ai mis le fichier webstat.pl dans /var/www/mrtg/ et rendu exécutable par chmod .
En vous remerciant pour votre aide.
Cordialement.