VMware Cloud Community
VoodooZ
Contributor
Contributor

developing SNMP based NetApp plugin

Hi,

HQ auto-detected most of our company's infrastructure by default which is impressive after trying other similar product...

The few unsupported ones are key so I'm considering developing them myself...
In this case my boss needs the various volumes and other metrics monitored on our NetApp filer...

I noticed that somebody already created a plugin but it's mostly a script which I'd rather avoid as we have the SNMP component of NetApp...

I got a skeleton netapp-plugin.xml prototype working with hardcoded OID (netapp.mib installed) but now I want to have it automatically enumerate volumes present on the filer so I won't have to change it everytime we makes changes to the filer...

I'd also like to have the filer's interfaces show up as services as in other plaforms...
do I have to simply "extend" or inherit from network-device class? (I'm a bit of a OO newbie so cope with me)...

Also, I ran in issues with plugin deployment: I created an hq-plugins folder at the same dir level as my agent and server (both using 3.1.1) folders (under /opt/hyperic) and installed the netapp-plugin.xml file in there..

when creating the netapp platform I use the agent running on the hq-server as the one to snmp queries so does that mean I avoid the plugin deployment issues? Or do I need to restart the agent too? I tried both with mixed results..

I encountered an issue where HQ wouldn't register changes to the the plugin file anymore so I removed netapp-plugin.xml and after restarting agent and server I noticed that they persisted in the Db I assume... I then found out about a bug (JIRA HHQ-342) that affected service types... but in my case plaform types are still present in the GUI...
I could just keep going with a diferent plugin name but would rather figure out how to clean that mess..

Thanks, any help is appreciated as netapp support is very important to us and would like to share with the community so everyone can benefit...

Stephane,
0 Kudos
30 Replies
excowboy
Virtuoso
Virtuoso

Hi Stephane,

I would definetly like to help you.
Could you just send me a mibwalk of your NetApp filer and the plugin you've developed so far ?

Cheers,
Mirko
0 Kudos
VoodooZ
Contributor
Contributor

I don't have much right now as I used the SNMP plugin tutorial which doesn't really helped me that much...
(http://support.hyperic.com/confluence/display/DOCSHQ30/SNMP+Plugin)

my current prototype uses hard-coded metrics which is not very flexible but a start...

<plugin name="netapp">
<property name="MIBDIR" value="/usr/share/snmp/mibs"/>
<property name="MIBS"
value="${MIBDIR}/netapp.mib"/>

<platform name="NetAppFiler">
<config include="snmp"/>

<plugin type="measurement"
class="net.hyperic.hq.product.SNMPMeasurementPlugin"/>

<property name="template" value="${snmp.template}:${alias}"/>

<metric name="Availability"
template="${snmp.template},Avail=true:.1.3.6.1.4.1.789.1.2.2.25.0"
indicator="true"/>

<metric name="Uptime"
alias=".1.3.6.1.4.1.789.1.2.1.1.0"
category="AVAILABILITY"
units="jiffys"
collectionType="trendsup"
defaultOn="true"
/>

<metric name="vol1_used"
alias=".1.3.6.1.4.1.789.1.4.5.1.4.1.1.0"
category="UTILIZATION"
units="KB"
collectionType="dynamic"
defaultOn="true"
/>

<metric name="vol2_used"
alias=".1.3.6.1.4.1.789.1.4.5.1.4.1.2.0"
category="UTILIZATION"
units="KB"
collectionType="dynamic"
defaultOn="true"
/>

<metric name="vol3_used"
alias=".1.3.6.1.4.1.789.1.4.5.1.4.1.3.0"
category="UTILIZATION"
units="KB"
collectionType="dynamic"
defaultOn="true"
/>
<metric name="vol4_used"
alias=".1.3.6.1.4.1.789.1.4.5.1.4.1.4.0"
category="UTILIZATION"
units="KB"
collectionType="dynamic"
defaultOn="true"
/>
</platform>
</plugin>


My biggest hurdle right now though is that I've somehow managed to mess up my Db...
I wasn't certain if my file changes were taking effect anymore so I removed the plugin from the hq-plugins folder and after restarting both agent and server, I noticed the platform type i created was still showing up in HQ's pulldowns when creating platforms. I read of a bug in HQ that caused service types to remain in DB backend and clean it up but couldn't remove the platform types... I'd like to figure out how to clean this up before starting again so I know the system is sane (and me too! 🙂 )

After that I want to do like the SNMP page examples and have the different volumes on a netapp filer be automatically discovered and enumerated as platform serviices (or server's services... not sure which yet as a netapp can have cifs, nfs, etc... but that's not a big issue )

do you have access to a netapp filer? If not I can test stuff for you...

Thanks,
0 Kudos
excowboy
Virtuoso
Virtuoso

Hi,
no I don't have access to a NetApp filer.
Please send me a mibwalk:

snmpwalk -On -c <community> -v <snmpversion> <ipadress> .1

I'm a little bit in hurry, so i'll have a look at your other questions later.

Cheers,
Mirko
0 Kudos
VoodooZ
Contributor
Contributor

without sending a full mib walk (security reasons) I can tell you right away that this is the tree I'm most interested in:

.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.quotaState.0 = INTEGER: quotaStateOff(1)
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.quotaInitPercent.0 = INTEGER: 0
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qvStateTable.qvStateEntry.qvStateVolume.1 = INTEGER: 1
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qvStateTable.qvStateEntry.qvStateVolume.2 = INTEGER: 2
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qvStateTable.qvStateEntry.qvStateName.1 = STRING: "vol1"
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qvStateTable.qvStateEntry.qvStateName.2 = STRING: "vol0"
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qvStateTable.qvStateEntry.qvStateStat.1 = INTEGER: quotaStateOn(2)
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qvStateTable.qvStateEntry.qvStateStat.2 = INTEGER: quotaStateOff(1)
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qvStateTable.qvStateEntry.qvStateInitPercent.1 = INTEGER: 0
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qvStateTable.qvStateEntry.qvStateInitPercent.2 = INTEGER: 0
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVIndex.1.1 = INTEGER: 1
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVIndex.1.2 = INTEGER: 2
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVIndex.1.3 = INTEGER: 3
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVIndex.1.4 = INTEGER: 4
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVType.1.1 = INTEGER: qrVTypeTree(3)
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVType.1.2 = INTEGER: qrVTypeTree(3)
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVType.1.3 = INTEGER: qrVTypeTree(3)
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVType.1.4 = INTEGER: qrVTypeTree(3)
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVId.1.1 = INTEGER: 1
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVId.1.2 = INTEGER: 2
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVId.1.3 = INTEGER: 3
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVId.1.4 = INTEGER: 4
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVKBytesUsed.1.1 = INTEGER: 64793188
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVKBytesUsed.1.2 = INTEGER: 3115736
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVKBytesUsed.1.3 = INTEGER: 48817952
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVKBytesUsed.1.4 = INTEGER: 358152
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVKBytesLimit.1.1 = INTEGER: 104857600
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVKBytesLimit.1.2 = INTEGER: 52428800
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVKBytesLimit.1.3 = INTEGER: 104857600
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVKBytesLimit.1.4 = INTEGER: 5242880
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVFilesUsed.1.1 = INTEGER: 61489
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVFilesUsed.1.2 = INTEGER: 58838
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVFilesUsed.1.3 = INTEGER: 94
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVFilesUsed.1.4 = INTEGER: 4981
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVFileLimit.1.1 = INTEGER: -1
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVFileLimit.1.2 = INTEGER: -1
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVFileLimit.1.3 = INTEGER: -1
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVFileLimit.1.4 = INTEGER: -1
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVPathName.1.1 = STRING: "/vol/vol1/backup"
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVPathName.1.2 = STRING: "/vol/vol1/dynadocs"
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVPathName.1.3 = STRING: "/vol/vol1/oracle_u02"
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVPathName.1.4 = STRING: "/vol/vol1/subversion"
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVVolume.1.1 = INTEGER: 1
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVVolume.1.2 = INTEGER: 1
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVVolume.1.3 = INTEGER: 1
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVVolume.1.4 = INTEGER: 1
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVTree.1.1 = STRING: "backup"
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVTree.1.2 = STRING: "dynadocs"
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVTree.1.3 = STRING: "oracle_u02"
.iso.org.dod.internet.private.enterprises.netapp.netapp1.quota.qrVTable.qrVEntry.qrVTree.1.4 = STRING: "subversion"

Mostly stuff under quota.qrVTable... Once we got that I'm sure a filter tag would do nicely to list all volumes and associated metrics (a subset of what's available)..

I can test this stuff out but I need help fitgure out how to remove old NetAppFiler platform type from my HQ... Or more importantly... how to test this darn thing repeatedly without messing up my db...

ps: here's the netapp mib for reference: http://www.oidview.com/mibs/789/NETWORK-APPLIANCE-MIB.html


Thanks,

Added URL for netapp mib..
Message was edited by: VoodooZ

oops. forgot the actual URL!!
Message was edited by: VoodooZ
0 Kudos
excowboy
Virtuoso
Virtuoso

Okay thanks, i'll have a look on it at the weekend.

I advise you to set up a development HQ Server and and Agent to test plugins because you already metioned it it can be difficult to remove or update plugins.

Cheers,
Mirko
0 Kudos
VoodooZ
Contributor
Contributor

yeah. Perhaps I'll do that... right away... using the new release...
0 Kudos
VoodooZ
Contributor
Contributor

OK..

3.1.4 installed on a seperate test box...

1st question: How would I have a plugin probe for all entries under OID qrVTable (1.3.6.1.4.1.789.1.4.5) of netapp.mib to display metric qrVKBytesUsed (1.3.6.1.4.1.789.1.4.5.1.4)?

Judging from http://www.oidview.com/mibs/789/NETWORK-APPLIANCE-MIB.html,
qrVTable will return a table of entries which could be used with a <filter> tag like I've seen done in other plugins but it doesn't seem to work...
Or maybe it's the way I set it up? I tried it as a platform service first as I wanted to avoid the extra complexity of the server's service approach (which didn't work either)...

Thanks,
0 Kudos
excowboy
Virtuoso
Virtuoso

Hi Stephane,

could you please try out the attached plugin ?
Because there is already a NetApp-Plugin, I named this one NetApp SNMP.
You have to deploy it in hq-plugins dir and maybe customize the path to your SNMP-mib file.
Please have a look at the end of the plugin, there are the metrics which you are interested in.
Based on the plugin and the development resources you should be able to customize the plugin.


Cheers,
Mirko

Message was edited by: excowboy
0 Kudos
excowboy
Virtuoso
Virtuoso

Sorry, forgot to attach the file

Cheers,
Mirko
0 Kudos
VoodooZ
Contributor
Contributor

wow! Lots of OIDs covered!
It does a lot more than mine...
It autodetects a lot of services but they don't show anything... probably because they need to configured...
Looking at the configuration properties for one of my "NetApp SNMP qrVEntry" services, there's only two options: snmpIndexName & snmpIndexValue...

Is there a way to have those autoinventoried further? or do I need to configure them manually?
I'm a bit unsure what value it expects in there as the ones I've tried were said to be invalid...

All is not lost as I might be able to merge some of my changes with yours...

THanks,
0 Kudos
excowboy
Virtuoso
Virtuoso

Hi,

could you turn on the debug mode of the Agent and send me the output ?

Cheers,
Mirko
0 Kudos
VoodooZ
Contributor
Contributor

oops. strange I thought I had already set the agent's log level to debug... I guess not...
so I turned it on and restarted the agent so hopefully that's enough....

it looks like the issue is in fact the unspecified indexname... What does it expect there?

Thanks,
0 Kudos
excowboy
Virtuoso
Virtuoso

Hi,

> wow! Lots of OIDs covered!
> It does a lot more than mine...
> It autodetects a lot of services but they don't show
> anything... probably because they need to
> configured...

do you see anything green or is everything greyed out 😉

> Looking at the configuration properties for one of my
> "NetApp SNMP qrVEntry" services, there's only two
> options: snmpIndexName & snmpIndexValue...

Based on the Netapp mib this service has multiple index. I don't know how to handle it yet.


>
> Is there a way to have those autoinventoried further?
> or do I need to configure them manually?
> I'm a bit unsure what value it expects in there as
> the ones I've tried were said to be invalid...
>
> All is not lost as I might be able to merge some of
> my changes with yours...

Yes, play around with it and report it here

>
> THanks,

No problem.

Cheers,
Mirko
0 Kudos
VoodooZ
Contributor
Contributor

Aside the main availability, everything is grey...

They need to be configured or something...
I'll have to reread through that SNMP example as I'm unsure why it can't just use the SNMP entries returned and just use that...

when I test it out with snmpwalk it all seems to make sense..

Thanks,
0 Kudos
VoodooZ
Contributor
Contributor

Yipee! It works now..

well, for QrVEntry at least...
I changed those two lines:

<property name="snmpIndexValue" value="qrVIndex" />
....
<property name="snmpIndexName" value="qrVPathName" />

I'll report back when I have the whole thing cleaned up polished...
I have to set the units rights and disable the useless indicators...

Thanks,

ps: did you use a special tool or script to generate the plugin or?
0 Kudos
excowboy
Virtuoso
Virtuoso

I enabled only some metrics by default, please read this how to enable some more metrics for the plugin:
http://support.hyperic.com/confluence/display/DOC/ui-Admin.Monitor.MetricTemplate#ui-Admin.Monitor.M...

Thanks

Message was edited by: excowboy
0 Kudos
VoodooZ
Contributor
Contributor

0 Kudos
VoodooZ
Contributor
Contributor

Update:

I just finished browsing the whole mib checking for tables and realised that the link to the Netapp mib I provided you is quite old compared to the one I got directly from Netapp.

I'll attach the latest version...

If you don't mind (and if you are indeed using a tool!) could you spit out a new netapp-snmp-plugin.xml using this new mib... And possibly output only the toplevel groups as servers... thanks.

Thanks,
0 Kudos
excowboy
Virtuoso
Virtuoso

Hi,

here you got a new plugin based on the latest mib-file.
Only availabilty metric is enabled by default. Please have a look ot the plugin before you deploy it 😉
Hope it helps.

-
Mirko
0 Kudos