NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

Brammeke's avatar
Brammeke
Aspirant
Apr 22, 2011

Fan speed and system temperature via MRTG

Hi all

I'm trying to use MRTG to graph the fan speed and system temperature. This is an excerpt of my mrtg.conf:

Target[fan]: .1.3.6.1.4.1.4526.18.4.1.2&.1.3.6.1.4.1.4526.18.4.1.2:public@127.0.0.1
Options[fan]: gauge, nopercent, noo
MaxBytes[fan]: 5000
Title[fan]: Fan
PageTop[fan]: <H1>Fan</H1>
YLegend[fan]: RPMS
ShortLegend[fan]: RPMS
LegendI[fan]: Rear fan
WithPeak[fan]: ymwd

Target[temperature]: .1.3.6.1.4.1.4526.18.5.1.2&.1.3.6.1.4.1.4526.18.5.1.2:public@127.0.0.1
Options[temperature]: gauge, nopercent, noo
MaxBytes[temperature]: 100
Title[temperature]: Temperature
PageTop[temperature]: <H1>Temperature</H1>
YLegend[temperature]: Celcius
ShortLegend[temperature]: C
LegendI[temperature]: System
WithPeak[temperature]: ymwd


The OID numbers are coming from http://www.oidview.com/mibs/4526/READYNAS-MIB.html. I'm not having any luck though, because MRTG is telling me this:

SNMP Error:
Received SNMP response with error code
error status: noSuchName
index 2 (OID: 1.3.6.1.4.1.4526.18.4.1.2)
SNMPv1_Session (remote host: "127.0.0.1" [127.0.0.1].161)
community: "public"
request ID: 419153360
PDU bufsize: 8000 bytes
timeout: 2s
retries: 5
backoff: 1)
at /usr/share/perl5/SNMP_util.pm line 490
SNMPGET Problem for .1.3.6.1.4.1.4526.18.4.1.2 .1.3.6.1.4.1.4526.18.4.1.2 sysUptime sysName on public@127.0.0.1::::::v4only
at /usr/bin/mrtg line 1840


... and a similar message for the temperature.

What am I doing wrong?

Best regards
Bram

4 Replies

  • Brammeke wrote:
    Got this all working after a good night sleep. Will post complete procedure to get MRTG up and running later.


    I'd be very interested in your procedure to get this going as I have had no luck ... thanks
  • Yes, I have.

    I've created a little step-by-step: http://www.evernote.com/shard/s36/sh/250ea1a4-a0f9-4976-8d60-e72afc68c59a/28399ef87d3d250b2a8c17631e03887e

    Send me a PM with your e-mail address if you want the relevant Perl modules and the config I created in your mailbox.
  • The configs... With these I can monitor about every aspect of the system, and even the influence of the sun on my garage. A similar configuration is possible on the ReadyNAS Duo. Don't know about other ReadyNAS devices.

    mrtg.cfg
    # Created by 
    # /usr/bin/cfgmaker --global 'WorkDir: /c/mrtg' --output /etc/mrtg.cfg public@127.0.0.1

    ### Global Config Options
    # for Debian
    WorkDir: /var/www/mrtg

    ### Global Defaults
    PageTop[$]: <a href="index.html">Back to main page...</a>
    WriteExpires: Yes

    EnableIPv6: no
    WorkDir: /c/mrtg

    ######################################################################

    Include: mrtg/mrtg.eth0.cfg
    Include: mrtg/mrtg.cpu.cfg
    Include: mrtg/mrtg.memory.cfg
    Include: mrtg/mrtg.hdd.cfg
    Include: mrtg/mrtg.fan.cfg
    Include: mrtg/mrtg.systemtemperature.cfg
    Include: mrtg/mrtg.hddtemperature.cfg


    mrtg.cpu.cfg
    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>CPU Load</h1>
    Unscaled[localhost.cpu]: ymwd
    ShortLegend[localhost.cpu]: %
    YLegend[localhost.cpu]: CPU Utilization
    LegendI[localhost.cpu]: Active
    Options[localhost.cpu]: noo, growright, gauge


    mrtg.eth0.cfg
    ### Interface 2 >> Descr: 'eth0' | Name: 'eth0' | Ip: '10.0.0.72' | Eth: '00-0d-a2-02-77-3d' ###
    Target[localhost.eth0]: 2:public@127.0.0.1:
    SetEnv[localhost.eth0]: MRTG_INT_IP="10.0.0.72" MRTG_INT_DESCR="eth0"
    MaxBytes[localhost.eth0]: 125000000
    Title[localhost.eth0]: eth0 Traffic
    PageTop[localhost.eth0]: <h1>eth0 Traffic</h1>
    Options[localhost.eth0]: growright


    mrtg.fan.cfg
    #LoadMIBs: /usr/share/snmp/mibs/READYNAS-MIB.txt
    Target[localhost.fan]: .1.3.6.1.4.1.4526.18.4.1.2.1&.1.3.6.1.4.1.4526.18.4.1.2.1:public@127.0.0.1
    Options[localhost.fan]: gauge, nopercent, noo, growright
    MaxBytes[localhost.fan]: 4000
    Title[localhost.fan]: Fan Speed
    PageTop[localhost.fan]: <H1>Fan Speed</H1>
    YLegend[localhost.fan]: RPMS
    ShortLegend[localhost.fan]: RPMS
    LegendI[localhost.fan]: Rear Fan
    WithPeak[localhost.fan]: ymwd
    Unscaled[localhost.fan]: ymwd
    Colours[localhost.fan]: SKYBLUE#87CEEB,PLUM#DDA0DD,STEELBLUE#FFA500,PURPLE#800080


    mrtg.hdd.cfg
    Target[localhost.hdd]: .1.3.6.1.4.1.4526.18.7.1.6.1&.1.3.6.1.4.1.4526.18.7.1.6.1:public@127.0.0.1
    MaxBytes[localhost.hdd]: 3000000000
    Title[localhost.hdd]: HDD Free Space
    PageTop[localhost.hdd]: <h1>HDD Free Space</h1>
    ShortLegend[localhost.hdd]:
    YLegend[localhost.hdd]: Free Space
    LegendI[localhost.hdd]: Free Space
    Options[localhost.hdd]: gauge, growright, nopercent, noo
    kMG[localhost.hdd]: M,G,T,P,X


    mrtg.hddtemperature.cfg
    Target[localhost.hdd1temperature]: ((.1.3.6.1.4.1.4526.18.3.1.5.1&.1.3.6.1.4.1.4526.18.3.1.5.1:public@127.0.0.1 - 32) * 5) / 9
    Options[localhost.hdd1temperature]: gauge, nopercent, noo, growright
    MaxBytes[localhost.hdd1temperature]: 64
    Title[localhost.hdd1temperature]: hdd1 Temperature
    PageTop[localhost.hdd1temperature]: <H1>hdd1 Temperature</H1>
    YLegend[localhost.hdd1temperature]: Degrees Celcius
    ShortLegend[localhost.hdd1temperature]: °C
    LegendI[localhost.hdd1temperature]: hdd1
    WithPeak[localhost.hdd1temperature]: ymwd
    Unscaled[localhost.hdd1temperature]: ymwd
    Colours[localhost.hdd1temperature]: GOLD#FFD700,RED#FF0000,ORANGE#FFA500,DARK RED#8B0000

    Target[localhost.hdd2temperature]: ((.1.3.6.1.4.1.4526.18.3.1.5.2&.1.3.6.1.4.1.4526.18.3.1.5.2:public@127.0.0.1 - 32) * 5) / 9
    Options[localhost.hdd2temperature]: gauge, nopercent, noo, growright
    MaxBytes[localhost.hdd2temperature]: 64
    Title[localhost.hdd2temperature]: hdd2 Temperature
    PageTop[localhost.hdd2temperature]: <H1>hdd2 Temperature</H1>
    YLegend[localhost.hdd2temperature]: Degrees Celcius
    ShortLegend[localhost.hdd2temperature]: °C
    LegendI[localhost.hdd2temperature]: hdd2
    WithPeak[localhost.hdd2temperature]: ymwd
    Unscaled[localhost.hdd2temperature]: ymwd
    Colours[localhost.hdd2temperature]: GOLD#FFD700,RED#FF0000,ORANGE#FFA500,DARK RED#8B0000

    Target[localhost.hdd3temperature]: ((.1.3.6.1.4.1.4526.18.3.1.5.3&.1.3.6.1.4.1.4526.18.3.1.5.3:public@127.0.0.1 - 32) * 5) / 9
    Options[localhost.hdd3temperature]: gauge, nopercent, noo, growright
    MaxBytes[localhost.hdd3temperature]: 64
    Title[localhost.hdd3temperature]: hdd3 Temperature
    PageTop[localhost.hdd3temperature]: <H1>hdd3 Temperature</H1>
    YLegend[localhost.hdd3temperature]: Degrees Celcius
    ShortLegend[localhost.hdd3temperature]: °C
    LegendI[localhost.hdd3temperature]: hdd3
    WithPeak[localhost.hdd3temperature]: ymwd
    Unscaled[localhost.hdd3temperature]: ymwd
    Colours[localhost.hdd3temperature]: GOLD#FFD700,RED#FF0000,ORANGE#FFA500,DARK RED#8B0000

    Target[localhost.hdd4temperature]: ((.1.3.6.1.4.1.4526.18.3.1.5.4&.1.3.6.1.4.1.4526.18.3.1.5.4:public@127.0.0.1 - 32) * 5) / 9
    Options[localhost.hdd4temperature]: gauge, nopercent, noo, growright
    MaxBytes[localhost.hdd4temperature]: 64
    Title[localhost.hdd4temperature]: hdd4 Temperature
    PageTop[localhost.hdd4temperature]: <H1>hdd4 Temperature</H1>
    YLegend[localhost.hdd4temperature]: Degrees Celcius
    ShortLegend[localhost.hdd4temperature]: °C
    LegendI[localhost.hdd4temperature]: hdd4
    WithPeak[localhost.hdd4temperature]: ymwd
    Unscaled[localhost.hdd4temperature]: ymwd
    Colours[localhost.hdd4temperature]: GOLD#FFD700,RED#FF0000,ORANGE#FFA500,DARK RED#8B0000


    mrtg.memory.cfg
    Target[localhost.memory]: .1.3.6.1.4.1.2021.4.6.0&.1.3.6.1.4.1.2021.4.4.0:public@127.0.0.1
    MaxBytes[localhost.memory]: 1000000
    Title[localhost.memory]: Available Memory
    PageTop[localhost.memory]: <h1>Available Memory</h1>
    ShortLegend[localhost.memory]:
    YLegend[localhost.memory]: Physical + Swap
    LegendI[localhost.memory]: Physical
    LegendO[localhost.memory]: Swap
    Options[localhost.memory]: gauge, growright, nopercent
    kMG[localhost.memory]: k,M,G,T,P,X


    mrtg.systemtemperature.cfg
    Target[localhost.systemperature]: ((.1.3.6.1.4.1.4526.18.5.1.2.1&.1.3.6.1.4.1.4526.18.5.1.2.1:public@127.0.0.1 - 32) * 5) / 9
    Options[localhost.systemperature]: gauge, nopercent, noo, growright
    MaxBytes[localhost.systemperature]: 64
    Title[localhost.systemperature]: System Temperature
    PageTop[localhost.systemperature]: <H1>System Temperature</H1>
    YLegend[localhost.systemperature]: Degrees Celcius
    ShortLegend[localhost.systemperature]: °C
    LegendI[localhost.systemperature]: System
    WithPeak[localhost.systemperature]: ymwd
    Unscaled[localhost.systemperature]: ymwd
    Colours[localhost.systemperature]: CRIMSON#DC143C,MAROON#800000,GREY#808080,DARK SLATE GREY#2F4F4F

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More