Exemple #1
0
    def readConf(self):
        """
        Read the configuration file using the ConfigParser API.
        The PluginConfig.readConf reads the "disable" option of the
        "main" section.
        """
        PluginConfig.readConf(self)
	MonitoringDatabaseConfig.setup(self, self.conffile)

        try:
            self.monitoring_uri = self.get("webservices", "monitoring_url")
        except:
            self.monitoring_uri = "" # http://localhost/zabbix/

        try:
            self.monitoring_username = self.get("webservices", "monitoring_username")
        except:
            self.monitoring_username = "" # Admin

        try:
            self.monitoring_password = self.get("webservices", "monitoring_password")
        except:
            self.monitoring_password = "" # zabbix

        try:
            self.nmap_enable = self.get("data", "nmap_enable")
        except:
            self.nmap_enable = "" # 0

        try:
            self.nmap_task_time = self.get("data", "nmap_task_time")
        except:
            self.nmap_task_time = "" # 15 22 * * *

        try:
            self.nmap_network = self.get("data", "nmap_network")
        except:
            self.nmap_task_time = "" # "192.168.0.0/24"
Exemple #2
0
    def __init__(self, name = 'monitoring', conffile = None):
        if not hasattr(self, 'initdone'):
            PluginConfig.__init__(self, name, conffile)
	    MonitoringDatabaseConfig.__init__(self)
            self.initdone = True