ZenPack:WSMAN
- Current Maintainer(s)
- Zenoss,Inc.
- Organization
- Zenoss, Inc.
- License
- GNU General Public License, Version 2, or later
- ZenPack name
- ZenPacks.zenoss.WSMAN
- Git sources (for cloning)
- Link
WSMAN ZenPack
Warning
The ZenPack Catalog has moved to its new home at https://www.zenoss.com/product/zenpacks as of January 17, 2017. The following information may be out of date, and this page will eventually be removed.
Support
This is an Open Source ZenPack developed by Zenoss, Inc. Enterprise support for this ZenPack is available to commercial customers with an active subscription.
Releases
- Version 1.0.0- Download
- Released on 2014/01/03
- Requires PythonCollector ZenPack
- Compatible with Zenoss Core 4.2.x, Zenoss Resource Manager 4.1.x, Zenoss Resource Manager 4.2.x
Background
This ZenPack provides a new WSMAN data source type that makes it easy to collect metrics from a WSMAN provider. It also provides a new WSMANPlugin modeler plugin base class that simplifies modeling devices and applications that support WSMAN.
WSMAN Data Source Type
The WSMAN data source type added by this ZenPack allows you to add a WSMAN data source with the following new new data source properties.
- Namespace
- The WSMAN namespace. This must be specified and there is no default value. A common example would be root/dcim.
- CIM Class
- The CIM Class to query. This must be specified and there is no default value.
- Query
- Optional. The query to execute that will return the desired record(s). This must be specified and there is no default value.
- Result Component Key
- Optional. Only used in cases where the WSMAN data source is in a monitoring template that gets bound to components. In this case Result Component Key should be set to the attribute or column name that contains the component identifier in the result set of the Query.
- Result Component Value
- Optional. Only used in cases where the WSMAN data source is in a monitoring template that gets bound to components. In this case Result Component Value is the value that gets mapped to values in the Result Component Key column of the result set. Typically this takes the form of a TALES expression such as ${here/id} or ${here/wsmanInstanceId} if wsmanInstanceID was modeled on your component.
- Result Timestamp Key
- Optional. Used in both device- and component-bound monitoring templates when the query result set has a column noting the time the data was originally collected. Like the Result Component Key this should be the name of an attribute or column name in the results. By default this will default to NOW as the collection time.
WSMANPlugin Modeler Plugin Base Class
The WSMANPlugin modeler plugin base class allows you to create modeler plugins that do something with data that is returned from a WSMAN Enumerate call. See the following example of a modeler plugin.
from ZenPacks.zenoss.WSMAN.modeler.WSMANPlugin import WSMANPlugin """Description of what MyWSMANPlugin does.""" class MyWSMANPlugin(WSMANPlugin): wsman_queries = { 'DCIM_EnclosureView': '', 'DCIM_SystemView': '' } def process(self, device, results, log): log.info('Modeler %s processing data for device %s', self.name(), device.id) EnclosureView = results.get('DCIM_EnclosureView') SystemView = results.get('DCIM_SystemView') pe_maps = [] for inst in SystemView: om = ObjectMap() om.id = self.prepId(str(inst['ChassisName'])) om.model = inst['Model'] pe_maps.append(om) return pe_maps
Installation
Normal Installation (packaged egg)
- Download the appropriate egg file for the version of Zenoss you are running.
- Ensure you are logged in as the zenoss user:
$ sudo su - zenoss
- Install the ZenPack:
$ zenpack --install ZenPacks.zenoss.WSMAN-*.egg
- Restart these services:
$ zenoss restart
Developer Mode Installation
In order to do a development mode installation you will want to clone the existing git repository, and then use the --link flag with the zenpack command:
- Ensure you are logged in as the zenoss user:
$ sudo su - zenoss
- Start by cloning the upstream repository:
$ git clone git://github.com/zenoss/ZenPacks.zenoss.WSMAN.git
- Next, perform the installation:
$ zenpack --link --install ZenPacks.zenoss.WSMAN
- Finally, restart these serivices:
$ zenoss restart
Discuss
New: Don't forget to add yourself to the Zenoss User Map!