Beispiel #1
0
func (s Salt) UpdateMonitoringConfiguration(nodes []string, config []monitoring.Plugin, ctxt string) (failed_nodes map[string]string, err error) {
	failed_nodes = make(map[string]string)
	mutex.Lock()
	defer mutex.Unlock()
	if pyobj, loc_err := pyFuncs["UpdateMonitoringConfiguration"].Call(nodes, monitoring.ToSaltPillarCompat(config), ctxt); loc_err == nil {
		err = gopy.Convert(pyobj, &failed_nodes)
	} else {
		err = loc_err
	}
	return
}
Beispiel #2
0
func (a SaltNodeManager) AddMonitoringPlugin(nodes []string, master string, plugin monitoring.Plugin, ctxt string) (map[string]interface{}, error) {
	failed_nodes, err := salt_backend.AddMonitoringPlugin([]string{plugin.Name}, nodes, "", monitoring.ToSaltPillarCompat([]monitoring.Plugin{plugin}), ctxt)
	return failed_nodes, err
}
Beispiel #3
0
func (a SaltNodeManager) EnforceMonitoring(plugin_names []string, nodes []string, master string, plugins []monitoring.Plugin, ctxt string) (map[string]interface{}, error) {
	failed_nodes, err := salt_backend.AddMonitoringPlugin(plugin_names, nodes, master, monitoring.ToSaltPillarCompat(plugins), ctxt)
	return failed_nodes, err
}