Chapter 6. OpenHPI Plugin Usage
This chapter is an overview of the existing plugins for OpenHPI, and how one needs to configured them for usage. It is expected that this will grow over time as new plugins are added.
6.1. General Configuration
To add a plugin for usage by OpenHPI one has to add at least 2 stanzas to the /etc/openhpi/openhpi.conf file. These are a plugin and handler stanza. An example configuration file is shown below.
# Sample /etc/openhpi/openhpi.conf # comments start with # character plugin libdummy handler libdummy { entity_root = "{ROOT,0}{SYSTEM_CHASSIS,2}" } plugin libsnmp_bc handler libsnmp_bc { version = "1" community = "mypass" host = "10.0.0.1" entity_root = "{ROOT,0}{SYSTEM_CHASSIS,0}" } handler libsnmp_bc { version = "1" community = "mypass" host = "10.0.0.21" entity_root = "{ROOT,0}{SYSTEM_CHASSIS,1}" }
The plugin stanza tells OpenHPI that there is a plugin file of the name libsnmp_bc.la in the LTDL_LIBRARY_PATH that it should load on startup. This path defaults to /usr/lib:/usr/local/lib.
The handler stanza creates and instance of an OpenHPI plugin. It includes a block stanza which lets the plugin take those configuration stanzas that it wishes, and use them for instantiation. At minimum, the entity_root must be specified to instruct OpenHPI where in the Entity hierarchy the entities discovered by the handler should go.