Exemple #1
0
def _install_server_plugins():
    '''
    Install plugins that are executed on the icinga-server (SNMP queries to switch etc)

    '''
    _install_server_plugins_dependencies()

    # These install snmp plugins
    snmp_plugin_path = "{0}lib/nagios/plugins_snmp/".format(app.SYCO_PATH)
    nagios_plugin_path = "/usr/lib64/nagios/plugins/"
    for plugin in os.listdir(snmp_plugin_path):
        x("cp {0}{2} {1}{2}".format(snmp_plugin_path, nagios_plugin_path,
                                    plugin))
        x("chown icinga:nrpe {0}{1}".format(nagios_plugin_path, plugin))
        x("chmod ug+x {0}{1}".format(nagios_plugin_path, plugin))

    # Set switch password for SNMP switch plugins
    switch_check_file = scopen.scOpen(
        "/etc/icinga/objects/commands/specific_checks.cfg")
    switchpass = app.get_switch_icmp_password().replace("&", "\&").replace(
        "/", "\/")
    switch_check_file.replace("$(SWITCHPASS)", switchpass)

    #x("chown -R icinga:icingacmd /usr/lib64/nagios/plugins")
    x("usermod -a -G nrpe icinga")
Exemple #2
0
def passwords(args):
  app.print_verbose("Set all passwords used by syco")
  app.init_all_passwords()
  print "root: ", app.get_root_password()
  print "svn: ", app.get_svn_password()
  print "ldap_admin: ", app.get_ldap_admin_password()
  print "ldap_sssd: ", app.get_ldap_sssd_password()
  print "glassfish_master: ", app.get_glassfish_master_password()
  print "glassfish_admin: ", app.get_glassfish_admin_password()
  print "glassfish_user: "******"glassfish")
  print "mysql_root: ", app.get_mysql_root_password()
  print "mysql_int: ", app.get_mysql_integration_password()
  print "mysql_stable: ", app.get_mysql_stable_password()
  print "mysql_uat: ", app.get_mysql_uat_password()
  print "mysql_prod: ", app.get_mysql_production_password()
  print "mysql_backup: ",app.get_mysql_backup_password()
  print "mysql_monitor: ",app.get_mysql_monitor_password()
  print "switch_icmp: ",app.get_switch_icmp_password()
Exemple #3
0
def passwords(args):
    app.print_verbose("Set all passwords used by syco")
    app.init_all_passwords()
    print "root: ", app.get_root_password()
    print "svn: ", app.get_svn_password()
    print "ldap_admin: ", app.get_ldap_admin_password()
    print "ldap_sssd: ", app.get_ldap_sssd_password()
    print "glassfish_master: ", app.get_glassfish_master_password()
    print "glassfish_admin: ", app.get_glassfish_admin_password()
    print "glassfish_user: "******"glassfish")
    print "mysql_root: ", app.get_mysql_root_password()
    print "mysql_int: ", app.get_mysql_integration_password()
    print "mysql_stable: ", app.get_mysql_stable_password()
    print "mysql_uat: ", app.get_mysql_uat_password()
    print "mysql_prod: ", app.get_mysql_production_password()
    print "mysql_backup: ", app.get_mysql_backup_password()
    print "mysql_monitor: ", app.get_mysql_monitor_password()
    print "switch_icmp: ", app.get_switch_icmp_password()
Exemple #4
0
def _install_server_plugins():
    '''
    Install plugins that are executed on the icinga-server (SNMP queries to switch etc)

    '''
    _install_server_plugins_dependencies()

    # These install snmp plugins
    snmp_plugin_path = "{0}lib/nagios/plugins_snmp/".format(app.SYCO_PATH)
    nagios_plugin_path = "/usr/lib64/nagios/plugins/"
    for plugin in os.listdir(snmp_plugin_path):
        x("cp {0}{2} {1}{2}".format(snmp_plugin_path,nagios_plugin_path,plugin))
        x("chown icinga:nrpe {0}{1}".format(nagios_plugin_path,plugin))
        x("chmod ug+x {0}{1}".format(nagios_plugin_path,plugin))

    # Set switch password for SNMP switch plugins
    switch_check_file = scopen.scOpen("/etc/icinga/objects/commands/specific_checks.cfg")
    switchpass = app.get_switch_icmp_password().replace("&","\&").replace("/","\/")
    switch_check_file.replace("$(SWITCHPASS)", switchpass)

    #x("chown -R icinga:icingacmd /usr/lib64/nagios/plugins")
    x("usermod -a -G nrpe icinga")