View previous topic :: View next topic |
Author |
Message |
Rooney Apprentice


Joined: 07 Aug 2003 Posts: 193 Location: Sheffield, UK
|
Posted: Thu Mar 18, 2004 2:11 pm Post subject: MRTG and SNMP (disks) |
|
|
I put this in the wrong forum so this is a cut and paste from the Doc, Tips & Tricks.
Why does snmp report the wrong disk size and does any one know how i can set this right.
The / is a 20GB and the /home is a 80GB
HOST-RESOURCES-MIB::hrStorageDescr.2 = STRING: /
HOST-RESOURCES-MIB::hrStorageDescr.3 = STRING: /home
HOST-RESOURCES-MIB::hrStorageSize.2 = INTEGER: 4611420
HOST-RESOURCES-MIB::hrStorageSize.3 = INTEGER: 19487056
HOST-RESOURCES-MIB::hrStorageUsed.2 = INTEGER: 837368
HOST-RESOURCES-MIB::hrStorageUsed.3 = INTEGER: 9316812
but this is the reslut of a df
/dev/hda3 18445680 3349352 14159340 20% /
/dev/hdb3 77948224 37267248 36721356 51% /home
Ive tried snmpset but this just reports an error
beaver root # snmpset -v 2c -c root localhost HOST-RESOURCES-MIB::hrStorageSize.3 i 77948224
Error in packet.
Reason: notWritable (that object does not support modification)
Failed object: HOST-RESOURCES-MIB::hrStorageSize.3 |
|
Back to top |
|
 |
Rooney Apprentice


Joined: 07 Aug 2003 Posts: 193 Location: Sheffield, UK
|
|
Back to top |
|
 |
stripe n00b


Joined: 04 Jan 2004 Posts: 72 Location: Prague
|
Posted: Thu Mar 18, 2004 6:30 pm Post subject: why do it so difficult? |
|
|
well, advantage of MRTG is, that is capable to monitor everything what ouputs two numbers. in this manner after I read the mrtg.org and many tips and tricks, I try to involve SNMP at least, as far as what is just config maker able to obtain....
my target, else is the common:
Code: |
Target[hda1]: `/etc/mrtg/script/disk-hda1.sh`
|
and script:
Code: |
#!/bin/bash
df -kl |grep /dev/hda1 |awk '{printf("%d\n",$3)}'
df -kl |grep /dev/hda1 |awk '{printf("%d\n",$2)}'
|
works absolutely fine, without any walkings in SNMP and either by this you can monitor whatever you want very simply without any MIBs and else strange depencies... _________________ Sick of computers? Well, Czech girls and beer solve it! Trust me  |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|