Beispiel #1
0
 public static void addNewServerConfig(Hashtable Params)
 {
     ZabbixServerConfigCollection zabbixServersList = getZabbixServersList();
     if (zabbixServersList == null)
     {
         zabbixServersList = new ZabbixServerConfigCollection();
     }
     zabbixServersList.Add(new ZabbixServerConfig(Params));
     updateServerConfigs(zabbixServersList);
 }
Beispiel #2
0
 public static void updateServerConfigs(ZabbixServerConfigCollection zabbixServersList)
 {
     Configuration appConfig = _getAppConfig();
     ZabbixServerConfigSection newSection = new ZabbixServerConfigSection();
     newSection.ServersList = zabbixServersList;
     appConfig.Sections.Remove("ZabbixServers");
     appConfig.Sections.Add("ZabbixServers", newSection);
     appConfig.Save();
 }