ONTAP Discussions

SNMP trap to notify when volume has been added/destroyed

jay_levan
3,486 Views

Can I add an SNMP trap to send a notification whenever a volume is created or removed? Which OID and Edge 1 values should I use?

1 ACCEPTED SOLUTION

msaravan
3,486 Views

Hi Jay Levan,

It is possible to create one trap which will be triggered when you

either create or delete a volume. The volNumber object can be used for

this.

Name: volNumber

Type: OBJECT-TYPE

OID: 1.3.6.1.4.1.789.1.5.9

Full path:

iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).netapp(789).n

etapp1(1).filesys(5).volNumber(9)

I created a sample trap @ my ONTAP. Here goes the details :

filer> snmp traps

volumeCreatedOrDestroyed

priority = notification

active = on

OID = snmp.1.3.6.1.4.1.789.1.5.9.0

trigger = change-trigger

interval = 10

edge-1 = 1 (up)

current-value = 98

filer>

The current-value is automatically populated and you don't need to worry

about it.

When you receive this trap @ trap receiver, you can look at the

volNumber value. With respect to old value, if you see an increment

there, you can consider it as volume creation operation. If there is a

decrement, then it should be a volume deletion operation.

If you are looking for 2 different traps, one for Volume added and the

other for Volume destroyed, I don't know how to achieve that as of now.

Regards,

Saravanan

View solution in original post

3 REPLIES 3

msaravan
3,487 Views

Hi Jay Levan,

It is possible to create one trap which will be triggered when you

either create or delete a volume. The volNumber object can be used for

this.

Name: volNumber

Type: OBJECT-TYPE

OID: 1.3.6.1.4.1.789.1.5.9

Full path:

iso(1).org(3).dod(6).internet(1).private(4).enterprises(1).netapp(789).n

etapp1(1).filesys(5).volNumber(9)

I created a sample trap @ my ONTAP. Here goes the details :

filer> snmp traps

volumeCreatedOrDestroyed

priority = notification

active = on

OID = snmp.1.3.6.1.4.1.789.1.5.9.0

trigger = change-trigger

interval = 10

edge-1 = 1 (up)

current-value = 98

filer>

The current-value is automatically populated and you don't need to worry

about it.

When you receive this trap @ trap receiver, you can look at the

volNumber value. With respect to old value, if you see an increment

there, you can consider it as volume creation operation. If there is a

decrement, then it should be a volume deletion operation.

If you are looking for 2 different traps, one for Volume added and the

other for Volume destroyed, I don't know how to achieve that as of now.

Regards,

Saravanan

jay_levan
3,486 Views

Thanks!

Now to get a little more greedy ...

Is there an equivelant trap that can send the name of the volume that changed? I tried using

snmp.1.3.6.1.4.1.789.1.5.8.1.2 but keep getting "Error--var spec couldn't be retrieved from database"

msaravan
3,486 Views

Object snmp.1.3.6.1.4.1.789.1.5.8.1.2 is a tabular object. To get the right value, you need to pass the index to the mib object.

Ex:

# snmpget -v 1 -c public 10.72.xxx.xx .1.3.6.1.4.1.789.1.5.9.0

enterprises.789.1.5.9.0 = 98 <== volNumer ==>

#

# snmpget -v 1 -c public 10.72.xxx.xx .1.3.6.1.4.1.789.1.5.8.1.2.98

enterprises.789.1.5.8.1.2.98 = "vol6" <== volName ==>

#

Here, vol6 is the new volume I created which has the last index 98.

On your equivalent trap question : I'll explore it more this weekend and let you know if I get any useful information.

Regards,

Saravanan

Public