VMware Cloud Community
adrianlewis
Contributor
Contributor

Use of "includes" in SNMP plugin development

Hi,

I was wondering if there was any way to use some form of include function when developing an SNMP plugin in XML. I'm 90% happy with what the standard "Network Device" plugin does for me but I need to add in a few extra properties and metrics. Rather than rename and hack the existing plugin, I was hoping that I could create a fairly minimal plugin, include everything that the Network Device plugin does but put in my own additions. I realise that it might not be quite this easy but is there for instance a way to include platform or services metrics/properties for instance?

Having to recreate what is already there seems very inefficient (and unnecessarily difficult) to me.
Reply
0 Kudos
5 Replies
dougm_hyperic
VMware Employee
VMware Employee

It is possible to attach your own services to the existing Network Device platform type, see: examples/wxgoos-plugin.xml

But it sounds like you want to add metrics to the platform-level. There is an include mechanism, using the standard xml external entities..
the activemq-plugin.xml plugin for example includes a service type and process metrics

...
&process-metrics;

However, the Network Device's xml is embedded in netdevice-plugin.jar
We'd need to make the embedded xml accessible to other plugins though, which is do-able.
What metrics and properties are you looking to add? If they're from the IF,IP,HOST,etc., MIBs we could just add them to the existing plugin. If they are vendor specific MIBs, then we can work on making the Network Device metric include-able w/o having to copy-n-paste.
adrianlewis
Contributor
Contributor

Hi Dougm

Apologies for the delay - I really appreciate your help here. I've had a break from HQ for a little while but I'm back on it again, hoping to carry on where I left off. I'll check out the examples that you mentioned and let you know if I need any further help (probably will!).

Many thanks,

Adrian
Reply
0 Kudos
adrianlewis
Contributor
Contributor

Hi Dougm,

I am indeed hoping to add platform specific metrics and properties and they are specific to a private MIB. The device in question is a Fortigate firewall and I need to put in platform metrics such as total number of sessions, memory usage, CPU usage etc. I would also like to include platform properties such as firmware version, model, operating mode (uses textual-convention). Lastly I'm also hoping that with the private MIB available, SNMP traps would hopefully be translated into their relevant textual OID in log tracking.

I'm getting a little ambitious but if I could at least start with some platform metrics and service metrics that I could add simply as a Network device platform I would be happy.

If I can get this achieved, I'd like to move on to getting HA stats/alerts and configure the plugin to handle Fortinet's firewall virtualisation (called vdoms) where multiple instances of a firewall run on a single hardware unit.
Reply
0 Kudos
adrianlewis
Contributor
Contributor

Is it possible to unzip the netdevice.jar and add in a section to the hq-plugin.xml as has been done for the Cisco IOS and Pix devices? Can I put the Fortinet MIB into the folder inside the netdevice.jar for it to be included automatically?
Reply
0 Kudos
adrianlewis
Contributor
Contributor

For anyone that's interested - I've pretty much given up trying to get HQ to play nice with SNMP beyond the basics. Great product but not the one for me. Might have to persuade those that hold the purse strings to buy a commercial product instead.
Reply
0 Kudos