Interface ServiceCollector

    • Method Detail

      • collect

        CollectionSet collect​(CollectionAgent agent,
                              Map<String,​Object> parameters)
                       throws CollectionException
        Invokes a collection on the object. This call will be performed in both OpenNMS and Minion.
        Parameters:
        agent - a org.opennms.netmgt.collectd.CollectionAgent object.
        parameters - a Map object.
        Returns:
        a org.opennms.netmgt.config.collector.CollectionSet object.
        Throws:
        org.opennms.netmgt.collectd.CollectionException - if any.
        CollectionException
      • getRrdRepository

        RrdRepository getRrdRepository​(String collectionName)
        Retrieve the RrdRepository configuration for the given collection. This call will always be performed in OpenNMS.
        Parameters:
        collectionName - a String object.
        Returns:
        a RrdRepository object.
      • getRuntimeAttributes

        Map<String,​Object> getRuntimeAttributes​(CollectionAgent agent,
                                                      Map<String,​Object> parameters)
        Invoked before every call to #collect(CollectionAgent, EventProxy, Map) in order to retrieve state/runtime information required for perform the collection. This call will always be performed in OpenNMS.
        Parameters:
        agent - Includes details about to the agent from which we wish to collect.
        parameters - Includes the service parameters defined in collectd-configuration.xml.
        Returns:
        Additional attributes, which should be added to the parameter map before calling #collect(CollectionAgent, EventProxy, Map).
      • getEffectiveLocation

        String getEffectiveLocation​(String location)
        Allows the collector to override the location at which it should be run. This call will always be performed in OpenNMS.
        Parameters:
        location - location associated with the service to be monitored
        Returns:
        a possibly updated location
      • marshalParameters

        Map<String,​String> marshalParameters​(Map<String,​Object> parameters)
        Marshal the parameter values to strings, which is necessary for passing the parameters over the wire for the RPC call. We delegate this task to the ServiceCollector instead of handling it elsewhere since the API, and RPC module do not have access to the model objects used by the collector. This will only be called in OpenNMS when the collector is to be executed remotely.
        Parameters:
        parameters -
        Returns:
      • unmarshalParameters

        Map<String,​Object> unmarshalParameters​(Map<String,​String> parameters)
        Unmarshal the parameter values from strings. This call will always be performed in Minion.
        Parameters:
        parameters -
        Returns: