Page 1 of 1

Dude Beta 6 showing diskusage to 8 decimal places

Posted: Tue Apr 24, 2007 11:27 pm
by Belyivulk
Has anyone else seen / fixed this before?

Thanks in advance

Posted: Tue Apr 24, 2007 11:30 pm
by firebat
Just modify the hdd_usage function. Take the result, multiply by 100, round (will remove to nearest integer) and then divide by 100. This will give you two decimal points. You can multiply/divide by whatever you want to get the resolution desired.

Posted: Tue Apr 24, 2007 11:34 pm
by Belyivulk
Thanks, Can you please give a working example of that?

Posted: Wed Apr 25, 2007 5:49 am
by firebat
edit the hdd_usage function. Using the example below, subsitute current_function with the existing code in hdd_usage and save.

(round((current_function)*100))/100

Posted: Wed Apr 25, 2007 6:14 am
by Belyivulk
This is under probes - hdd?

Posted: Wed Apr 25, 2007 6:36 am
by Belyivulk
Ok, when i do as you say around this segment of code

(oid(concatenate("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.",
array_element(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageIndex", 600),
array_find(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageType", 600),
"iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageFixedDisk"
))))

* 100 /

oid(concatenate("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.",
array_element(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageIndex", 600),
array_find(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageType", 600),
"iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageFixedDisk"
))))

like so

(round(oid(concatenate("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.",
array_element(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageIndex", 600),
array_find(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageType", 600),
"iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageFixedDisk"
))))

* 100 /

oid(concatenate("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.",
array_element(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageIndex", 600),
array_find(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageType", 600),
"iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageFixedDisk"
)))))*100))/100

it doesnt work, the dude just displays [device_function]

Posted: Wed Apr 25, 2007 8:01 am
by firebat
IF this is hdd_usage:

(oid(concatenate("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.",
array_element(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageIndex", 600),
array_find(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageType", 600),
"iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageFixedDisk"
))))

Then replace it with:

(round(((oid(concatenate("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.",
array_element(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageIndex", 600),
array_find(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageType", 600),
"iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageFixedDisk"
)))) *100))/100


After saving, ensure that the error column is blank and not reporting any issues with the function.

Posted: Wed Apr 25, 2007 8:03 am
by Belyivulk
i have, see what ive posted above

Posted: Wed Apr 25, 2007 8:12 am
by firebat
I don't have access to dude at the moment. Is hdd_usage this entire piece:

(oid(concatenate("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.",
array_element(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageIndex", 600),
array_find(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageType", 600),
"iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageFixedDisk"
))))

* 100 /

oid(concatenate("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.",
array_element(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageIndex", 600),
array_find(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageType", 600),
"iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageFixedDisk"
))))


then it would look like: (you are missing parens in yours above)


(round(( (oid(concatenate("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.",
array_element(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageIndex", 600),
array_find(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageType", 600),
"iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageFixedDisk"
))))

* 100 /

oid(concatenate("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.",
array_element(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageIndex", 600),
array_find(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageType", 600),
"iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageFixedDisk"
)))) )*100))/100

Posted: Wed Apr 25, 2007 8:28 am
by Belyivulk
that doesnt work. it just comes ip with device_performance

Posted: Wed Apr 25, 2007 8:54 am
by firebat
Does it show an error in the error column for the function?

Posted: Thu Apr 26, 2007 9:55 am
by firebat
This code works for me:


(round((

oid(concatenate("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageUsed.",
array_element(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageIndex", 600),
array_find(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageType", 600),
"iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageFixedDisk"
))))

* 100 /

oid(concatenate("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageSize.",
array_element(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageIndex", 600),
array_find(
oid_column("iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTable.hrStorageEntry.hrStorageType", 600),
"iso.org.dod.internet.mgmt.mib-2.host.hrStorage.hrStorageTypes.hrStorageFixedDisk"
))))
)*100)/100)

Posted: Thu Apr 26, 2007 10:27 am
by Belyivulk
That worked a treat, thanks alot! :)