Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MRTG and SNMP (disks)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Rooney
Apprentice
Apprentice


Joined: 07 Aug 2003
Posts: 193
Location: Sheffield, UK

PostPosted: Thu Mar 18, 2004 2:11 pm    Post subject: MRTG and SNMP (disks) Reply with quote

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
View user's profile Send private message
Rooney
Apprentice
Apprentice


Joined: 07 Aug 2003
Posts: 193
Location: Sheffield, UK

PostPosted: Thu Mar 18, 2004 3:14 pm    Post subject: Reply with quote

sorry people found a fix by opening my eyes

https://forums.gentoo.org/viewtopic.php?t=109817&highlight=snmp+disk
Back to top
View user's profile Send private message
stripe
n00b
n00b


Joined: 04 Jan 2004
Posts: 72
Location: Prague

PostPosted: Thu Mar 18, 2004 6:30 pm    Post subject: why do it so difficult? Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
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