CN101232515A - 一种基于ldap的分布式的集群管理监控系统 - Google Patents

一种基于ldap的分布式的集群管理监控系统 Download PDF

Info

Publication number
CN101232515A
CN101232515A CNA2008100146421A CN200810014642A CN101232515A CN 101232515 A CN101232515 A CN 101232515A CN A2008100146421 A CNA2008100146421 A CN A2008100146421A CN 200810014642 A CN200810014642 A CN 200810014642A CN 101232515 A CN101232515 A CN 101232515A
Authority
CN
China
Prior art keywords
tree
ldap
node
management end
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2008100146421A
Other languages
English (en)
Inventor
李刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Langchao Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Langchao Electronic Information Industry Co Ltd filed Critical Langchao Electronic Information Industry Co Ltd
Priority to CNA2008100146421A priority Critical patent/CN101232515A/zh
Publication of CN101232515A publication Critical patent/CN101232515A/zh
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明提供了一种基于LDAP的分布式的集群管理监控系统,集群管理员使用本系统可以控制和监控每个服务器的运行状态。本系统表现为一棵倒立的树,根节点代表管理端,被管理端则表现为一棵子树,而管理端也可以包含几棵子树来表示系统数据。首先,每个服务器的信息由自己组织并在本地树中保存,树的每个节点都是一个信息体,代表一类信息,这些信息由一系列的“属性-值”对来表示,而信息的存储可以使用任何方式,比如关系型数据库,LDAP只是从人容易理解的角度对数据做了一层抽象,使访问变得简单。

Description

一种基于LDAP的分布式的集群管理监控系统
技术领域
本发明涉及集群管理监控系统,特别涉及集群管理监控系统的数据组织方式和各模块间的通信方式。
背景技术
目前多数集群管理监控系统都是采用的C/S结构一即客户端、服务端和后台数据库,由服务端收集所有被控节点的信息并保存在后台数据库中。采用这种结构的缺点是:所有节点共享一个数据库,导致节点的独立性较低,而且当节点数目很大时会增加数据库节点的负担。再者,当采用RMI来进行节点间通信时,必须为每个节点都开启RMI服务,这都会导致系统稳定性不高。
发明内容
本发明的目的是实现一种基于LDAP的分布式的集群管理监控系统。
为实现上述目的,本系统包括一个管理端和多个被管理端。管理端和被管理端都维护一个倒立的树,树的每个节点都代表一类信息。每个节点都有相对标识和绝对标识,类似Unix文件系统中的文件名和绝对路径,节点的绝对标识就是相对标识加上父亲节点的绝对标识。节点的信息采用“属性-值”对的形式表示,一个属性可以对应一个值也可以对应多个值。
管理端子树主要用于保存和系统运行有关的配置信息。利用LDAP分布式应用中的referral对象和ref属性,在管理端子树中建立指向各被管理端子树的索引叶子节点,如图1所示。管理端和被管理端对应节点的绝对标识是一样的,被管理端的节点除了标识名以外和管理端可以没有任何关系,如图2所示为被管理端子树的结构。建立了这种关联以后,当管理端需要访问被管理端数据时,referral节点将会重定向到对应的被管理节点,如图3所示为整个系统表现出来的树型结构。
加载LDAP的Java schema,使LDAP可以保存Java RMI对象,通过JNDI将对象和对应节点绑定。知道节点的绝对标识就可以获得对象。
开源软件OPENLADP完全支持这种结构。
本发明的优点是,本发明提供了一种基于LDAP的分布式的集群管理监控系统,该系统能够使节点间的关联性降到最低,使用LDAP代替RMI来保持系统的一致性,同时,系统采用人们更容易理解的“属性-值”对的方式来表示节点的信息。
附图说明
图1是管理端实际的目录树结构图;
图2是被管理实际的目录树结构图;
图3是系统最终表现出来的目录树结构图。
具体实施方式
本发明提供了一种基于LDAP的分布式的集群管理监控系统,该系统建立在OPENLDAP、JNDI和RMI的基础上。下面结合附图和实施例,对本发明作以下详细说明。
一、管理端配置:
a)安装OPENLDAP,从www.openldap.org下载最新的OPENLDAP软件包。
b)找到配置文件slapd.conf,作如下修改:
在include./schema/core.schema这行后面添加新行,包含所有的方案,
其中就是对Java对象绑定的支持:java.schema
include./schema/corba.schema
include./schema/cosine.schema
include./schema/inetorgperson.schema
include./schema/java.schema
include./schema/krb5-kdc.schema
include./schema/misc.schema
include./schema/nadf.schema
include./schema/nis.schema
include./schema/openldap.schema
c)对配置文件slapd.conf的“BDB database definitions”部分更改相应的修改:默认内容:
database bdb               //实际存储数据的数据库,不用修改
suffix  ″dc=domain,dc=com″         //树的根节点标识名
rootdn″cn=Manager,dc=domain,dc=com″//管理员账号,具有所有权限
rootpw secret                             //管理员密码
主要修改suffix适合自己的树,如图1所示,根节点的标识名为
“dc=inspur,dc=com”,相应地,修改roodn为“cn=Manager,dc=inspur,dc=com”,
修改后的内容为:
database bdb
suffix  ″dc=inspur,dc=com″
rootdn  ″cn=Manager,dc=inspur,dc=com″
rootpw  secret
接下来为目录树添加节点信息,上述只是配置了根节点,要使根节点有效,还要为根节点添加“属性-值″序列,同时按照附图1定义子节点和对应的属性,
一并写入目录树中。这可以通过以ldif为后缀的任何文件实现,对于附图1,
编辑test.ldif文件,写入以下内容:
//写如根节点
dn:dc=domain,dc=com    //表示名
//属性序列
dc:domain
description:www.inspur.com
objectClass:dcObject
objectClass:organization
o:inspur
//子节点node1的索引
dn:hostname=node1,dc=domain,dc=com
hostname:node1
objectClass:referral
objectClass:extensibleObject
ref:loda://10.152.11.99
//子节点node2的索引
dn:hostname=node2,dc=domain,dc=com
hostname:node2
objectClass:referral
objectClass:extensibleObject
ref:loda://10.152.11.101
d)启动slapd进程,测试OPENLDAP是否正常运行,运行下面的命令检查:
ldapsearch-x-b’d=inspur,dc=com’
二、被管理端配置:
被管理端配置和管理端配置的过程类似,不同的地方在于:
a)test.ldif文件的内容,以node1为例:
//子节点node1,它同时也是node1子树的根节点
dn:hostname=node1,dc=domain,dc=com
hostname:node1
ip:10.152.11.99
cpu_usage:10%
memory_usage:13%
 slapd.conf文件的内容:
databasebdb
suffix  ″hostname=node1,dc=inspur,dc=com″
rootdn  ″cn=Manager,hostname=node1,dc=inspur,dc=com″
rootpw  secret
b)slapd.conf文件添加新行:
referral ldap://10.152.11.87        //指向管理端IP地址
这样所有的配置都已完成,在管理端和被管理端分别启动slapd进程。
实施例1:被管理端绑定RMI对象
import javax.naming.Context;
import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;
import java.rmi.server.UnicastRemoteObject;
import java.util.Hashtable;
public class LDAPTest
{
 /*连接LDAP目录上下文*/
 public static DirContext ldap=null;
 /*获得连接*/
 public static DirContext getConnection()
 {
 DirContext dct=null;
 //目录树根节点
 String root=″dc=inspur,dc=com″;
 //初始化连接参数
 Hashtable<String,String>env=new Hashtable<String,String>();
 env.put(Context.INITIAL_CONTEXT_FACTORY,
 ″com.sun.jndi.ldap.LdapCtxFactory″);
 env.put(Context.PROVIDER_URL,″ldap;//10.152.11.99/″+root);
 env.put(Context.SECURITY_AUTHENTICATION,″simple″);
 env.put(Context.SECURITY_PRINCIPAL,″cn=Manager,dc=domain,dc=com″);
 env.put(Context.SECURITY_CREDENTIALS,″secret″);
 try
 {
 //获得连接
 dct=new InitialDirContext(env);
 return dct;
 }
 catch(Exception e)
 {
 return null;
 }
 }
 public static void main(String[]args)
 {
 //建立连接
 ldap=getConnection();
 //连接失败
 if(ldap==null)
 {
 System.out.println(″认证失败″);
 }
 //连接成功
 System.out.println(″认证成功″);
 try
 {
 Server obj=new Server();
 //RMI对象
 Hello stub=(Hello)UnicastRemoteObject.exportObject(obj,0);
 //将节点“cn=test“和RMI对象绑定
 ldap.rebind(″cn=test″,stub);
 //测试是否绑定成功,通过节点标识获得RMI对象
 stub=(Hello)ldap.lookup(″cn=test″);
 String response=stub.sayHello();
 System.out.println(response);
 }
 catch(Exception e)
 {
 e.printStackTrace();
 }
 //关闭连接,
 if(ldap !=null)
 {
 try
 {
 ldap.close();
 }
 catch(Exception e){}
 }
 }
 /*
*当程序关闭和目录的连接之后,LDAPTest进程并不会停止,它会建立一个**守护线程来处理RMI调用
*/
 }
实施例2:
管理端访问被管理端子树
import javax.naming.Context;
 import javax.naming.directory.DirContext;
 import javax.naming.directory.InitialDirContext;
 import java.rmi.server.UnicastRemoteObject;
 import java.util.Hashtable;
 public class Client
 {
 /*连接LDAP目录上下文*/
 public static DirContext ldap=null;
 /*获得连接*/
 public static DirContext getConnection()
 {
 DirContext dct=null;
 //根节点
 String root=″dc=domain,dc=com″;
 //初始化连接参数
 Hashtable<String,String>env=new Hashtable<String,String>();
env.put(Context.INITIAL_CONTEXT_FACTORY,
″com.sun.jndi.ldap.LdapCtxFactory″);
env.put(Context.PROVIDER_URL,″ldap://10.152.11.99/″+root);
 env.put(Context.SECURITY_AUTHENTICATION,″simple″);
  env.put(Context.SECURITY_PRINCIPAL,
″cn=Manager,ou=fenbushi,dc=domain,dc=com″);
  env.put(Context.SECURITY_CREDENTIALS,″secret″);
//允许分布式连接,
env.put(Context.REFERRAL,″follow″);
try
{
dct=new InitialDirContext(env);
return dct;
}
catch(Exception e)
{
//e.printStackTrace();
  return null;
}
    }
    public static void main(String[]args)
    {
    ldap=getConnection();
    if(ldap==null)
    {
    System.out.println(″认证失败″);
    System.exit(1);
    }
    System.out.println(″认证成功″);
    try
    {
    //查询远程节点的信息,就像是访问本地目录一样,
    System.out.println(dct.getAttributes(″ou=fenbushi″).get(″ou″).get(
));
    }
    catch(Exception e)
    {
    e.printStackTrace();
    }
    if(ldap!=null)
    {
    try
    {
    ldap.close();
    }
    catch(Exception e){}
    }
    }
    }。

Claims (2)

1.一种基于LDAP的分布式的集群管理监控系统,其特征在于,系统包括一个管理端和多个被管理端组成的一棵倒立的树,根节点代表管理端,被管理端则表现为一棵子树,而管理端也包含几棵子树来表示系统数据;每个服务器的信息由自己组织并在本地树中保存,树的每个节点都是一个代表一类信息的信息体;管理端和被管理端各自维护一颗子树,利用LDAP的referral对象和ref属性,在管理端树下建立指向每棵被管理端子树的索引叶子节点,将所有子树连接成一棵整树;结合RMI建立管理端和被管理端之间建立的通信,通过JNDI将树的节点和RMI对象绑定,以代替在每个服务器上开启RMI注册服务。
2.按照权利要求1所述的系统,其特征在于每个节点的信息采用“属性-值”对的形式表示,使访问变得简单。
CNA2008100146421A 2008-02-25 2008-02-25 一种基于ldap的分布式的集群管理监控系统 Pending CN101232515A (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2008100146421A CN101232515A (zh) 2008-02-25 2008-02-25 一种基于ldap的分布式的集群管理监控系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2008100146421A CN101232515A (zh) 2008-02-25 2008-02-25 一种基于ldap的分布式的集群管理监控系统

Publications (1)

Publication Number Publication Date
CN101232515A true CN101232515A (zh) 2008-07-30

Family

ID=39898687

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2008100146421A Pending CN101232515A (zh) 2008-02-25 2008-02-25 一种基于ldap的分布式的集群管理监控系统

Country Status (1)

Country Link
CN (1) CN101232515A (zh)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102129468A (zh) * 2011-03-22 2011-07-20 曙光信息产业股份有限公司 一种可定制集群状态展现的架构
CN103347088A (zh) * 2013-07-16 2013-10-09 诚迈科技(南京)有限公司 一种服务器集群触发方法
CN103389715A (zh) * 2013-07-26 2013-11-13 浪潮电子信息产业股份有限公司 一种高性能的分布式数据中心监控架构
CN103647830A (zh) * 2013-12-13 2014-03-19 浪潮电子信息产业股份有限公司 一种集群管理系统中多层次配置文件的动态管理方法
CN103959712A (zh) * 2011-12-13 2014-07-30 迈克菲公司 大型防火墙集群中的定时管理
CN104618486A (zh) * 2015-02-06 2015-05-13 浪潮电子信息产业股份有限公司 一种统一管理集群存储系统多平台用户的方法
CN104769908A (zh) * 2012-09-07 2015-07-08 甲骨文国际公司 基于ldap的多租户云中身份管理系统
CN109088879A (zh) * 2018-09-07 2018-12-25 郑州云海信息技术有限公司 分布式存储系统外部ldap域服务器认证接口实现方法
CN109344159A (zh) * 2018-10-15 2019-02-15 北京天融信网络安全技术有限公司 用于ldap的查找方法、装置、电子设备及存储介质
US10581867B2 (en) 2012-09-07 2020-03-03 Oracle International Corporation Multi-tenancy identity management system

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102129468B (zh) * 2011-03-22 2014-04-23 曙光信息产业股份有限公司 一种可定制集群状态展现的方法
CN102129468A (zh) * 2011-03-22 2011-07-20 曙光信息产业股份有限公司 一种可定制集群状态展现的架构
CN103959712B (zh) * 2011-12-13 2017-06-20 迈克菲公司 大型防火墙集群中的定时管理
CN103959712A (zh) * 2011-12-13 2014-07-30 迈克菲公司 大型防火墙集群中的定时管理
CN104769908B (zh) * 2012-09-07 2017-11-17 甲骨文国际公司 基于ldap的多租户云中身份管理系统
US10581867B2 (en) 2012-09-07 2020-03-03 Oracle International Corporation Multi-tenancy identity management system
CN104769908A (zh) * 2012-09-07 2015-07-08 甲骨文国际公司 基于ldap的多租户云中身份管理系统
CN103347088A (zh) * 2013-07-16 2013-10-09 诚迈科技(南京)有限公司 一种服务器集群触发方法
CN103347088B (zh) * 2013-07-16 2016-03-23 诚迈科技(南京)有限公司 一种服务器集群触发方法
CN103389715B (zh) * 2013-07-26 2016-03-23 浪潮电子信息产业股份有限公司 一种高性能的分布式数据中心监控架构
CN103389715A (zh) * 2013-07-26 2013-11-13 浪潮电子信息产业股份有限公司 一种高性能的分布式数据中心监控架构
CN103647830B (zh) * 2013-12-13 2017-09-15 浪潮电子信息产业股份有限公司 一种集群管理系统中多层次配置文件的动态管理方法
CN103647830A (zh) * 2013-12-13 2014-03-19 浪潮电子信息产业股份有限公司 一种集群管理系统中多层次配置文件的动态管理方法
CN104618486A (zh) * 2015-02-06 2015-05-13 浪潮电子信息产业股份有限公司 一种统一管理集群存储系统多平台用户的方法
CN109088879A (zh) * 2018-09-07 2018-12-25 郑州云海信息技术有限公司 分布式存储系统外部ldap域服务器认证接口实现方法
CN109088879B (zh) * 2018-09-07 2021-05-11 郑州云海信息技术有限公司 分布式存储系统外部ldap域服务器认证接口实现方法
CN109344159A (zh) * 2018-10-15 2019-02-15 北京天融信网络安全技术有限公司 用于ldap的查找方法、装置、电子设备及存储介质
CN109344159B (zh) * 2018-10-15 2022-03-11 北京天融信网络安全技术有限公司 用于ldap的查找方法、装置、电子设备及存储介质

Similar Documents

Publication Publication Date Title
CN101232515A (zh) 一种基于ldap的分布式的集群管理监控系统
US6343287B1 (en) External data store link for a profile service
US6470332B1 (en) System, method and computer program product for searching for, and retrieving, profile attributes based on other target profile attributes and associated profiles
US6542515B1 (en) Profile service
US6651047B1 (en) Automated referential integrity maintenance
US7165182B2 (en) Multiple password policies in a directory server system
US7441007B1 (en) System and method for allowing applications to retrieve properties and configuration information from a persistent store
US6970873B2 (en) Configurable mechanism and abstract API model for directory operations
US7536411B2 (en) Directory server views
US20030050911A1 (en) Schema-based services for identity-based access to profile data
US20040060002A1 (en) Schema-based service for identity-based access to lists
US20130066935A1 (en) Method and system of mapping at least one web service to at least one osgi service and exposing at least one local service as at least one web service
US20040024875A1 (en) Schema-based services for identity-based access to device data
US20040006564A1 (en) Schema-based service for identity-based data access to category data
JP2004260804A (ja) 多重レジストラ
US20040006590A1 (en) Service for locating centralized schema-based services
US20040078391A1 (en) Extending role scope in a directory server system
US9143559B2 (en) Directory server replication
US7720794B2 (en) Identifying resource and data instances in management systems
Schwartz et al. Experience with a semantically cognizant internet white pages directory tool
AU2003209197A1 (en) Directory server views
US7246122B2 (en) Schema-based services for identity-based data access to favorite website data
Saif et al. Internet access to a home area network
Cisco CiscoWorks Blue Maps and SNA View Database Tables
Cisco Configuring LDAP

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Open date: 20080730