testing delays and email notice tweaks.
[monitor.git] / zabbix / zabbixsite.py
index 07ad9d4..8c9892d 100755 (executable)
@@ -97,8 +97,9 @@ def setup_global():
        if zabbixserver:
                # TODO: verify that this works.  it has failed once on fresh
                # install... not sure why.
-               print "Removing default Zabbix server entry"
-               zabbixserver.delete()
+#              print "Removing default Zabbix server entry"
+#              zabbixserver.delete()
+               zabbixserver.host="unused default server"
 
                # NOTE: creating a host and assigning a template cannot work 
                #       due to the crazy item, trigger, action
@@ -160,8 +161,8 @@ def setup_site(loginbase, techemail, piemail, iplist):
 
        BI_WEEKLY_ESC_PERIOD = int(60*60*24)
        DISCOVERY_DELAY = 3600
-       BI_WEEKLY_ESC_PERIOD = int(240) # testing...
-       DISCOVERY_DELAY = 120 # testing
+       BI_WEEKLY_ESC_PERIOD = int(45*60) # testing...
+       DISCOVERY_DELAY = 240 # testing
 
        # User Group
        site_user_group = UsrGrp.find_or_create(name=USERGROUP_NAME % loginbase)
@@ -181,7 +182,9 @@ def setup_site(loginbase, techemail, piemail, iplist):
 
        # HOST GROUP
        plc_host_group = HostGroup.find_or_create(name="MyPLC Hosts")
+       print "myplc groupid: ", plc_host_group.groupid
        site_host_group = HostGroup.find_or_create(name=HOSTGROUP_NAME % loginbase)
+       print "site groupid: ", site_host_group.groupid
        plctemplate = Host.get_by(host="Template_Linux_PLC_Host")
        escalation_action_name = ESCALATION_ACTION_NAME % loginbase
        discovery_action_name = DISCOVERY_ACTION_NAME % loginbase