Community discussions

MikroTik App
 
SergeS
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 67
Joined: Fri Mar 25, 2016 6:23 am

Volume usage on Synology NAS?

Thu Jan 27, 2022 5:28 pm

Have Dude installed just few days ago, I like it, but still learning myself on how to use it.
I have Synology NAS in my network, and I have noticed disk usage is indicated wrong on the label.
The Dude reports 46% usage, but Synology OS reports 69%, see screenshot.
Did not really understand yet how things work in Dude, but seems like Dude's function hdd_usage() returns wrong value for Synology...
See picture for device label.

Are there any way how to fix it?
p.s. Have only one volume on Synology.
usage1.png
usage.png
You do not have the required permissions to view the files attached to this post.
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2978
Joined: Mon Apr 08, 2019 1:16 am

Re: Volume usage on Synology NAS?

Thu Jan 27, 2022 6:26 pm

Complex thing to capture in one % number. What disk is presented here?

Maybe check details and make the sums ...

SNMPWalk gives: (volumes are 54,55,56 in my case)
.
Klembord-3.jpg
.
Klembord-2.jpg
You do not have the required permissions to view the files attached to this post.
 
SergeS
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 67
Joined: Fri Mar 25, 2016 6:23 am

Re: Volume usage on Synology NAS?

Thu Jan 27, 2022 9:54 pm

Complex thing to capture in one % number. What disk is presented here?
Maybe check details and make the sums ...
Do not really sure I had understood you...
Your point is: disk_usage() function is not applicable for NASes and I need to use some Synology-specific snmp oid staff, is this correct?
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2978
Joined: Mon Apr 08, 2019 1:16 am

Re: Volume usage on Synology NAS?

Thu Jan 27, 2022 10:48 pm

YES

I don't know what device_performance () collects. What is the disk value that is used? And memory? It does not seem to be related to the NAS volumes?
.
Klembord-3.jpg
.
In the NAS itself I find no correlation with the shown values for memory and disk.
Nothing seems to explain the values: AHA found it:
This function shows the % usage for the filesystem "/" , not for the mounted file system "/volume1". In OID under number ending on 31, not numbers 54,55 and 56
.
Klembord-2.jpg
.

The values in the OID are correct for all the mounted file systems, and there are many of them (even more detail than in the GUI)
.
Klembord-4.jpg
Copying OID and put it in the label is simple .... viewtopic.php?t=145586#p903768
Attention: Edit the ".3.6" to the correct "1.3.6"
I hope there are enough functions in DUDE to do some math on the values.

Nice presentation on DUDE: https://mum.mikrotik.com/presentations/HU11/patrik.pdf
You do not have the required permissions to view the files attached to this post.
 
SergeS
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 67
Joined: Fri Mar 25, 2016 6:23 am

Re: Volume usage on Synology NAS?

Sat Jan 29, 2022 3:07 am

This function shows the % usage for the filesystem "/" , not for the mounted file system "/volume1". In OID under number ending on 31, not numbers 54,55 and 56
...
I hope there are enough functions in DUDE to do some math on the values.
Thaks a lot! Cannot say I've got everything but will try work to understand :-). Will play on the weekend.
 
SergeS
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 67
Joined: Fri Mar 25, 2016 6:23 am

Re: Volume usage on Synology NAS?  [SOLVED]

Sat Jan 29, 2022 5:14 am

found it:
This function shows the % usage for the filesystem "/" , not for the mounted file system "/volume1". In OID under number ending on 31, not numbers 54,55 and 56
Wow! :lol: Seems like I have done it! Thank you again!
In my case I've used index .51 for "/volume", works for both my NASes.
Finally, label is: "Volume Usage: [round(oid("1.3.6.1.2.1.25.2.3.1.6.51")/oid("1.3.6.1.2.1.25.2.3.1.5.51")*100)]%"

VolumeUsage.png

Only one minor question, seems like round() function is not working correctly, with no rounding I have something like 43.77bla-bla-bla, with rounding it gives me 43, but I am expecting 44...
You do not have the required permissions to view the files attached to this post.
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2978
Joined: Mon Apr 08, 2019 1:16 am

Re: Volume usage on Synology NAS?

Sat Jan 29, 2022 1:07 pm

No idea how "round" is implemented. If it is just "taking integer value", then in programming one tweaks it with things like [multiplying with 100 , adding 0.5, INT, divide by 100] to have rounded on 2 decimals.

Thanks for the label written out. Just copied it !
Klembord-2.jpg
You do not have the required permissions to view the files attached to this post.
 
SergeS
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 67
Joined: Fri Mar 25, 2016 6:23 am

Re: Volume usage on Synology NAS?

Sat Jan 29, 2022 8:32 pm

Thanks for the label written out. Just copied it !
JFYI, have modified labels to fix rounding and to show total volume size...

Here is the label: Volume Usage: [round(0.5 + oid("1.3.6.1.2.1.25.2.3.1.6.51")/oid("1.3.6.1.2.1.25.2.3.1.5.51")*100)]% of [round(0.5 + oid("1.3.6.1.2.1.25.2.3.1.5.51")/1048576/1048576 * oid("1.3.6.1.2.1.25.2.3.1.4.51") * 10) / 10]TB

Here how it looks like:
VolumeUsage1.png
P.S. What does first line report: [device_performance()][Device.ServicesDown] ?
I did not see any relevant parameter, seems like it does not really informative in case of Synology NASes...
You do not have the required permissions to view the files attached to this post.
 
User avatar
bpwl
Forum Guru
Forum Guru
Posts: 2978
Joined: Mon Apr 08, 2019 1:16 am

Re: Volume usage on Synology NAS?

Sat Jan 29, 2022 9:22 pm

[device_performance()]---> found in functions (double click, or right-click/settings)
[Device.ServicesDown]---> probably comes from probes/services

Klembord-2.jpg
.
Klembord-3.jpg
.
Klembord-4.jpg
.
Klembord-5.jpg
.
etc etc etc etc
.
Services checked (list made with "Discover")
.
Klembord-8.jpg
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: No registered users and 11 guests