Hi Tom,

thank you!

 

I’ll give it a look.

 

Cheers,

Stefano

 

From: observium [mailto:observium-bounces@observium.org] On Behalf Of Tom Laermans
Sent: venerd́ 9 maggio 2014 12:42
To: Observium Network Observation System
Subject: Re: [Observium] Add disk status to Buffalo Terastation

 

Hi Stefano,

These are state sensors; we have similar code for Synology DSM, see includes/discovery/sensors/synology-disk-mib.inc.php for example.

This also needs an array in includes/definitions/sensors.inc.php.

Check commit 5139 for a full commit view :)

Tom

On 05/09/2014 11:28 AM, Stefano Cordio wrote:

Hey guys,

I’d like to implement an addition for my NAS box, a Buffalo Terastation.

This NAS sends a daily report about the available space and the state of the disks. Observium already grabs details about the space, so I’d like to also add support to disk status/diagnostics (I already have the needed MIB files).

The following is a MIB snippet:

 

------------------------------------------------------

nasDiskStatus                   OBJECT-TYPE

    SYNTAX                           INTEGER {

                            notSupport(-1),

                                                   normal(1),

                                                   array1(2),

                                                   array2(3),

                                                   standby(4),

                                                   degrade(5),

                                                   remove(6),

                                                   standbyRemoved(7),

                                                   degradeRemoved(8),

                                                   removeRemoved(9)

                                               }

    MAX-ACCESS                read-only

    STATUS                           current

    DESCRIPTION                               "The state of local disks. This value is read from

                                               'diskx' line in file /etc/melco/diskinfo.

 

                        notSupport(-1) indicates the disk slot is not exist.

 

                                               normal(1) indicates the disk is not part of RAID array.

 

                                               array1(2) indicates the disk is part of array1.

 

                                               array2(3) indicates the disk is part of array2.

 

                                               standby(4) indicates the disk is standby and power-off.

 

                                               degrade(5) indicates the disk has degraded and removed

                                               from array, and power-off.

 

                                               remove(6) indicates the disk has removed from array

                                               by user and power-off.

 

                                               standbyRemoved(7) indicates the disk is standby and

                                               removed from NAS.

 

                                               degradeRemoved(8) indicates the disk has degraded and

                                               removed from array and NAS.

 

                                               removeRemoved(9) indicates the disk has removed from

                                               array and NAS."

    ::= { nasDiskEntry 2 }

------------------------------------------------------

 

I’m not sure which is the best location in the device page for showing these informations.

Could we consider these as a kind of sensor or is it something inventory-related? Actually I need a design advice.

Would be really nice if  you could also give me a pointer to a similar existing code. I strongly believe in learning by example :-)

 

Thanks,

Stefano




_______________________________________________
observium mailing list
observium@observium.org
http://postman.memetic.org/cgi-bin/mailman/listinfo/observium