Class XmlCollector

    • Constructor Detail

      • XmlCollector

        public XmlCollector()
    • Method Detail

      • getXmlCollectionDao

        public XmlDataCollectionConfigDao getXmlCollectionDao()
        Gets the XML Data Collection DAO.
        Returns:
        the XML Data Collection DAO
      • setXmlCollectionDao

        public void setXmlCollectionDao​(XmlDataCollectionConfigDao xmlCollectionDao)
        Sets the XML Data Collection DAO.
        Parameters:
        xmlCollectionDao - the new XML Data Collection DAO
      • getRuntimeAttributes

        public java.util.Map<java.lang.String,​java.lang.Object> getRuntimeAttributes​(CollectionAgent agent,
                                                                                           java.util.Map<java.lang.String,​java.lang.Object> parameters)
        Description copied from interface: ServiceCollector
        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.
        Specified by:
        getRuntimeAttributes in interface ServiceCollector
        Overrides:
        getRuntimeAttributes in class AbstractServiceCollector
        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).
      • collect

        public CollectionSet collect​(CollectionAgent agent,
                                     java.util.Map<java.lang.String,​java.lang.Object> parameters)
                              throws CollectionException
        Description copied from interface: ServiceCollector
        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:
        CollectionException
      • getRrdRepository

        public RrdRepository getRrdRepository​(java.lang.String collectionName)
        Description copied from interface: ServiceCollector
        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.
      • setNodeDao

        public void setNodeDao​(NodeDao nodeDao)
      • filterParameters

        protected static java.util.Map<java.lang.String,​java.lang.String> filterParameters​(java.util.Map<java.lang.String,​java.lang.Object> input)
        Filter out blacklisted key/values out from an input Map.
        Parameters:
        input - the original parameters
        Returns:
        a new map containing the filtered parameters