Probleme mit MRTG

Benny²

Member
Hallo,

in diesem Tutorial habe ich einfahc mal bei mir auf den Server gezogen und etwas bearbeitet. Nun sieht meine Config so aus:

# Created by
# /usr/bin/cfgmaker public@localhost


### Global Config Options

# for UNIX
# WorkDir: /home/http/mrtg

# for Debian
WorkDir: /var/www/virtual/eplay-tv.de/status/htdocs

# 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: ksxxxxxx.kimsufi.com
# Description: Linux ksxxxxxx.kimsufi.com 2.6.38.2-grsec-xxxx-grs-ipv6-64 #2 SMP Thu Aug 25 16:40:22 UTC 2011 x86_64
# Contact: Me <server@eplay-tv.eu>
# Location: Sitting on the Dock of the Bay
######################################################################


### Interface 2 >> Descr: 'eth0' | Name: '' | Ip: '94.xx.xxx.20' | Eth: 'e0:69:95:d7:9b:1f' ###

Target[localhost_eth0]: \eth0:public@localhost:
SetEnv[localhost_eth0]: MRTG_INT_IP="94.xx.xxx.20" MRTG_INT_DESCR="eth0"
MaxBytes[localhost_eth0]: 12500000
Title[localhost_eth0]: 94.xx.xxx.20 -- ksxxxxxx.kimsufi.com
Options[localhost_eth0]: growright,nopercent,nobanner,noinfo
PageTop[localhost_eth0]: <H1>94.xx.xxx.20 -- ks383295.kimsufi.com</H1>
# <TABLE>
# <TR><TD>System:</TD> <TD>ksxxxxxx.kimsufi.com in LAN</TD></TR>
# <TR><TD>Maintainer:</TD> <TD>flix &lt;flix@leela&gt;</TD></TR>
# <TR><TD>Description:</TD><TD>eth0 </TD></TR>
# <TR><TD>ifType:</TD> <TD>ethernet</TD></TR>
# <TR><TD>ifName:</TD> <TD></TD></TR>
# <TR><TD>Max Speed:</TD> <TD>100.0 Mbits/s</TD></TR>
# <TR><TD>Ip:</TD> <TD>94.xx.xxx.20 (ksxxxxxx.kimsufi.com)</TD></TR>
# </TABLE>


### End of ksxxxxxx.kimsufi.com

### CPU Load
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[localhost.cpu]:ssCpuRawUser.0&ssCpuRawUser.0:public@127.0.0.1+ ssCpuRawSystem.0&ssCpuRawSystem.0:public@127.0.0.1+ ssCpuRawNice.0&ssCpuRawNice.0:public@127.0.0.1
MaxBytes[localhost.cpu]: 100
Title[localhost.cpu]: CPU Load
PageTop[localhost.cpu]: <H1>Active CPU Load %</H1>
Unscaled[localhost.cpu]: ymwd
ShortLegend[localhost.cpu]: %
YLegend[localhost.cpu]: CPU Utilization
Legend1[localhost.cpu]: Active CPU in % (Load)
Legend2[localhost.cpu]:
Legend3[localhost.cpu]:
Legend4[localhost.cpu]:
LegendI[localhost.cpu]: Active
LegendO[localhost.cpu]:
Options[localhost.cpu]: growright,nopercent,nobanner

### Memory Free
LoadMIBs: /usr/share/snmp/mibs/HOST-RESOURCES-MIB.txt
Target[localhost.mem]: .1.3.6.1.4.1.2021.4.6.0&.1.3.6.1.4.1.2021.4.6.0:public@localhost
PageTop[localhost.mem]: <H1>Free Memory</H1>
Options[localhost.mem]: nopercent,growright,gauge,noinfo,nobanner
Title[localhost.mem]: Free Memory
MaxBytes[localhost.mem]: 1000000
kMG[localhost.mem]: k,M,G,T,P,X
YLegend[localhost.mem]: bytes
ShortLegend[localhost.mem]: bytes
LegendI[localhost.mem]: Free Memory:
LegendO[localhost.mem]:
Legend1[localhost.mem]: Free memory, not including swap, in bytes


### Disk Free in Percent
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[localhost.dfpercent]: dskPercent.3&dskPercent.1:public@localhost
MaxBytes[localhost.dfpercent]: 100
Title[localhost.dfpercent]: DISK USAGE
PageTop[localhost.dfpercent]: <H1>Disk root and home Usage %</H1>
Unscaled[localhost.dfpercent]: ymwd
ShortLegend[localhost.dfpercent]: %
YLegend[localhost.dfpercent]: Disk Utilization
Legend1[localhost.dfpercent]: home disk
Legend2[localhost.dfpercent]: root disk
Legend3[localhost.dfpercent]:
Legend4[localhost.dfpercent]:
LegendI[localhost.dfpercent]: home disk
LegendO[localhost.dfpercent]: root disk
Options[localhost.dfpercent]: growright,gauge,nopercent,noinfo,nobanner


### Swap Free
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
Target[localhost.swap]: memAvailSwap.0&memAvailSwap.0:public@localhost
PageTop[localhost.swap]: <H1>Swap Memory Free</H1>
Options[localhost.swap]: nopercent,growright,gauge,noinfo,nobanner
Title[localhost.swap]: Free Memory
MaxBytes[localhost.swap]: 1000000
kMG[localhost.swap]: k,M,G,T,P,X
YLegend[localhost.swap]: bytes
ShortLegend[localhost.swap]: bytes
LegendI[localhost.swap]: Free Memory:
LegendO[localhost.swap]:
Legend1[localhost.swap]: Swap memory avail, in bytes


### Processes Running
Target[localhost.procs]: `/etc/mrtg/stat.pl procs root`
Options[localhost.procs]: nopercent,growright,gauge,nobanner,integer,noinfo
Title[localhost.procs]: Process
PageTop[localhost.procs]: <h1>Processes</h1>
MaxBytes[localhost.procs]: 5000000
YLegend[localhost.procs]: Processes
ShortLegend[localhost.procs]: procs
LegendI[localhost.procs]: Processes:
LegendO[localhost.procs]:
Legend1[localhost.procs]: Running Processes


### Logged-in Users
Target[localhost.users]: `/etc/mrtg/stat.pl users root`
Options[localhost.users]: nopercent,growright,gauge,integer,nobanner,noinfo
Title[localhost.users]: Logged-in users
PageTop[localhost.users]: <h1>Logged-in users</h1>
MaxBytes[localhost.users]: 60000
YLegend[localhost.users]: users
ShortLegend[localhost.users]: users
LegendI[localhost.users]: Users:
LegendO[localhost.users]:
Legend1[localhost.users]: Logged-in users


### Temperature
Title[localhost.temp]: Temperature on box
PageTop[localhost.temp]: <H1>Temperature</H1>
Target[localhost.temp]: `mrtg-sensors it87-isa-0290 temp3 it87-isa-0290 temp2`
Options[localhost.temp]: noinfo,gauge,growright,integer,nopercent,nobanner
Unscaled[localhost.temp]:dwmy
MaxBytes[localhost.temp]: 100
YLegend[localhost.temp]: °C
ShortLegend[localhost.temp]: °C
Legend1[localhost.temp]: CPU Temperature
Legend2[localhost.temp]: System Temperature
LegendI[localhost.temp]: CPU:
LegendO[localhost.temp]: System:


### Fan
Target[localhost.fan]: `mrtg-sensors it87-isa-0290 fan1`
MaxBytes[localhost.fan]: 4000
Options[localhost.fan]: noinfo,gauge,growright,integer,nopercent,nobanner
Title[localhost.fan]: System Fan Speed
PageTop[localhost.fan]: <H1>System Fan Speed (fan1)</H1>
YLegend[localhost.fan]: Rounds Per Minute
ShortLegend[localhost.fan]: RPM
LegendI[localhost.fan]: Speed:
LegendO[localhost.fan]:
Legend1[localhost.fan]: System Fan Speed


### Ping
Title[localhost.ping]: Ping Time
PageTop[localhost.ping]: <H1>Ping Time</H1>
Target[localhost.ping]: `/etc/mrtg/ping.sh`
MaxBytes[localhost.ping]: 2000
Options[localhost.ping]: growright,unknaszero,nopercent,gauge,nobanner,noinfo
LegendI[localhost.ping]: Pkt loss %
LegendO[localhost.ping]: Avg RTT
Legend1[localhost.ping]: Pkt loss %
Legend2[localhost.ping]: Avg RTT
YLegend[localhost.ping]: RTT (ms)


### Connectionuptime
Target[localhost.conuptime]: `/etc/mrtg/connectionuptime.sh`
Options[localhost.conuptime]: nopercent,growright,gauge,nobanner,integer,noinfo
Title[localhost.conuptime]: Connectionuptime
PageTop[localhost.conuptime]: <h1>Connectionuptime</h1>
MaxBytes[localhost.conuptime]: 780
YLegend[localhost.conuptime]: Minutes
ShortLegend[localhost.conuptime]: min
LegendI[localhost.conuptime]: Minutes:
LegendO[localhost.conuptime]:
Legend1[localhost.conuptime]: Connection uptime of ppp0 in minutes (720 mins are 12 hours)


### Uptime
Target[localhost.uptime]: `/etc/mrtg/uptime.sh`
Options[localhost.uptime]: nopercent,growright,gauge,nobanner,integer,noinfo
#Suppress[localhost.uptime]: d
Title[localhost.uptime]: Uptime
PageTop[localhost.uptime]: <h1>Uptime</h1>
MaxBytes[localhost.uptime]: 1000000
YLegend[localhost.uptime]: Days
ShortLegend[localhost.uptime]: days
LegendI[localhost.uptime]: Days:
LegendO[localhost.uptime]:
Legend1[localhost.uptime]: Uptime of Server in days


Aber leider funktioniert das nicht, denn es werden nur 4 Statistiken angezeigt und bekomme alle 5 Minuten eine Cron-Error. Hier der Log:

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: "localhost" [127.0.0.1].161)
community: "public"
request ID: 966596246
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@localhost::::::v4only
at /usr/bin/mrtg line 2251
Unknown SNMP var ssCpuRawUser.0
at /usr/bin/mrtg line 2251
Unknown SNMP var ssCpuRawUser.0
at /usr/bin/mrtg line 2251
2011-12-26 17:10:01: WARNING: Expected a number but got '0:09:27'
2011-12-26 17:10:01: WARNING: Expected a number but got 'ks383295.kimsufi.com'
Unknown SNMP var ssCpuRawSystem.0
at /usr/bin/mrtg line 2251
Unknown SNMP var ssCpuRawSystem.0
at /usr/bin/mrtg line 2251
2011-12-26 17:10:01: WARNING: Expected a number but got '0:09:27'
2011-12-26 17:10:01: WARNING: Expected a number but got 'ks383295.kimsufi.com'
Unknown SNMP var ssCpuRawNice.0
at /usr/bin/mrtg line 2251
Unknown SNMP var ssCpuRawNice.0
at /usr/bin/mrtg line 2251
2011-12-26 17:10:01: WARNING: Expected a number but got '0:09:27'
2011-12-26 17:10:01: WARNING: Expected a number but got 'ks383295.kimsufi.com'
SNMP Error:
Received SNMP response with error code
error status: noSuchName
index 2 (OID: 1.3.6.1.4.1.2021.4.6.0)
SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
community: "public"
request ID: 1809430528
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/share/perl5/SNMP_util.pm line 492
SNMPGET Problem for .1.3.6.1.4.1.2021.4.6.0 .1.3.6.1.4.1.2021.4.6.0 sysUptime
sysName on public@localhost::::::v4only
at /usr/bin/mrtg line 2251
Unknown SNMP var dskPercent.3
at /usr/bin/mrtg line 2251
Unknown SNMP var dskPercent.1
at /usr/bin/mrtg line 2251
2011-12-26 17:10:01: WARNING: Expected a number but got '0:09:27'
2011-12-26 17:10:01: WARNING: Expected a number but got 'ks383295.kimsufi.com'
Unknown SNMP var memAvailSwap.0
at /usr/bin/mrtg line 2251
Unknown SNMP var memAvailSwap.0
at /usr/bin/mrtg line 2251
2011-12-26 17:10:01: WARNING: Expected a number but got '0:09:27'
2011-12-26 17:10:01: WARNING: Expected a number but got 'ks383295.kimsufi.com'
Can't exec "mrtg-sensors": No such file or directory at /usr/bin/mrtg line 2079.
2011-12-26 17:10:01: WARNING: Running 'mrtg-sensors it87-isa-0290 temp3
it87-isa-0290 temp2': No such file or directory
2011-12-26 17:10:01: WARNING: Could not get any data from external command
'mrtg-sensors it87-isa-0290 temp3 it87-isa-0290 temp2'
Maybe the external command did not even start. (No such file or directory)

2011-12-26 17:10:01: WARNING: Problem with External get 'mrtg-sensors it87-isa-0290
temp3 it87-isa-0290 temp2':
Expected a Number for 'in' but nothing'

2011-12-26 17:10:01: WARNING: Problem with External get 'mrtg-sensors it87-isa-0290
temp3 it87-isa-0290 temp2':
Expected a Number for 'out' but nothing'

Can't exec "mrtg-sensors": No such file or directory at /usr/bin/mrtg line 2079.
2011-12-26 17:10:01: WARNING: Running 'mrtg-sensors it87-isa-0290 fan1': No such
file or directory
2011-12-26 17:10:01: WARNING: Could not get any data from external command
'mrtg-sensors it87-isa-0290 fan1'
Maybe the external command did not even start. (No such file or directory)

2011-12-26 17:10:01: WARNING: Problem with External get 'mrtg-sensors it87-isa-0290
fan1':
Expected a Number for 'in' but nothing'

2011-12-26 17:10:01: WARNING: Problem with External get 'mrtg-sensors it87-isa-0290
fan1':
Expected a Number for 'out' but nothing'

2011-12-26 17:10:10: ERROR: Target[localhost_eth0][_IN_] 'eth $target->[0]{$mode} '
(kill): Can't call method "eth" on unblessed reference at (eval 19) line 1.
2011-12-26 17:10:10: ERROR: Target[localhost_eth0][_OUT_] 'eth $target->[0]{$mode} '
(kill): Can't call method "eth" on unblessed reference at (eval 20) line 1.
2011-12-26 17:10:10: ERROR: Target[localhost.cpu][_IN_] ' $target->[1]{$mode} +
$target->[2]{$mode} + $target->[3]{$mode} ' (warn): Use of uninitialized value in
addition (+) at (eval 22) line 1.
2011-12-26 17:10:10: ERROR: Target[localhost.cpu][_OUT_] ' $target->[1]{$mode} +
$target->[2]{$mode} + $target->[3]{$mode} ' (warn): Use of uninitialized value in
addition (+) at (eval 23) line 1.
2011-12-26 17:10:10: ERROR: Target[localhost.mem][_IN_] ' $target->[4]{$mode} ' did
not eval into defined data
2011-12-26 17:10:10: ERROR: Target[localhost.mem][_OUT_] ' $target->[4]{$mode} ' did
not eval into defined data
2011-12-26 17:10:10: ERROR: Target[localhost.dfpercent][_IN_] ' $target->[5]{$mode}
' did not eval into defined data
2011-12-26 17:10:10: ERROR: Target[localhost.dfpercent][_OUT_] ' $target->[5]{$mode}
' did not eval into defined data
2011-12-26 17:10:10: ERROR: Target[localhost.swap][_IN_] ' $target->[6]{$mode} ' did
not eval into defined data
2011-12-26 17:10:10: ERROR: Target[localhost.swap][_OUT_] ' $target->[6]{$mode} '
did not eval into defined data
2011-12-26 17:10:10: ERROR: Target[localhost.temp][_IN_] ' $target->[9]{$mode} ' did
not eval into defined data
2011-12-26 17:10:10: ERROR: Target[localhost.temp][_OUT_] ' $target->[9]{$mode} '
did not eval into defined data
2011-12-26 17:10:10: ERROR: Target[localhost.fan][_IN_] ' $target->[10]{$mode} ' did
not eval into defined data
2011-12-26 17:10:10: ERROR: Target[localhost.fan][_OUT_] ' $target->[10]{$mode} '
did not eval into defined data

Wie kann ich das beheben?

Gruß
Benny

PS:
Nutze Debian 6
So sieht es aktuell aus http://status.eplay-tv.de/
 
Die gezeichneten Graphen haben alle eins gemeinsam:
Sie beziehen die Daten aus Scripten.
Bei den nicht gezeichneten Graphen ist es genau das Gegenteil: Es sind SNMP-Daten.
Ergo liegt der Fehler im SNMP.

Nun lässt "error status: noSuchName" den Schluss zu, dass hier irgendwas unbekannt ist.
Ich tippe darauf dass Deine "LoadMIBs" falsch sind. Check das mal, denn bei Debian 6 werden die glaub ich ohne .txt geschrieben.

huschi.
 
Ja stimmt, hab jetzt auch gerade geschaut in dem Ordner wohin er gehen will, aber den Ordner gibt es nicht und in dem Ordner wo ich es vielleicht vermute finde ich nicht das was es sein könnte.

Weißt du vielleicht, welche Dateien das sein könnten?
 

Attachments

  • snmp 1.jpg
    snmp 1.jpg
    16.8 KB · Views: 205
  • snmp 2.jpg
    snmp 2.jpg
    112.5 KB · Views: 204
  • snmp 3.jpg
    snmp 3.jpg
    61.2 KB · Views: 216
Ein "locate UCD-SNMP-MIB" sollte helfen.
Bei mir liegen sie unter /usr/share/mibs/netsnmp. Aber ohne .txt am Ende wie noch in Debian 5.

huschi.
 
Jo, super da hab ich die Dateien gefunden - Nur leider hat sich bislang nicht viel verändert, außer das der Log jetzt eine andere Fehlermeldung ausspuckt

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: "localhost" [127.0.0.1].161)
                  community: "public"
                 request ID: 1425833197
                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@localhost::::::v4only
 at /usr/bin/mrtg line 2251
SNMP Error:
Received SNMP response with error code
  error status: noSuchName
  index 2 (OID: 1.3.6.1.4.1.2021.11.50.0)
SNMPv1_Session (remote host: "127.0.0.1" [127.0.0.1].161)
                  community: "public"
                 request ID: 2014519557
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
 at /usr/share/perl5/SNMP_util.pm line 492
SNMPGET Problem for ssCpuRawUser.0 ssCpuRawUser.0 sysUptime sysName on
public@127.0.0.1::::::v4only
 at /usr/bin/mrtg line 2251
SNMP Error:
Received SNMP response with error code
  error status: noSuchName
  index 2 (OID: 1.3.6.1.4.1.2021.11.52.0)
SNMPv1_Session (remote host: "127.0.0.1" [127.0.0.1].161)
                  community: "public"
                 request ID: 2014519558
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
 at /usr/share/perl5/SNMP_util.pm line 492
SNMPGET Problem for ssCpuRawSystem.0 ssCpuRawSystem.0 sysUptime sysName on
public@127.0.0.1::::::v4only
 at /usr/bin/mrtg line 2251
SNMP Error:
Received SNMP response with error code
  error status: noSuchName
  index 2 (OID: 1.3.6.1.4.1.2021.11.51.0)
SNMPv1_Session (remote host: "127.0.0.1" [127.0.0.1].161)
                  community: "public"
                 request ID: 2014519559
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
 at /usr/share/perl5/SNMP_util.pm line 492
SNMPGET Problem for ssCpuRawNice.0 ssCpuRawNice.0 sysUptime sysName on
public@127.0.0.1::::::v4only
 at /usr/bin/mrtg line 2251
SNMP Error:
Received SNMP response with error code
  error status: noSuchName
  index 2 (OID: 1.3.6.1.4.1.2021.4.6.0)
SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
                  community: "public"
                 request ID: 2001754295
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
 at /usr/share/perl5/SNMP_util.pm line 492
SNMPGET Problem for .1.3.6.1.4.1.2021.4.6.0 .1.3.6.1.4.1.2021.4.6.0 sysUptime
sysName on public@localhost::::::v4only
 at /usr/bin/mrtg line 2251
SNMP Error:
Received SNMP response with error code
  error status: noSuchName
  index 2 (OID: 1.3.6.1.4.1.2021.9.1.9.1)
SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
                  community: "public"
                 request ID: 2001754296
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
 at /usr/share/perl5/SNMP_util.pm line 492
SNMPGET Problem for dskPercent.3 dskPercent.1 sysUptime sysName on
public@localhost::::::v4only
 at /usr/bin/mrtg line 2251
SNMP Error:
Received SNMP response with error code
  error status: noSuchName
  index 2 (OID: 1.3.6.1.4.1.2021.4.4.0)
SNMPv1_Session (remote host: "localhost" [127.0.0.1].161)
                  community: "public"
                 request ID: 2001754297
                PDU bufsize: 8000 bytes
                    timeout: 2s
                    retries: 5
                    backoff: 1)
 at /usr/share/perl5/SNMP_util.pm line 492
SNMPGET Problem for memAvailSwap.0 memAvailSwap.0 sysUptime sysName on
public@localhost::::::v4only
 at /usr/bin/mrtg line 2251
Can't exec "mrtg-sensors": No such file or directory at /usr/bin/mrtg line 2079.
2011-12-28 12:55:01: WARNING: Running 'mrtg-sensors it87-isa-0290 temp3
it87-isa-0290 temp2': No such file or directory
2011-12-28 12:55:01: WARNING: Could not get any data from external command
'mrtg-sensors it87-isa-0290 temp3 it87-isa-0290 temp2'
Maybe the external command did not even start. (No such file or directory)

2011-12-28 12:55:01: WARNING: Problem with External get 'mrtg-sensors it87-isa-0290
temp3 it87-isa-0290 temp2':
   Expected a Number for 'in' but nothing'

2011-12-28 12:55:01: WARNING: Problem with External get 'mrtg-sensors it87-isa-0290
temp3 it87-isa-0290 temp2':
   Expected a Number for 'out' but nothing'

Can't exec "mrtg-sensors": No such file or directory at /usr/bin/mrtg line 2079.
2011-12-28 12:55:01: WARNING: Running 'mrtg-sensors it87-isa-0290 fan1': No such
file or directory
2011-12-28 12:55:01: WARNING: Could not get any data from external command
'mrtg-sensors it87-isa-0290 fan1'
Maybe the external command did not even start. (No such file or directory)

2011-12-28 12:55:01: WARNING: Problem with External get 'mrtg-sensors it87-isa-0290
fan1':
   Expected a Number for 'in' but nothing'

2011-12-28 12:55:01: WARNING: Problem with External get 'mrtg-sensors it87-isa-0290
fan1':
   Expected a Number for 'out' but nothing'

2011-12-28 12:55:10: ERROR: Target[localhost_eth0][_IN_] 'eth $target->[0]{$mode} '
(kill): Can't call method "eth" on unblessed reference at (eval 19) line 1.
2011-12-28 12:55:10: ERROR: Target[localhost_eth0][_OUT_] 'eth $target->[0]{$mode} '
(kill): Can't call method "eth" on unblessed reference at (eval 20) line 1.
2011-12-28 12:55:10: ERROR: Target[localhost.cpu][_IN_] ' $target->[1]{$mode} + 
$target->[2]{$mode} +  $target->[3]{$mode} ' (warn): Use of uninitialized value in
addition (+) at (eval 22) line 1.
2011-12-28 12:55:10: ERROR: Target[localhost.cpu][_OUT_] ' $target->[1]{$mode} + 
$target->[2]{$mode} +  $target->[3]{$mode} ' (warn): Use of uninitialized value in
addition (+) at (eval 23) line 1.
2011-12-28 12:55:10: ERROR: Target[localhost.mem][_IN_] ' $target->[4]{$mode} ' did
not eval into defined data
2011-12-28 12:55:10: ERROR: Target[localhost.mem][_OUT_] ' $target->[4]{$mode} ' did
not eval into defined data
2011-12-28 12:55:10: ERROR: Target[localhost.dfpercent][_IN_] ' $target->[5]{$mode}
' did not eval into defined data
2011-12-28 12:55:10: ERROR: Target[localhost.dfpercent][_OUT_] ' $target->[5]{$mode}
' did not eval into defined data
2011-12-28 12:55:10: ERROR: Target[localhost.swap][_IN_] ' $target->[6]{$mode} ' did
not eval into defined data
2011-12-28 12:55:10: ERROR: Target[localhost.swap][_OUT_] ' $target->[6]{$mode} '
did not eval into defined data
2011-12-28 12:55:10: ERROR: Target[localhost.temp][_IN_] ' $target->[9]{$mode} ' did
not eval into defined data
2011-12-28 12:55:10: ERROR: Target[localhost.temp][_OUT_] ' $target->[9]{$mode} '
did not eval into defined data
2011-12-28 12:55:10: ERROR: Target[localhost.fan][_IN_] ' $target->[10]{$mode} ' did
not eval into defined data
2011-12-28 12:55:10: ERROR: Target[localhost.fan][_OUT_] ' $target->[10]{$mode} '
did not eval into defined data
 
Last edited by a moderator:
Das Problem mit mrtg-sensors kannst Du auf der Console prüfen.
Die anderen per snmpwalk:
Code:
snmpwalk -c public localhost

Evtl. ist "public" nicht in der richtige snmp-Community-Name?

huschi.
 
Das Problem mit mrtg-sensors kannst Du auf der Console prüfen.
Die anderen per snmpwalk:
Code:
snmpwalk -c public localhost

Evtl. ist "public" nicht in der richtige snmp-Community-Name?

huschi.

also wenn ich dein code eingebe, bekomme ich das aus der Konsole:
/etc/snmp/snmp.conf: line 9: Warning: Unknown token: com2sec.
snmpwalk: No securityName specified

So sieht die Config aus:
#
# As the snmp packages come without MIB files due to license reasons, loading
# of MIBs is disabled by default. If you added the MIBs you can reenable
# loaging them by commenting out the following line.
mibs :

# sec.name source community
# com2sec paranoid default public
com2sec readonly default public
#com2sec readwrite default private

Was ist daran falsch?
 
"com2sec" gehört eigentlich in die snmpd.conf.
Aber selbst dort hab ich es draußen und statt dessen:
Code:
rocommunity public localhost

Die snmp.conf hingegen ist vollständig leer (nur Kommentare).

huschi.
 
also ich hab die snmp.conf mal auskommentiert und in der snmpd.conf finde ich auch den code, bloß mit -V systemonly dahinter.

Bloß, wenn das jetzt läuft, snmp ist auch restartet, läuft es nicht und wenn ich dein code oben ausführe, bekomm ich die Meldung snmpwalk: No securityName specified



Hier mal den komplette Conf von der snmpd-Datei

Code:
###############################################################################
#
# EXAMPLE.conf:
#   An example configuration file for configuring the Net-SNMP agent ('snmpd')
#   See the 'snmpd.conf(5)' man page for details
#
#  Some entries are deliberately commented out, and will need to be explicitly activated
#
###############################################################################
#
#  AGENT BEHAVIOUR
#

#  Listen for connections from the local system only
agentAddress  udp:127.0.0.1:161
#  Listen for connections on all interfaces (both IPv4 *and* IPv6)
#agentAddress udp:161,udp6:[::1]:161



###############################################################################
#
#  SNMPv3 AUTHENTICATION
#
#  Note that these particular settings don't actually belong here.
#  They should be copied to the file /var/lib/snmp/snmpd.conf
#     and the passwords changed, before being uncommented in that file *only*.
#  Then restart the agent

#  createUser authOnlyUser  MD5 "remember to change this password"
#  createUser authPrivUser  SHA "remember to change this one too"  DES
#  createUser internalUser  MD5 "this is only ever used internally, but still change the password"

#  If you also change the usernames (which might be sensible),
#  then remember to update the other occurances in this example config file to match.



###############################################################################
#
#  ACCESS CONTROL
#

                                                 #  system + hrSystem groups only
view   systemonly  included   .1.3.6.1.2.1.1
view   systemonly  included   .1.3.6.1.2.1.25.1

                                                 #  Full access from the local host
#rocommunity public  localhost
                                                 #  Default access to basic system info
 rocommunity public  default    -V systemonly

                                                 #  Full access from an example network
                                                 #     Adjust this network address to match your local
                                                 #     settings, change the community string,
                                                 #     and check the 'agentAddress' setting above
#rocommunity secret  10.0.0.0/16

                                                 #  Full read-only access for SNMPv3
 rouser   authOnlyUser
                                                 #  Full write access for encrypted requests
                                                 #     Remember to activate the 'createUser' lines above
#rwuser   authPrivUser   priv

#  It's no longer typically necessary to use the full 'com2sec/group/access' configuration
#  r[ou]user and r[ow]community, together with suitable views, should cover most requirements



###############################################################################
#
#  SYSTEM INFORMATION
#

#  Note that setting these values here, results in the corresponding MIB objects being 'read-only'
#  See snmpd.conf(5) for more details
sysLocation    Sitting on the Dock of the Bay
sysContact     Me <me@example.org>
                                                 # Application + End-to-End layers
sysServices    72


#
#  Process Monitoring
#
                               # At least one  'mountd' process
proc  mountd
                               # No more than 4 'ntalkd' processes - 0 is OK
proc  ntalkd    4
                               # At least one 'sendmail' process, but no more than 10
proc  sendmail 10 1

#  Walk the UCD-SNMP-MIB::prTable to see the resulting output
#  Note that this table will be empty if there are no "proc" entries in the snmpd.conf file


#
#  Disk Monitoring
#
                               # 10MBs required on root disk, 5% free on /var, 10% free on all other disks
disk       /     10000
disk       /var  5%
includeAllDisks  10%

#  Walk the UCD-SNMP-MIB::dskTable to see the resulting output
#  Note that this table will be empty if there are no "disk" entries in the snmpd.conf file


#
#  System Load
#
                               # Unacceptable 1-, 5-, and 15-minute load averages
load   12 10 5

#  Walk the UCD-SNMP-MIB::laTable to see the resulting output
#  Note that this table *will* be populated, even without a "load" entry in the snmpd.conf file



###############################################################################
#
#  ACTIVE MONITORING
#

                                    #   send SNMPv1  traps
 trapsink     localhost public
                                    #   send SNMPv2c traps
#trap2sink    localhost public
                                    #   send SNMPv2c INFORMs
#informsink   localhost public

#  Note that you typically only want *one* of these three lines
#  Uncommenting two (or all three) will result in multiple copies of each notification.


#
#  Event MIB - automatically generate alerts
#
                                   # Remember to activate the 'createUser' lines above
iquerySecName   internalUser       
rouser          internalUser
                                   # generate traps on UCD error conditions
defaultMonitors          yes
                                   # generate traps on linkUp/Down
linkUpDownNotifications  yes



###############################################################################
#
#  EXTENDING THE AGENT
#

#
#  Arbitrary extension commands
#
 extend    test1   /bin/echo  Hello, world!
 extend-sh test2   echo Hello, world! ; echo Hi there ; exit 35
#extend-sh test3   /bin/sh /tmp/shtest

#  Note that this last entry requires the script '/tmp/shtest' to be created first,
#    containing the same three shell commands, before the line is uncommented

#  Walk the NET-SNMP-EXTEND-MIB tables (nsExtendConfigTable, nsExtendOutput1Table
#     and nsExtendOutput2Table) to see the resulting output

#  Note that the "extend" directive supercedes the previous "exec" and "sh" directives
#  However, walking the UCD-SNMP-MIB::extTable should still returns the same output,
#     as well as the fuller results in the above tables.


#
#  "Pass-through" MIB extension command
#
#pass .1.3.6.1.4.1.8072.2.255  /bin/sh       PREFIX/local/passtest
#pass .1.3.6.1.4.1.8072.2.255  /usr/bin/perl PREFIX/local/passtest.pl

# Note that this requires one of the two 'passtest' scripts to be installed first,
#    before the appropriate line is uncommented.
# These scripts can be found in the 'local' directory of the source distribution,
#     and are not installed automatically.

#  Walk the NET-SNMP-PASS-MIB::netSnmpPassExamples subtree to see the resulting output


#
#  AgentX Sub-agents
#
                                           #  Run as an AgentX master agent
 master          agentx
                                           #  Listen for network connections (from localhost)
                                           #    rather than the default named socket /var/agentx/master
#agentXSocket    tcp:localhost:705
 
Und statt localhost steht da default. Was verlierst Du wenn Du meinen Vorschlag einfach übernehmen würdest zum Testen?

huschi.

so, ich hab das jetzt abgeändert, und der Errorlog hat sich verkürzt

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: "localhost" [127.0.0.1].161)
                  community: "public"
                 request ID: 2016711934
                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@localhost::::::v4only
 at /usr/bin/mrtg line 2251
2011-12-30 12:20:01: WARNING: Problem with External get 'sensors coretemp-isa-0000
coretemp-isa-0001 coretemp-isa-0002 coretemp-isa-0003':
   Expected a Number for 'out' but got 'Adapter: ISA adapter'

Can't exec "mrtg-sensors": No such file or directory at /usr/bin/mrtg line 2079.
2011-12-30 12:20:01: WARNING: Running 'mrtg-sensors it87-isa-0290 fan1': No such
file or directory
2011-12-30 12:20:01: WARNING: Could not get any data from external command
'mrtg-sensors it87-isa-0290 fan1'
Maybe the external command did not even start. (No such file or directory)

2011-12-30 12:20:01: WARNING: Problem with External get 'mrtg-sensors it87-isa-0290
fan1':
   Expected a Number for 'in' but nothing'

2011-12-30 12:20:01: WARNING: Problem with External get 'mrtg-sensors it87-isa-0290
fan1':
   Expected a Number for 'out' but nothing'

2011-12-30 12:20:10: ERROR: Target[localhost_eth0][_IN_] 'eth $target->[0]{$mode} '
(kill): Can't call method "eth" on unblessed reference at (eval 19) line 1.
2011-12-30 12:20:10: ERROR: Target[localhost_eth0][_OUT_] 'eth $target->[0]{$mode} '
(kill): Can't call method "eth" on unblessed reference at (eval 20) line 1.
2011-12-30 12:20:10: ERROR: Target[localhost.temp][_OUT_] ' $target->[9]{$mode} '
did not eval into defined data
2011-12-30 12:20:10: ERROR: Target[localhost.fan][_IN_] ' $target->[10]{$mode} ' did
not eval into defined data
2011-12-30 12:20:10: ERROR: Target[localhost.fan][_OUT_] ' $target->[10]{$mode} '
did not eval into defined data
 
Das Problem mit mrtg-sensors hatte ich oben schon angegangen. Du anscheinend noch nicht.

SNMPGET Problem for ifInOctets.0 ifOutOctets.0 sysUptime sysName on
public@localhost::::::v4only
Woher das kommt, kann ich Dir nicht sagen. Denn diese Einstellung steht oben in Deiner Config nicht.
Aber wahrscheinlich fehlt die Verknüpfung mit der IF-MIB-Datei.

huschi.
 
Last edited by a moderator:
also wenn ich in der console sensors eingebe, bekomme ich solch eine liste, aber in der config habe ich coretemp... auch eingetragen, es bringt aber nichts.
und von fan-sensoren habe ich das auch noch nichts entdeckt.

Code:
# sensors
coretemp-isa-0000
Adapter: ISA adapter
Core 0:      +38.0°C  (high = +80.0°C, crit = +99.0°C)

coretemp-isa-0001
Adapter: ISA adapter
Core 1:      +38.0°C  (high = +80.0°C, crit = +99.0°C)

coretemp-isa-0002
Adapter: ISA adapter
Core 2:      +38.0°C  (high = +80.0°C, crit = +99.0°C)

coretemp-isa-0003
Adapter: ISA adapter
Core 3:      +39.0°C  (high = +80.0°C, crit = +99.0°C)

Was soll denn die IF-MIB-Datei auslesen?
Denn bis jetzt fehlt nur noch der Traffic und die SWAP-Grafik
(außer natürlich die Temperatur und der Fan)
 
Wer lesen kann ist klar im Vorteil:
Es geht um den Befehl "mrtg-sensors".

Das "IF" steht für "Interface" womit Deine Netzwerkkarte gemeint ist. (=> Traffic)
Aber hier musst Du selber erstmal die passende MRTG-Config suchen. Das kann man Dir auf die Entfernung nicht abnehmen.

huschi.
 
Nicht bei allen OVH Servern kannst du einen Lüfter auslesen. OVH setzt ja auf Wasserkühlung.
 
Back
Top