Exemple #1
0
func (s Salt) UpdateMonitoringConfiguration(nodes []string, config []monitoring.Plugin) (failed_nodes []string, err error) {
	mutex.Lock()
	defer mutex.Unlock()
	var pyobj *python.PyObject
	if pyobj, err = pyFuncs["UpdateMonitoringConfiguration"].Call(nodes, monitoring.ToSaltPillarCompat(config)); err == nil {
		err = gopy.Convert(pyobj, &failed_nodes)
	}
	return
}
func (a SaltNodeManager) AddMonitoringPlugin(nodes []string, master string, plugin monitoring.Plugin) (map[string]interface{}, error) {
	failed_nodes, err := salt_backend.AddMonitoringPlugin([]string{plugin.Name}, nodes, "", monitoring.ToSaltPillarCompat([]monitoring.Plugin{plugin}))
	return failed_nodes, err
}
func (a SaltNodeManager) SetUpMonitoring(node string, master string) (map[string]interface{}, error) {
	// The plugins to be setup includes the editable plugins and also the write plugin
	failed_nodes, err := salt_backend.AddMonitoringPlugin(append(monitoring.SupportedMonitoringPlugins, monitoring.MonitoringWritePlugin), []string{node}, master, monitoring.ToSaltPillarCompat(monitoring.GetDefaultThresholdValues()))
	return failed_nodes, err
}