initial commit
This commit is contained in:
65
src/com/ncs/topology/Node.java
Normal file
65
src/com/ncs/topology/Node.java
Normal file
@@ -0,0 +1,65 @@
|
||||
package com.ncs.topology;
|
||||
|
||||
public class Node {
|
||||
|
||||
//编号
|
||||
|
||||
String id;
|
||||
|
||||
//父结点编号
|
||||
|
||||
String fatherId;
|
||||
|
||||
//显示名称
|
||||
|
||||
String name;
|
||||
|
||||
//运行状态(0=正常;1=故障)
|
||||
|
||||
int state;
|
||||
|
||||
//显示图片
|
||||
|
||||
String url;
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getFatherId() {
|
||||
return fatherId;
|
||||
}
|
||||
|
||||
public void setFatherId(String fatherId) {
|
||||
this.fatherId = fatherId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(int state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
}
|
||||
65
src/com/ncs/topology/NodeBak.java
Normal file
65
src/com/ncs/topology/NodeBak.java
Normal file
@@ -0,0 +1,65 @@
|
||||
package com.ncs.topology;
|
||||
|
||||
public class NodeBak {
|
||||
|
||||
//编号
|
||||
|
||||
int id;
|
||||
|
||||
//父结点编号
|
||||
|
||||
int fatherId;
|
||||
|
||||
//显示名称
|
||||
|
||||
String name;
|
||||
|
||||
//运行状态(0=正常;1=故障)
|
||||
|
||||
int state;
|
||||
|
||||
//显示图片
|
||||
|
||||
String url;
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getFatherId() {
|
||||
return fatherId;
|
||||
}
|
||||
|
||||
public void setFatherId(int fatherId) {
|
||||
this.fatherId = fatherId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(int state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
}
|
||||
28
src/com/ncs/topology/NodeTree.java
Normal file
28
src/com/ncs/topology/NodeTree.java
Normal file
@@ -0,0 +1,28 @@
|
||||
package com.ncs.topology;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class NodeTree {
|
||||
|
||||
String name;
|
||||
|
||||
List<Node> nodeList=new ArrayList<Node>();
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public List<Node> getNodeList() {
|
||||
return nodeList;
|
||||
}
|
||||
|
||||
public void setNodeList(List<Node> nodeList) {
|
||||
this.nodeList = nodeList;
|
||||
}
|
||||
|
||||
}
|
||||
236
src/com/nms/objectSnmp/action/SnmpAction.java
Normal file
236
src/com/nms/objectSnmp/action/SnmpAction.java
Normal file
@@ -0,0 +1,236 @@
|
||||
package com.nms.objectSnmp.action;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import nis.nms.domains.CheckTypeInfo;
|
||||
import nis.nms.service.CommonService;
|
||||
import nis.nms.util.BaseAction;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.nms.objectSnmp.impl.GenJavaCodeTool;
|
||||
import com.nms.objectSnmp.util.EntityInfo;
|
||||
import com.nms.objectSnmp.util.FileUtil;
|
||||
import com.nms.objectSnmp.util.FormatUtil;
|
||||
import com.zhtelecom.common.snmp.impl.SNMPAPIImpl;
|
||||
import com.zhtelecom.mib.MibValueSymbol;
|
||||
import com.zhtelecom.mib.snmp.SnmpObjectType;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public class SnmpAction extends BaseAction{
|
||||
private Logger logger = Logger.getLogger(SnmpAction.class);
|
||||
private static final long serialVersionUID = 1L;
|
||||
private CommonService commonService ;
|
||||
private FileUtil fileUtil = new FileUtil();
|
||||
private static SNMPAPIImpl snmpapi;
|
||||
|
||||
public SnmpAction(CommonService common) {
|
||||
snmpapi = new SNMPAPIImpl();
|
||||
this.commonService = common;
|
||||
}
|
||||
|
||||
private SnmpAction() {
|
||||
snmpapi = new SNMPAPIImpl();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param cti
|
||||
* 监测类别
|
||||
* @param listEI
|
||||
* 栏位信息
|
||||
*/
|
||||
public void insertFiled(CheckTypeInfo cti, List<EntityInfo> listEI) throws Exception{
|
||||
SimpleDateFormat sdf = null;
|
||||
String createDate = "";
|
||||
sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
createDate = sdf.format(cti.getCreateTime());
|
||||
List<String> sqls = new ArrayList<String>();
|
||||
StringBuffer infoSQL = new StringBuffer("insert into METADATA "
|
||||
+ "(ID," + "CHECK_TYPE_ID," + "TABLE_NAME," + "TABLE_COMMENTS,"
|
||||
+ "CREATE_DATE," + "CREATE_PERSON," + "STATE," + "CHART_STATE," +"SORT_SIGN,"
|
||||
+ "FILED_COMMENTS," + "FILED_TYPE," + "OID," + "SHOW_NUM)"); // SQL
|
||||
|
||||
try {
|
||||
if (listEI != null && listEI.size() > 0) {
|
||||
for (int i = 0; i < listEI.size(); i++) {
|
||||
StringBuffer values = new StringBuffer();// values
|
||||
EntityInfo ei = listEI.get(i);
|
||||
String sql = "";
|
||||
values.append(" values(SEQ_METADATA.NEXTVAL," + cti.getId()
|
||||
+ " ,'" + cti.getTableName() + "', ");
|
||||
values.append("'" + cti.getTableComments() + "', ");// 表描述
|
||||
values.append("to_date('" + createDate + "','yyyy-MM-dd'),");// 创建时间
|
||||
values.append(cti.getUserId() + ", ");// 创建人
|
||||
values.append("'0', ");// 是否启用
|
||||
values.append("'1', ");// 是否用于统计
|
||||
values.append("1, ");// 是否分类标识:0是;1否,公用统计图中的多线分类标识字段
|
||||
values.append("'" + ei.getFiledName() + "',");//字段描述
|
||||
values.append("'" + ei.getFiledType() + "',");
|
||||
values.append("'" + ei.getOid() + "',");
|
||||
values.append(ei.getShowNum() + ")");
|
||||
sql = infoSQL.toString() + values.toString();
|
||||
sqls.add(sql);
|
||||
}
|
||||
this.commonService.insertBatchBySqls(sqls);
|
||||
logger.debug("插入数据源成功!");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("Failed to insert the data source!",e);
|
||||
throw new Exception("Failed to insert the data source!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//得到栏位
|
||||
public List<EntityInfo> getFiled(String oid)throws Exception{
|
||||
List<EntityInfo> list = null;
|
||||
try {
|
||||
MibValueSymbol mibvaluesymbol = snmpapi.getMibSymbolByOid(oid);
|
||||
if(mibvaluesymbol !=null){
|
||||
list = new ArrayList<EntityInfo>();
|
||||
MibValueSymbol amibvaluesymbols[] = mibvaluesymbol.getChildren();//所有子节点
|
||||
for (int i = 0; i < amibvaluesymbols.length; i++)
|
||||
{
|
||||
MibValueSymbol mibvaluekey = amibvaluesymbols[i];//子节点
|
||||
if (!mibvaluekey.isTable() && !mibvaluekey.isTableRow())
|
||||
{
|
||||
//字段名
|
||||
String filedName = mibvaluekey.getName();
|
||||
//字段oid
|
||||
String childoid=mibvaluekey.getValue().toString();
|
||||
//show_num传输序号
|
||||
//int showNum =Integer.parseInt(childoid.substring(childoid.lastIndexOf(".")+1, childoid.length()));
|
||||
int showNum = i+1;
|
||||
SnmpObjectType snmpobjecttype = (SnmpObjectType)mibvaluekey.getType();
|
||||
//字段类型
|
||||
String filedType = GenJavaCodeTool.getType(snmpobjecttype);
|
||||
EntityInfo ei = new EntityInfo();
|
||||
ei.setFiledName(filedName);
|
||||
ei.setFiledType(FormatUtil.changType(filedType));//转换成数据库类型
|
||||
ei.setOid(childoid);
|
||||
ei.setShowNum(showNum);
|
||||
list.add(ei);
|
||||
//System.out.println("filedname:"+filedName+"------filedtype:"+filedType+"---oid:"+childoid);
|
||||
}
|
||||
}
|
||||
}
|
||||
logger.debug("获取栏位成功!");
|
||||
} catch (Exception e) {
|
||||
logger.error("Failed to get the field!",e);
|
||||
throw new Exception("Failed to get the field!");
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public void loadAllMibs(List<String> mibNames) throws Exception{
|
||||
try {
|
||||
LinkedList<String> loadErrorFiles = new LinkedList<String>();
|
||||
if(mibNames !=null && mibNames.size()>0){
|
||||
for(int i=0;i<mibNames.size();i++){
|
||||
try {
|
||||
//System.out.println(mibNames.get(i));
|
||||
snmpapi.loadMib(mibNames.get(i));
|
||||
} catch (Exception e) {
|
||||
//System.out.println("加载:"+mibNames.get(i)+"出错!");
|
||||
loadErrorFiles.add(mibNames.get(i));
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if(loadErrorFiles.size()>0){
|
||||
//System.out.println("--------------------------------------------");
|
||||
for(int j=0;j<loadErrorFiles.size();j++){
|
||||
try {
|
||||
//System.out.println(loadErrorFiles.get(j));
|
||||
snmpapi.loadMib(loadErrorFiles.get(j));
|
||||
} catch (Exception e) {
|
||||
//System.out.println("加载:"+loadErrorFiles.get(j)+"出错!");
|
||||
logger.error("Load the mib library"+loadErrorFiles.get(j)+"failed!",e);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
throw new Exception();
|
||||
}
|
||||
logger.debug("加载mib成功!");
|
||||
} catch (Exception e) {
|
||||
logger.error("Load MIB failed!", e);
|
||||
throw new Exception("i18n_SnmpAction.insertFiled.loadMibErr_n81i");
|
||||
}
|
||||
}
|
||||
|
||||
public void genJavaCode(String tableName,String oid) throws Exception{
|
||||
GenJavaCodeTool.genJavaCode(snmpapi,tableName, oid);
|
||||
|
||||
}
|
||||
|
||||
public void createClass(String name)throws Exception{
|
||||
fileUtil.createClass(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String executeAction() throws Exception {
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void main(String [] args ) {
|
||||
SnmpAction sa = new SnmpAction();
|
||||
sa.test();
|
||||
}
|
||||
public void test(){
|
||||
//1.load all mib
|
||||
List<String> names =null;
|
||||
List<EntityInfo> allfileds = null;
|
||||
String checkTypeName = "system_test_0329";
|
||||
String oid = "1.3.6.1.2.1.1";
|
||||
try {
|
||||
names = fileUtil.getAllMibFileNames();
|
||||
loadAllMibs(names);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getStackTrace());
|
||||
return;
|
||||
}
|
||||
|
||||
//2.create javaBean and class
|
||||
try {
|
||||
genJavaCode(FormatUtil.formatBeanName(checkTypeName),oid);
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getStackTrace());
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
createClass(FormatUtil.formatBeanName(checkTypeName));
|
||||
} catch (Exception e1) {
|
||||
logger.error(e1.getStackTrace());
|
||||
return;
|
||||
}
|
||||
|
||||
//3.get all filed
|
||||
try {
|
||||
allfileds = getFiled(oid.trim());
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getStackTrace());
|
||||
return;
|
||||
}
|
||||
|
||||
//4.save
|
||||
try {
|
||||
// this.commonService.save(checkTypeInfo);
|
||||
// insertFiled(checkTypeInfo,allfileds);
|
||||
//this.getRequest().setAttribute("MSG", 1);
|
||||
|
||||
// 将更新操作写到操作日志中
|
||||
// this.addDBOperationRpt(commonService,"check_type_info", "INSERT", checkTypeInfo.getId());
|
||||
// outHtmlString("<script type=\"text/javascript\">alert('操作成功');this.location='checkTypeSet.do?action=query&pageNo="+pageNo+"&pageSize="+pageSize+"'</script>");
|
||||
} catch (Exception e) {
|
||||
logger.error(e.getStackTrace());
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
151
src/com/nms/objectSnmp/impl/GenJavaCodeTool.java
Normal file
151
src/com/nms/objectSnmp/impl/GenJavaCodeTool.java
Normal file
@@ -0,0 +1,151 @@
|
||||
package com.nms.objectSnmp.impl;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.PrintStream;
|
||||
|
||||
import nis.nms.util.BaseAction;
|
||||
import nis.nms.util.Constant;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.zhtelecom.common.snmp.impl.SNMPAPIImpl;
|
||||
import com.zhtelecom.mib.MibType;
|
||||
import com.zhtelecom.mib.MibValueSymbol;
|
||||
import com.zhtelecom.mib.snmp.SnmpObjectType;
|
||||
|
||||
|
||||
public class GenJavaCodeTool
|
||||
{
|
||||
public GenJavaCodeTool()
|
||||
{
|
||||
}
|
||||
|
||||
public static String getType(SnmpObjectType snmpobjecttype)
|
||||
{
|
||||
MibType mibtype = snmpobjecttype.getSyntax();
|
||||
if (mibtype.hasTag(0, 2))
|
||||
return "int";
|
||||
if (mibtype.hasTag(1, 1))
|
||||
return "long";
|
||||
if (mibtype.hasTag(1, 2))
|
||||
return "long";
|
||||
if (mibtype.hasTag(0, 4))
|
||||
return "String";
|
||||
if (mibtype.hasTag(0, 6))
|
||||
return "String";
|
||||
if (mibtype.hasTag(1, 0))
|
||||
return "String";
|
||||
if (mibtype.hasTag(1, 3))
|
||||
return "long";
|
||||
if (mibtype.hasTag(1, 4))
|
||||
return "String";
|
||||
if (mibtype.hasTag(1, 6))
|
||||
{
|
||||
return "long";
|
||||
} else
|
||||
{
|
||||
Logger.getLogger(GenJavaCodeTool.class).debug((new StringBuilder("未知的SNMP MIB数据类型: ")).append(mibtype).append(", 将用String类型来映射(仅用于SNMP查询操作)").toString());
|
||||
return "String";
|
||||
}
|
||||
}
|
||||
|
||||
public static void genJavaCode(SNMPAPIImpl snmpapi,String entityName, String oid) throws Exception
|
||||
{
|
||||
Logger.getLogger(GenJavaCodeTool.class).debug("开始执行生成javaBean");
|
||||
String errorMsg="";
|
||||
try
|
||||
{
|
||||
PrintStream out = System.out;
|
||||
System.out.println(Constant.JAVABEAN_PATH);
|
||||
File file = new File(Constant.JAVABEAN_PATH);
|
||||
if(!file.exists()){//如果路径不存在 则创建
|
||||
file.mkdirs();
|
||||
}
|
||||
MibValueSymbol mibvaluesymbol = snmpapi.getMibSymbolByOid(oid);
|
||||
//table 和 Column 禁止创建
|
||||
if(!mibvaluesymbol.isTable() && !mibvaluesymbol.isTableColumn()){
|
||||
PrintStream printstream = new PrintStream(new FileOutputStream((new StringBuilder(String.valueOf(Constant.JAVABEAN_PATH))).append(entityName).append(".java").toString()));
|
||||
System.setOut(printstream);
|
||||
System.out.println((new StringBuilder("package ")).append(Constant.PACKAGE_NAME).append(" ;").toString());
|
||||
System.out.println("//GenJavaCodeTool, auto create OM Object!");
|
||||
System.out.println((new StringBuilder("public class ")).append(entityName.toUpperCase()).append(" extends com.zhtelecom.common.snmp.OMMappingInfo").toString());
|
||||
System.out.println("{");
|
||||
System.out.println(" private static final long serialVersionUID = 1L;");
|
||||
System.out.println();
|
||||
MibValueSymbol amibvaluesymbol[] = mibvaluesymbol.getChildren();
|
||||
for (int i = 0; i < amibvaluesymbol.length; i++)
|
||||
{
|
||||
MibValueSymbol mibvaluesymbol1 = amibvaluesymbol[i];
|
||||
if (!mibvaluesymbol1.isTable() && !mibvaluesymbol1.isTableRow())
|
||||
{
|
||||
String s2 = mibvaluesymbol1.getName();
|
||||
SnmpObjectType snmpobjecttype = (SnmpObjectType)mibvaluesymbol1.getType();
|
||||
String s5 = getType(snmpobjecttype);
|
||||
System.out.println((new StringBuilder(" private ")).append(s5).append(" ").append(s2).append(" ;").toString());
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println(" public String toString()");
|
||||
System.out.println(" {");
|
||||
StringBuffer stringbuffer = new StringBuffer(" return ");
|
||||
for (int j = 0; j < amibvaluesymbol.length; j++)
|
||||
{
|
||||
MibValueSymbol mibvaluesymbol2 = amibvaluesymbol[j];
|
||||
if (!mibvaluesymbol2.isTable() && !mibvaluesymbol2.isTableRow())
|
||||
{
|
||||
String s3 = mibvaluesymbol2.getName();
|
||||
stringbuffer.append((new StringBuilder("\"")).append(s3).append("=\"+").append(s3).append("+\"|\"+").toString());
|
||||
}
|
||||
}
|
||||
|
||||
stringbuffer.deleteCharAt(stringbuffer.length() - 1);
|
||||
stringbuffer.append(" ;");
|
||||
System.out.println(stringbuffer);
|
||||
System.out.println(" }");
|
||||
System.out.println();
|
||||
System.out.println(" public String getMappingOID()");
|
||||
System.out.println(" {");
|
||||
System.out.println((new StringBuilder(" return \"")).append(oid).append("\";").toString());
|
||||
System.out.println(" }");
|
||||
for (int k = 0; k < amibvaluesymbol.length; k++)
|
||||
{
|
||||
MibValueSymbol mibvaluesymbol3 = amibvaluesymbol[k];
|
||||
if (!mibvaluesymbol3.isTable() && !mibvaluesymbol3.isTableRow())
|
||||
{
|
||||
String s4 = mibvaluesymbol3.getName();
|
||||
SnmpObjectType snmpobjecttype1 = (SnmpObjectType)mibvaluesymbol3.getType();
|
||||
String s6 = getType(snmpobjecttype1);
|
||||
String s7 = s4.replaceFirst(s4.substring(0, 1), s4.substring(0, 1).toUpperCase());
|
||||
System.out.println((new StringBuilder(" public ")).append(s6).append(" get").append(s7).append("()").toString());
|
||||
System.out.println(" {");
|
||||
System.out.println((new StringBuilder(" return ")).append(s4).append(" ;").toString());
|
||||
System.out.println(" }");
|
||||
System.out.println((new StringBuilder(" public void set")).append(s7).append("(").append(s6).append(" value)").toString());
|
||||
System.out.println(" {");
|
||||
System.out.println((new StringBuilder(" ")).append(s4).append("=value ;").toString());
|
||||
System.out.println(" }");
|
||||
}
|
||||
}
|
||||
|
||||
System.out.println("}");
|
||||
printstream.close();
|
||||
//System.setOut(null);
|
||||
System.setOut(out);
|
||||
Logger.getLogger(GenJavaCodeTool.class).debug("生成javaBean成功!");
|
||||
}else{
|
||||
errorMsg="i18n_GenJavaCodeTool.genJavaCode.nodeInfoErr_n81i";
|
||||
throw new Exception();
|
||||
}
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
errorMsg = "i18n_GenJavaCodeTool.genJavaCode.cannotFind_n81i";
|
||||
Logger.getLogger(GenJavaCodeTool.class).error("Failed to generate javaBean!The MIB definition of this OID is not found",exception);
|
||||
throw new Exception("i18n_GenJavaCodeTool.genJavaCode.createBeanErr_n81i"+errorMsg);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
42
src/com/nms/objectSnmp/util/EntityInfo.java
Normal file
42
src/com/nms/objectSnmp/util/EntityInfo.java
Normal file
@@ -0,0 +1,42 @@
|
||||
package com.nms.objectSnmp.util;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class EntityInfo implements Serializable{
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public EntityInfo(){}
|
||||
|
||||
private String filedName;
|
||||
private String filedType;
|
||||
private String oid;
|
||||
private int showNum;
|
||||
|
||||
public int getShowNum() {
|
||||
return showNum;
|
||||
}
|
||||
public void setShowNum(int showNum) {
|
||||
this.showNum = showNum;
|
||||
}
|
||||
public String getFiledName() {
|
||||
return filedName;
|
||||
}
|
||||
public void setFiledName(String filedName) {
|
||||
this.filedName = filedName;
|
||||
}
|
||||
public String getFiledType() {
|
||||
return filedType;
|
||||
}
|
||||
public void setFiledType(String filedType) {
|
||||
this.filedType = filedType;
|
||||
}
|
||||
public String getOid() {
|
||||
return oid;
|
||||
}
|
||||
public void setOid(String oid) {
|
||||
this.oid = oid;
|
||||
}
|
||||
}
|
||||
276
src/com/nms/objectSnmp/util/FileUtil.java
Normal file
276
src/com/nms/objectSnmp/util/FileUtil.java
Normal file
@@ -0,0 +1,276 @@
|
||||
package com.nms.objectSnmp.util;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import nis.nms.util.BaseAction;
|
||||
import nis.nms.util.Constant;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
||||
|
||||
public class FileUtil{
|
||||
private static Logger logger = Logger.getLogger(FileUtil.class);
|
||||
public boolean checkFile(String javaFilePath,String javaEntityName){
|
||||
File file = new File(javaFilePath+"/"+javaEntityName+".java");
|
||||
if(file.exists()){
|
||||
return true;//已生成javaBean
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public List<String> getAllMibFileNames() throws Exception{
|
||||
//List<String> fileNames = new List<String>();
|
||||
List<String> fileNames = new ArrayList<String>();
|
||||
String errMsg="";
|
||||
try {
|
||||
//先加载全局Mib再加载私有的
|
||||
Class cla = this.getClass();
|
||||
ClassLoader classLoader = cla.getClassLoader();
|
||||
URL url = classLoader.getResource("/mibs");
|
||||
java.net.URI uri = url.toURI();
|
||||
File files = new File(uri);
|
||||
File[] fs = files.listFiles();
|
||||
if(fs.length>0){
|
||||
for(int i=0;i<fs.length;i++){
|
||||
File fi = new File(fs[i].toString());
|
||||
if(fi.isDirectory()){//如果是文件夹
|
||||
continue;
|
||||
}
|
||||
fileNames.add(fi.getName());
|
||||
}
|
||||
//导入的私有Mib
|
||||
url = classLoader.getResource("/mibs/iana");
|
||||
if(url != null){
|
||||
java.net.URI urisub = url.toURI();
|
||||
File subfiles = new File(urisub);
|
||||
if(subfiles !=null){
|
||||
File[] subfilesArr = subfiles.listFiles();
|
||||
if(subfilesArr.length>0){
|
||||
for(int j=0;j<subfilesArr.length;j++){
|
||||
File fisub = new File(subfilesArr[j].toString());
|
||||
fileNames.add(fisub.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
errMsg="i18n_FileUtil.getAllMibFileNames.noMibFile_n81i";
|
||||
throw new Exception();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("Error to get MIB file name!"+e.getStackTrace());
|
||||
throw new Exception("i18n_FileUtil.getAllMibFileNames.getMibNameErr_n81i"+errMsg);
|
||||
}
|
||||
return fileNames;
|
||||
}
|
||||
|
||||
public void createClass(String javaBeanName) throws Exception{
|
||||
try {
|
||||
if(javaBeanName!=null && !"".equals(javaBeanName)){
|
||||
File file1 = new File(Constant.CLASS_DIR_PATH);
|
||||
if(!file1.exists()){//如果路径不存在 则创建
|
||||
file1.mkdirs();
|
||||
}
|
||||
|
||||
File file = new File(Constant.JAVABEAN_PATH+javaBeanName+".java");
|
||||
if(file.exists()){
|
||||
URL url = this.getClass().getClassLoader().getResource("../lib/snmp/zhtelecombasis.jar");
|
||||
java.net.URI uri = url.toURI();
|
||||
File fileJar =new File(uri);
|
||||
if(fileJar.exists()){
|
||||
String jarpath = fileJar.getPath();
|
||||
jarpath = "\""+jarpath+"\"";
|
||||
StringBuilder sb = new StringBuilder("javac -classpath ");
|
||||
sb.append(jarpath+" ");
|
||||
sb.append("\""+Constant.JAVABEAN_PATH);
|
||||
sb.append(javaBeanName+".java"+"\""+" -d ");
|
||||
sb.append("\""+Constant.CLASS_DIR_PATH+"\"");
|
||||
String cmd = sb.toString();
|
||||
System.out.println(cmd);//路径都用双引括起来---不用管路径中的空格
|
||||
|
||||
String os = System.getProperty("os.name");
|
||||
if (os.startsWith("Windows")) {
|
||||
execWinCmd(cmd);
|
||||
} else if (os.startsWith("Linux")) {
|
||||
execLinuxCmd(cmd);
|
||||
}
|
||||
System.out.println("=================执行成功");
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.error("Create class file error!",e);
|
||||
throw new Exception("i18n_FileUtil.getAllMibFileNames.createClassErr_n81i");
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param src
|
||||
* 源文件
|
||||
* @param dst
|
||||
* 目标文件
|
||||
* @param bufferSize 缓冲大小 16 * 1024
|
||||
*/
|
||||
public void copy(File src, File dst, int bufferSize) throws Exception{
|
||||
try {
|
||||
long start = System.currentTimeMillis();
|
||||
InputStream in = null;
|
||||
OutputStream out = null;
|
||||
try {
|
||||
in = new BufferedInputStream(new FileInputStream(src), bufferSize);
|
||||
out = new BufferedOutputStream(new FileOutputStream(dst), bufferSize);
|
||||
byte[] buffer = new byte[bufferSize];
|
||||
|
||||
|
||||
int length = -1;
|
||||
while((length = in.read(buffer)) != -1)
|
||||
{
|
||||
out.write(buffer, 0, length);
|
||||
}
|
||||
out.flush();
|
||||
System.out.println("上传文件耗时:"+(System.currentTimeMillis()-start)+"毫秒!");
|
||||
} finally {
|
||||
if (null != in) {
|
||||
in.close();
|
||||
}
|
||||
if (null != out) {
|
||||
out.close();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("上传文件时出错!!!"+e.getStackTrace());
|
||||
throw new Exception("上传文件时出错!!!");
|
||||
}
|
||||
}
|
||||
|
||||
public static String execLinuxCmd(String cmd) throws Exception{
|
||||
BufferedReader bReader = null;
|
||||
BufferedReader errorReader = null;
|
||||
Process process = null;
|
||||
try {
|
||||
logger.info("execLinuxCmd start-------" + cmd);
|
||||
String[] shellCmd = new String[] { "/bin/bash", "-c", cmd };
|
||||
process = Runtime.getRuntime().exec(shellCmd);
|
||||
process.getOutputStream().close();
|
||||
|
||||
bReader = new BufferedReader(new InputStreamReader(process
|
||||
.getInputStream()));
|
||||
errorReader = new BufferedReader(new InputStreamReader(process
|
||||
.getErrorStream()));
|
||||
String line = null;
|
||||
while ((line = bReader.readLine()) != null) {
|
||||
logger.debug("execLinuxCmd line--->" + line);
|
||||
}
|
||||
StringBuffer errorSb = new StringBuffer();
|
||||
while ((line = errorReader.readLine()) != null) {
|
||||
logger.debug("execLinuxCmd error line--->" + line);
|
||||
errorSb.append(line + ",");
|
||||
}
|
||||
|
||||
if (errorSb.toString().length() > 0) {
|
||||
return errorSb.toString().substring(0, errorSb.toString().length()-1);
|
||||
}
|
||||
|
||||
logger.info("execLinuxCmd end-------" + cmd);
|
||||
} catch (Exception e) {
|
||||
throw e;
|
||||
} finally {
|
||||
try {
|
||||
if (bReader != null) {
|
||||
bReader.close();
|
||||
}
|
||||
if (errorReader != null) {
|
||||
errorReader.close();
|
||||
}
|
||||
if (process != null) {
|
||||
process.destroy();
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String execWinCmd(String cmd) throws Exception {
|
||||
BufferedReader bReader = null;
|
||||
BufferedReader errorReader = null;
|
||||
Process process = null;
|
||||
try {
|
||||
logger.info("execWinCmd start-------" + cmd);
|
||||
String[] cmdArr = new String[] { "cmd.exe", "/C", cmd };
|
||||
process = Runtime.getRuntime().exec(cmdArr);
|
||||
if (cmd.endsWith(".exe")) {
|
||||
synchronized (process) {
|
||||
process.wait(1000 * 5);
|
||||
}
|
||||
} else {
|
||||
process.getOutputStream().close();
|
||||
bReader = new BufferedReader(new InputStreamReader(process
|
||||
.getInputStream()));
|
||||
errorReader = new BufferedReader(new InputStreamReader(process
|
||||
.getErrorStream()));
|
||||
String line = null;
|
||||
while ((line = bReader.readLine()) != null) {
|
||||
logger.debug("execWinCmd line--->" + line);
|
||||
}
|
||||
StringBuffer errorSb = new StringBuffer();
|
||||
while ((line = errorReader.readLine()) != null) {
|
||||
logger.debug("execWinCmd error--->" + line);
|
||||
errorSb.append(line + ",");
|
||||
}
|
||||
if (errorSb.toString().length() > 0) {
|
||||
return errorSb.toString().substring(0,
|
||||
errorSb.toString().length() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
logger.info("execWinCmd end-------" + cmd);
|
||||
|
||||
} catch (Exception e) {
|
||||
throw e;
|
||||
} finally {
|
||||
try {
|
||||
if (bReader != null) {
|
||||
bReader.close();
|
||||
}
|
||||
if (errorReader != null) {
|
||||
errorReader.close();
|
||||
}
|
||||
if (process != null) {
|
||||
process.destroy();
|
||||
}
|
||||
} catch (Exception e1) {
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
/**
|
||||
* 删除文件
|
||||
*/
|
||||
public static void delDir(File file) throws IOException {
|
||||
if (file.exists() ) {
|
||||
if (!file.isDirectory()) {
|
||||
file.delete();
|
||||
logger.debug("FileUtil.delDir(File file)删除文件--" + file.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
25
src/com/nms/objectSnmp/util/FormatUtil.java
Normal file
25
src/com/nms/objectSnmp/util/FormatUtil.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package com.nms.objectSnmp.util;
|
||||
|
||||
public class FormatUtil {
|
||||
public static String changType(String type){
|
||||
String resu="";
|
||||
if(type.equals("int") || type.equals("long")){
|
||||
resu="NUMBER";
|
||||
}else if(type.equals("String")){
|
||||
resu="VARCHAR2(400)";
|
||||
}
|
||||
return resu;
|
||||
}
|
||||
|
||||
public static String formatBeanName(String oldName){
|
||||
String resu="";
|
||||
if(oldName!=null && !"".equals(oldName)){
|
||||
if(oldName.startsWith("DI_")){
|
||||
resu = oldName.substring(3,oldName.length());
|
||||
}else{
|
||||
resu=oldName;
|
||||
}
|
||||
}
|
||||
return resu;
|
||||
}
|
||||
}
|
||||
135
src/com/nms/servlet/auto/run/AutoGetTroubleCode.java
Normal file
135
src/com/nms/servlet/auto/run/AutoGetTroubleCode.java
Normal file
@@ -0,0 +1,135 @@
|
||||
package com.nms.servlet.auto.run;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.ServletContextEvent;
|
||||
import javax.servlet.ServletContextListener;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
|
||||
import nis.nms.datasql.AntExecSql;
|
||||
import nis.nms.datasql.KeyXMLTool;
|
||||
import nis.nms.util.ConnectionOracle;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* NMSWeb启动时
|
||||
*
|
||||
* @date Mar 15, 2012 9:31:54 AM
|
||||
* @author ZhangGang
|
||||
*
|
||||
*/
|
||||
public class AutoGetTroubleCode extends HttpServlet implements ServletContextListener{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 0L;
|
||||
private Logger logger = Logger.getLogger(AutoGetTroubleCode.class);
|
||||
public Map<Long,Map<Long, String>> maps;
|
||||
|
||||
|
||||
@Override
|
||||
public void contextDestroyed(ServletContextEvent arg0) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void contextInitialized(ServletContextEvent arg0) {
|
||||
ConnectionOracle conn = null;
|
||||
try {
|
||||
conn = ConnectionOracle.getConnection();
|
||||
String sql = "select t.trouble_code,t.trouble_descr,t.system_id from trouble_state t";
|
||||
maps = conn.dbSelect(sql);
|
||||
arg0.getServletContext().setAttribute("troubles", maps);
|
||||
} catch (Exception e) {
|
||||
logger.error("", e);
|
||||
}finally{
|
||||
try {
|
||||
if(conn != null){
|
||||
conn.close();
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
}
|
||||
}
|
||||
/**/
|
||||
/*try{
|
||||
AntExecSql antExecSql = new AntExecSql();
|
||||
antExecSql.updgradeData();
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
// TODO: handle exception
|
||||
}*/
|
||||
}
|
||||
|
||||
public Map<Long, Map<Long, String>> getMaps() {
|
||||
return maps;
|
||||
}
|
||||
|
||||
public void setMaps(Map<Long, Map<Long, String>> maps) {
|
||||
this.maps = maps;
|
||||
}
|
||||
|
||||
//// public Long checkOrRegisterNMSWeb(){
|
||||
//// //获取Port
|
||||
//// List<Integer> portList = getLocalPort();
|
||||
//// Integer port = portList!=null?portList.size()>0?portList.get(0):null:null;
|
||||
////
|
||||
// //获取访问IP
|
||||
//// List<String> hostList = getLocalHost();
|
||||
//// StringBuffer hostStr = new StringBuffer("'0'");
|
||||
//// if(hostList!=null && hostList.size()>0){
|
||||
//// for(String host : hostList){
|
||||
//// hostStr.append(",'"+host+"'");
|
||||
//// }
|
||||
//// }else{
|
||||
//// return null;
|
||||
//// }
|
||||
//// String localIp = getRealIp();
|
||||
// //校验已存在或注册
|
||||
// ConnectionOracle conn = null;
|
||||
// try {
|
||||
// String uuid = null;
|
||||
// conn = ConnectionOracle.getConnection();
|
||||
// ArrayList<String> fields = new ArrayList<String>();
|
||||
// fields.add("system_id");
|
||||
// String sql = "select st.system_id from system_table st where st.system_ip in ('"+localIp+"') and st.system_port='"+port+"'";
|
||||
//// String sql = "select st.system_id from system_table st where st.system_ip in ("+hostStr+") and st.system_port='"+port+"'";
|
||||
// ArrayList<Map<String, String>> mapsList = conn.dbSelect(sql,fields);
|
||||
//
|
||||
// if(mapsList!=null && mapsList.size()>0){ //已存在
|
||||
// uuid = mapsList.get(0).get("system_id");
|
||||
// conn.dbUpdate("update system_table set SYSTEM_START_STATE='0' where system_id='"+uuid+"'");
|
||||
// }else{ //注册
|
||||
// fields.clear();
|
||||
// fields.add("id");
|
||||
// ArrayList<Map<String, String>> idMaps = conn.dbSelect("select seq_system_table.nextVal id from dual",fields);
|
||||
// uuid = idMaps.get(0).get("id");
|
||||
//
|
||||
// String date = new SimpleDateFormat("yyyy-MM-dd HH:dd:ss").format(new Date());
|
||||
//// String insSql = "insert into system_table (system_id,system_name,system_desc,system_createtime,system_state,system_ip,system_ipn,system_port,SYSTEM_START_STATE,is_master)" +
|
||||
//// " values('"+uuid+"','新Web','新Web',to_date('"+date+"','yyyy-mm-dd hh24:mi:ss'),'0','"+hostList.get(0)+"','"+IpCovert.ipToLong(hostList.get(0))+"','"+port+"','0','2')";
|
||||
// String insSql = "insert into system_table (system_id,system_name,system_desc,system_createtime,system_state,system_ip,system_ipn,system_port,SYSTEM_START_STATE,is_master)" +
|
||||
// " values('"+uuid+"','新Web','新Web',to_date('"+date+"','yyyy-mm-dd hh24:mi:ss'),'0','"+localIp+"','"+IpCovert.ipToLong(localIp)+"','"+port+"','0','2')";
|
||||
// conn.dbUpdate(insSql);
|
||||
// }
|
||||
// return uuid==null?null:Long.parseLong(uuid);
|
||||
// }catch (Exception e) {
|
||||
// logger.error("", e);
|
||||
// }finally{
|
||||
// conn.close();
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
|
||||
|
||||
// public static void main(String [] args){
|
||||
// URL u = Class.class.getClass().getResource("/");
|
||||
// try {
|
||||
// System.out.println("---"+(u==null?null:u.toURI().toString()));
|
||||
// } catch (URISyntaxException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
290
src/com/nms/servlet/auto/run/AutoRegisterForNMSWeb.java
Normal file
290
src/com/nms/servlet/auto/run/AutoRegisterForNMSWeb.java
Normal file
@@ -0,0 +1,290 @@
|
||||
package com.nms.servlet.auto.run;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.servlet.ServletContextEvent;
|
||||
import javax.servlet.ServletContextListener;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
|
||||
import nis.nms.util.BaseAction;
|
||||
import nis.nms.util.ConnectionOracle;
|
||||
import nis.nms.util.IpCovert;
|
||||
import nis.nms.util.LocalAddress;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.dom4j.Document;
|
||||
import org.dom4j.DocumentException;
|
||||
import org.dom4j.Element;
|
||||
import org.dom4j.io.SAXReader;
|
||||
|
||||
/**
|
||||
* NMSWeb启动时
|
||||
* @date Mar 15, 2012 9:31:54 AM
|
||||
* @author ZhangGang
|
||||
*
|
||||
*/
|
||||
public class AutoRegisterForNMSWeb extends HttpServlet implements ServletContextListener{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 0L;
|
||||
private Logger logger = Logger.getLogger(AutoRegisterForNMSWeb.class);
|
||||
private Long uuid = null;
|
||||
|
||||
@Override
|
||||
public void contextDestroyed(ServletContextEvent arg0) {
|
||||
ConnectionOracle conn = null;
|
||||
try {
|
||||
//关闭服务
|
||||
conn = ConnectionOracle.getConnection();
|
||||
conn.dbUpdate("update system_table set system_start_state = '1' where system_id='"+uuid+"'");
|
||||
} catch (Exception e) {
|
||||
logger.error("", e);
|
||||
}finally{
|
||||
try {
|
||||
if(conn != null){
|
||||
conn.close();
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
}
|
||||
}
|
||||
System.out.println("Web服务状态为 已关闭");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void contextInitialized(ServletContextEvent arg0) {
|
||||
try {
|
||||
//获取web唯一标识
|
||||
String sourcePath = this.getClass().getClassLoader().getResource("").getPath();
|
||||
String uuidPath = URLDecoder.decode(sourcePath,"utf-8")+"uuid.properties";
|
||||
System.out.println(""+uuidPath);
|
||||
File uuidFile = new File(uuidPath);
|
||||
if(!uuidFile.exists()){
|
||||
if(!uuidFile.getParentFile().exists()){
|
||||
uuidFile.getParentFile().mkdirs();
|
||||
}
|
||||
uuidFile.createNewFile();
|
||||
}
|
||||
FileInputStream fis = new FileInputStream(uuidFile);
|
||||
Properties properties = new Properties();
|
||||
properties.load(fis);
|
||||
String uuidStr = properties.getProperty("uuid");
|
||||
uuid = StringUtils.isEmpty(uuidStr)?null:Long.parseLong(StringUtils.trim(uuidStr));
|
||||
|
||||
if(uuid==null){ //物理标识不存在 通过IP端口匹配进行校验
|
||||
uuid = checkOrRegisterNMSWeb();
|
||||
properties.setProperty("uuid", uuid==null?"":uuid+"");
|
||||
FileOutputStream fos = new FileOutputStream(uuidFile);
|
||||
properties.store(fos, uuidFile.getName());
|
||||
fos.close();
|
||||
}else{ //UUID 查询校验
|
||||
boolean flag = checkOrUpdateNMSWeb(uuid);
|
||||
if(!flag){
|
||||
logger.warn("Web startup information monitoring anomaly!");
|
||||
}
|
||||
}
|
||||
|
||||
fis.close();
|
||||
} catch (Exception e) {
|
||||
logger.error("", e);
|
||||
}finally{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public Long checkOrRegisterNMSWeb(){
|
||||
//获取Port
|
||||
List<Integer> portList = getLocalPort();
|
||||
Integer port = portList!=null?portList.size()>0?portList.get(0):null:null;
|
||||
|
||||
//获取访问IP
|
||||
// List<String> hostList = getLocalHost();
|
||||
// StringBuffer hostStr = new StringBuffer("'0'");
|
||||
// if(hostList!=null && hostList.size()>0){
|
||||
// for(String host : hostList){
|
||||
// hostStr.append(",'"+host+"'");
|
||||
// }
|
||||
// }else{
|
||||
// return null;
|
||||
// }
|
||||
//校验已存在或注册
|
||||
ConnectionOracle conn = null;
|
||||
try {
|
||||
//String localIp = LocalAddress.getRealIp();
|
||||
String localIp = LocalAddress.getLocalIp();
|
||||
String uuid = null;
|
||||
conn = ConnectionOracle.getConnection();
|
||||
ArrayList<String> fields = new ArrayList<String>();
|
||||
fields.add("system_id");
|
||||
String sql = "select st.system_id from system_table st where st.system_ip in ('"+localIp+"') and st.system_port='"+port+"'";
|
||||
// String sql = "select st.system_id from system_table st where st.system_ip in ("+hostStr+") and st.system_port='"+port+"'";
|
||||
ArrayList<Map<String, String>> mapsList = conn.dbSelect(sql,fields);
|
||||
|
||||
if(mapsList!=null && mapsList.size()>0){ //已存在
|
||||
uuid = mapsList.get(0).get("system_id");
|
||||
conn.dbUpdate("update system_table set SYSTEM_START_STATE='0' where system_id='"+uuid+"'");
|
||||
}else{ //注册
|
||||
fields.clear();
|
||||
fields.add("id");
|
||||
ArrayList<Map<String, String>> idMaps = conn.dbSelect("select seq_system_table.nextVal id from dual",fields);
|
||||
uuid = idMaps.get(0).get("id");
|
||||
|
||||
String date = new SimpleDateFormat("yyyy-MM-dd HH:dd:ss").format(new Date());
|
||||
//如果库里(SYSTEM_TABLE表)已经有主控系统了,则新注册的系统则为子系统,否则,注册的为主控系统
|
||||
String searchMasterSystemSql = "select st.system_id from system_table st where st.is_master=1";
|
||||
fields.clear();
|
||||
fields.add("system_id");
|
||||
ArrayList<Map<String, String>> systemsList = conn.dbSelect(searchMasterSystemSql,fields);
|
||||
String insSql = "";
|
||||
if(systemsList!=null && systemsList.size()>0) {
|
||||
// String insSql = "insert into system_table (system_id,system_name,system_desc,system_createtime,system_state,system_ip,system_ipn,system_port,SYSTEM_START_STATE,is_master)" +
|
||||
// " values('"+uuid+"','新Web','新Web',to_date('"+date+"','yyyy-mm-dd hh24:mi:ss'),'0','"+hostList.get(0)+"','"+IpCovert.ipToLong(hostList.get(0))+"','"+port+"','0','2')";
|
||||
insSql = "insert into system_table (system_id,system_name,system_desc,system_createtime,system_state,system_ip,system_ipn,system_port,SYSTEM_START_STATE,is_master)" +
|
||||
" values('"+uuid+"','"+"New Web"+"','"+"New Web"+"',to_date('"+date+"','yyyy-mm-dd hh24:mi:ss'),'0','"+localIp+"','"+IpCovert.ipToLong(localIp)+"','"+port+"','0','2')";
|
||||
}else {
|
||||
insSql = "insert into system_table (system_id,system_name,system_desc,system_createtime,system_state,system_ip,system_ipn,system_port,SYSTEM_START_STATE,is_master)" +
|
||||
" values('"+uuid+"','"+"New Web"+"','"+"New Web"+"',to_date('"+date+"','yyyy-mm-dd hh24:mi:ss'),'0','"+localIp+"','"+IpCovert.ipToLong(localIp)+"','"+port+"','0','1')";
|
||||
}
|
||||
conn.dbUpdate(insSql);
|
||||
}
|
||||
return uuid==null?null:Long.parseLong(uuid);
|
||||
}catch (Exception e) {
|
||||
logger.error("", e);
|
||||
}finally{
|
||||
try {
|
||||
if(conn != null){
|
||||
conn.close();
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean checkOrUpdateNMSWeb(Long uuid){
|
||||
//获取Port
|
||||
List<Integer> portList = getLocalPort();
|
||||
Integer port = portList!=null?portList.get(0):null;
|
||||
|
||||
//获取可访问IP
|
||||
// List<String> hostList = getLocalHost();
|
||||
// StringBuffer hostStr = new StringBuffer("'0'");
|
||||
// if(hostList!=null && hostList.size()>0){
|
||||
// for(String host : hostList){
|
||||
// hostStr.append(",'"+host+"'");
|
||||
// }
|
||||
// }
|
||||
//校验已存在 或更新信息
|
||||
ConnectionOracle conn = null;
|
||||
try {
|
||||
//String localIp = LocalAddress.getRealIp();
|
||||
String localIp = LocalAddress.getLocalIp();
|
||||
conn = ConnectionOracle.getConnection();
|
||||
ArrayList<String> fields = new ArrayList<String>();
|
||||
fields.add("system_id");
|
||||
// String sql = "select system_id from system_table st where st.system_ip in ("+hostStr+") and st.system_port='"+port+"' and st.system_id='"+uuid+"'";
|
||||
String sql = "select system_id from system_table st where st.system_ip in ('"+localIp+"') and st.system_port='"+port+"' and st.system_id='"+uuid+"'";
|
||||
logger.warn(sql);
|
||||
ArrayList<Map<String, String>> mapsList = conn.dbSelect(sql,fields);
|
||||
//信息不存在时校验 更新IP信息
|
||||
String updateIP = "";
|
||||
if(mapsList==null || mapsList.size()==0){
|
||||
// updateIP = ",system_ip='"+hostList.get(0)+"',system_port='"+port+"'";
|
||||
updateIP = ",system_ip='"+localIp+"',system_port='"+port+"'";
|
||||
}
|
||||
conn.dbUpdate("update system_table set SYSTEM_START_STATE='0' "+updateIP+" where system_id='"+uuid+"'");
|
||||
return true;
|
||||
}catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
try {
|
||||
if(conn != null){
|
||||
conn.close();
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// public List<String> getLocalHost(){
|
||||
// List<String> hostList = new ArrayList<String>();
|
||||
// try {
|
||||
// Enumeration<NetworkInterface> addresses = NetworkInterface.getNetworkInterfaces();
|
||||
// while(addresses.hasMoreElements()){
|
||||
// NetworkInterface address = addresses.nextElement();
|
||||
// Enumeration<InetAddress> enumeration = address.getInetAddresses();
|
||||
// while(enumeration.hasMoreElements()){
|
||||
// InetAddress address2 =enumeration.nextElement();
|
||||
// if("localhost,127.0.0.1".indexOf(address2.getHostName())<0){
|
||||
// System.out.println(address2.getHostName());
|
||||
// hostList.add(address2.getHostName());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// } catch (SocketException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// return hostList;
|
||||
// }
|
||||
|
||||
public List<Integer> getLocalPort(){
|
||||
String sourcePath = this.getClass().getClassLoader().getResource("/../../").getPath();
|
||||
System.out.println("--"+sourcePath);
|
||||
// String serverXMLPath = new File(System.getProperty("user.dir")).getParent()+File.separator+"conf"+File.separator+"server.xml";
|
||||
String serverXMLPath = new File(sourcePath).getParentFile().getParent()+File.separator+"conf"+File.separator+"server.xml";
|
||||
try {
|
||||
serverXMLPath = URLDecoder.decode(serverXMLPath,"utf-8");
|
||||
} catch (UnsupportedEncodingException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
System.out.println("--"+serverXMLPath);
|
||||
List<Integer> portList = new ArrayList<Integer>();
|
||||
|
||||
try {
|
||||
SAXReader reader = new SAXReader();
|
||||
Document document = reader.read(new File(serverXMLPath));
|
||||
Element root = document.getRootElement();
|
||||
Iterator<Element> serviceIte = root.elementIterator("Service");
|
||||
if(serviceIte!=null && serviceIte.hasNext()){
|
||||
Element service = serviceIte.next();
|
||||
// System.out.println("service name "+service.elements());
|
||||
Iterator<Element> connectorIte = service.elementIterator("Connector");
|
||||
while(connectorIte.hasNext()){
|
||||
Element connector = connectorIte.next();
|
||||
String protocol = connector.attributeValue("protocol");
|
||||
// System.out.println("protocol "+protocol);
|
||||
//String protocolTitle = protocol==null?null:protocol.length()>4?protocol.substring(0,4):protocol;
|
||||
//String protocolTitle = protocol==null?null:protocol.length()>4?protocol.substring(0,4):protocol;
|
||||
String protocolTitle = protocol==null?null:protocol.toUpperCase().indexOf("HTTP".toUpperCase())>-1?protocol.substring(0,4):protocol;
|
||||
// System.out.println((protocolTitle+" "+"HTTP".equalsIgnoreCase(protocolTitle)));
|
||||
//if("HTTP".equalsIgnoreCase(protocolTitle)){
|
||||
if(protocol!=null && protocol.toUpperCase().indexOf("HTTP".toUpperCase())>-1){
|
||||
String protStr = connector.attributeValue("port");
|
||||
System.out.println("port "+protStr);
|
||||
portList.add(Integer.parseInt(protStr));
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (DocumentException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return portList;
|
||||
}
|
||||
/*
|
||||
public static void main(String [] args){
|
||||
}*/
|
||||
}
|
||||
130
src/com/nms/servlet/auto/run/AutoRunForSocketServerServlet.java
Normal file
130
src/com/nms/servlet/auto/run/AutoRunForSocketServerServlet.java
Normal file
@@ -0,0 +1,130 @@
|
||||
package com.nms.servlet.auto.run;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.Socket;
|
||||
|
||||
import javax.net.ssl.SSLServerSocket;
|
||||
import javax.servlet.ServletContextEvent;
|
||||
import javax.servlet.ServletContextListener;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
|
||||
import nis.nms.util.BaseAction;
|
||||
import nis.nms.util.Constant;
|
||||
import nis.nms.util.DateUtil;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nms.thread.NmsPortThread;
|
||||
import com.nms.thread.NmsRuleThread;
|
||||
import com.nms.thread.NmsStatusThread;
|
||||
import com.nms.thread.common.ThreadPoolCommon;
|
||||
import com.nms.thread.socket.SSLServer;
|
||||
import com.nms.thread.utils.ssl.SocketUtils;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.Date;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* NMSWeb启动时
|
||||
* 启动指定监听端口,用于SSL通讯服务
|
||||
* @date Mar 15, 2012 9:31:54 AM
|
||||
* @author ZhangGang
|
||||
*
|
||||
*/
|
||||
public class AutoRunForSocketServerServlet extends HttpServlet implements ServletContextListener{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -5912472395977662214L;
|
||||
private Logger logger = Logger.getLogger(AutoRunForSocketServerServlet.class);
|
||||
private SSLServerSocket sslServer ;
|
||||
|
||||
@Override
|
||||
public void contextDestroyed(ServletContextEvent arg0) {
|
||||
try {
|
||||
//关闭通讯服务
|
||||
if(sslServer != null ){sslServer.close();sslServer = null;}
|
||||
|
||||
//关闭线程池
|
||||
if(!ThreadPoolCommon.service.isShutdown()){
|
||||
ThreadPoolCommon.service.shutdown();
|
||||
}
|
||||
|
||||
//关闭定时线程池
|
||||
if(!ThreadPoolCommon.scheduled.isShutdown()){
|
||||
ThreadPoolCommon.scheduled.shutdown();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
||||
System.out.println(BaseAction.rb.getString("common.ssl.socket.port")+"端口>>SSL通讯监听 已关闭");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void contextInitialized(ServletContextEvent arg0) {
|
||||
//-- 初始化参数
|
||||
String uploadPath = new String(BaseAction.rb.getString("uploadServerPath"));
|
||||
if(!uploadPath.endsWith("\\") && !uploadPath.endsWith("/")){
|
||||
uploadPath +=File.separator;
|
||||
}
|
||||
|
||||
String snmpDir = new String(BaseAction.rb.getString("snmpDir"));
|
||||
System.out.println("uploadPath "+uploadPath);
|
||||
System.out.println("snmpDir "+snmpDir);
|
||||
if(!snmpDir.endsWith("\\") && !snmpDir.endsWith("/")){
|
||||
snmpDir +=File.separator;
|
||||
}
|
||||
|
||||
final Integer port = Integer.parseInt(BaseAction.rb.getString("common.ssl.socket.port"));
|
||||
final String upPath = uploadPath;
|
||||
final String snmpPath = snmpDir;
|
||||
//-- 创建线程池
|
||||
ThreadPoolCommon.service.submit(new Runnable(){
|
||||
|
||||
public void run() {
|
||||
Thread.currentThread().setName("SSL Communication");
|
||||
try {
|
||||
sslServer = (SSLServerSocket) SocketUtils.getSSLContext().getServerSocketFactory().createServerSocket(port);
|
||||
sslServer.setNeedClientAuth(true); //客户端是否需要认证
|
||||
logger.info("启动 OK");
|
||||
while(true){
|
||||
Socket socket= sslServer.accept();
|
||||
ThreadPoolCommon.service.submit(new SSLServer(socket,upPath,snmpPath));
|
||||
}
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
try {
|
||||
if(sslServer != null ){sslServer.close();sslServer = null;}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}});
|
||||
System.out.println(port+">>SSL通讯监听 已启动");
|
||||
|
||||
|
||||
//nms上报
|
||||
String intervalStr = BaseAction.rb.getString("nms.report.interval");
|
||||
//nms上报间隔
|
||||
long interval = StringUtil.isBlank(intervalStr) ? 300000 : Long.parseLong(intervalStr)*1000;
|
||||
//nms初次上报延时
|
||||
long now = new Date().getTime();
|
||||
long initInterval = 0l;
|
||||
if(now%interval > 0) {
|
||||
initInterval = interval-(now%interval);
|
||||
}
|
||||
|
||||
ThreadPoolCommon.scheduled.scheduleAtFixedRate(new NmsStatusThread(), initInterval, interval, TimeUnit.MILLISECONDS);
|
||||
ThreadPoolCommon.scheduled.scheduleAtFixedRate(new NmsRuleThread(), initInterval, interval, TimeUnit.MILLISECONDS);
|
||||
ThreadPoolCommon.scheduled.scheduleAtFixedRate(new NmsPortThread(), initInterval, interval, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
}
|
||||
44
src/com/nms/thread/DCHandShakeManagerThread.java
Normal file
44
src/com/nms/thread/DCHandShakeManagerThread.java
Normal file
@@ -0,0 +1,44 @@
|
||||
package com.nms.thread;
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.nms.thread.common.ThreadPoolCommon;
|
||||
import com.nms.thread.pool.ThreadPoolConfig;
|
||||
|
||||
/**
|
||||
* DC心跳线程启动控制器
|
||||
* @date Jan 21, 2013 4:28:00 PM
|
||||
* @author ZhangGang
|
||||
*
|
||||
*/
|
||||
public class DCHandShakeManagerThread implements Runnable{
|
||||
|
||||
private Logger logger = Logger.getLogger(DCHandShakeManagerThread.class);
|
||||
private DCHandShakeThread handShakeThread = new DCHandShakeThread();
|
||||
public void run() {
|
||||
// Thread.currentThread().setName("DC心跳监测管理线程");
|
||||
Thread.currentThread().setName("DC Heartbeat Monitoring Management Thread");
|
||||
|
||||
//将线程运行程序,尽可能的catch捕获异常
|
||||
try {
|
||||
//- 检查线程运行状态 运行中无操作
|
||||
Future<?> future = ThreadPoolCommon.threadManagerMap.get(ThreadPoolConfig.DC_HANDSHAKE);
|
||||
if(future != null && !future.isCancelled() && !future.isDone()){ //运行中
|
||||
logger.debug("DC心跳监测线程 运行中 不再启动");
|
||||
return ;
|
||||
}else{
|
||||
future = ThreadPoolCommon.service.submit(handShakeThread);
|
||||
ThreadPoolCommon.threadManagerMap.put(ThreadPoolConfig.DC_HANDSHAKE, future);
|
||||
logger.debug("DC心跳监测线程 空闲中 再次启动");
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("",e);
|
||||
}finally{
|
||||
logger.info("执行结束");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
506
src/com/nms/thread/DCHandShakeThread.java
Normal file
506
src/com/nms/thread/DCHandShakeThread.java
Normal file
@@ -0,0 +1,506 @@
|
||||
package com.nms.thread;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.Semaphore;
|
||||
|
||||
import nis.nms.domains.NmsErrorInfo;
|
||||
import nis.nms.domains.ServerTable;
|
||||
import nis.nms.util.ConnectionOracle;
|
||||
import nis.nms.util.Constant;
|
||||
import nis.nms.util.IpCovert;
|
||||
import nis.nms.util.LocalAddress;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.nms.thread.common.ThreadPoolCommon;
|
||||
import com.nms.thread.pool.ThreadConstants;
|
||||
import com.nms.thread.socket.SSLClient;
|
||||
|
||||
/**
|
||||
* DC握手状态及管理节点数据集合解析
|
||||
* Map<dcip,Integer[]{state,nodeNum}>
|
||||
* dcip DC通讯IP
|
||||
* state DC状态值1 通讯正常、0通讯失败、-1Ping失败
|
||||
* NodeNum 管理节点数量 0表示未分配节点,其他表示已分配节点
|
||||
*
|
||||
* 业务操作:
|
||||
* Web启动时查询数据库 对数据库信息进行统计(未完成)
|
||||
* 对DC进行定期通讯握手测试,最多socket尝试三次,ping一次(已完成)
|
||||
* 情景处理:(已完成)
|
||||
* DC通讯成功【1】 比较集合中state值比较并变更 [1:变更为1不作操作][0:变更为1做系统告警恢复(通讯正常)][-1:变更为1做系统告警恢复(通讯正常)]
|
||||
* DC通讯失败ping成功【0】 比较集合中state值并变更 [1:变更为0做系统告警异常(通讯失败)][0:不做操作][-1:变更为0做系统告警异常(Ping恢复,通讯失败)]
|
||||
* DC通讯失败ping失败【-1】 比较集合中state值并变更 [1:变更为-1做系统告警异常(Ping失败)][0:变更为-1做系统告警异常(Ping失败)][-1:不做操作]
|
||||
* 告警信息及告警恢复入库
|
||||
*
|
||||
* @date Apr 17, 2013 10:32:39 AM
|
||||
* @author ZhangGang
|
||||
*
|
||||
*/
|
||||
public class DCHandShakeThread implements Callable<Object>{
|
||||
private Logger logger = Logger.getLogger(DCHandShakeThread.class);
|
||||
private Map<String,Long> DCIPIDMap = new HashMap<String,Long>();
|
||||
private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
private List<NmsErrorInfo> errorInfoList = new LinkedList<NmsErrorInfo>();
|
||||
|
||||
|
||||
@Override
|
||||
public Object call() throws Exception {
|
||||
Thread.currentThread().setName("DCHandShakeThread");
|
||||
logger.debug("开始执行");
|
||||
ConnectionOracle conn = null;
|
||||
try {
|
||||
conn = ConnectionOracle.getConnection();
|
||||
|
||||
/* 获取所有符合握手操作业务的DC
|
||||
* 业务: 1、查询所有DC
|
||||
* 2、对失效DC查询异常校验是否需要再次握手
|
||||
* */
|
||||
List<ServerTable> dclist = getHandShakeDCList(conn);
|
||||
|
||||
/* 循环DC并握手通讯 尝试次数3 间隔20秒 */
|
||||
int totalCount = dclist.size();
|
||||
for(int i=1; i<4; i++){
|
||||
CountDownLatch downLatch = new CountDownLatch(dclist.size());
|
||||
handShakeForDC(dclist,downLatch);
|
||||
downLatch.await();
|
||||
pl("第"+i+"次 握手 有效数:"+(totalCount-dclist.size())+" 无效数:"+dclist.size());
|
||||
|
||||
//判断 最多尝试3次
|
||||
if(dclist.size()>0){
|
||||
Thread.sleep(20000);
|
||||
}else{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* 剩余失败DC 进行Ping 握手 判断主机是否存在 */
|
||||
CountDownLatch downLatch = new CountDownLatch(dclist.size());
|
||||
pingHandshake(dclist,downLatch);
|
||||
downLatch.await();
|
||||
|
||||
/* 异常DC告警分析 */
|
||||
if(errorInfoList!= null && errorInfoList.size()>0){
|
||||
String sql = "insert into nms_error_info (error_code,error_time,state_update_time,errort_getip,errort_ip,error_state,error_des) values (?,to_date(?,'yyyy-mm-dd hh24:mi:ss'),to_date(?,'yyyy-mm-dd hh24:mi:ss'),?,?,?,?)";
|
||||
List<String[]> paramsList = new LinkedList<String[]>();
|
||||
for(NmsErrorInfo nei : errorInfoList){
|
||||
String[] params = new String[] {
|
||||
nei.getErrorCode(),
|
||||
format.format(nei.getErrorTime()),
|
||||
format.format(nei.getStateUpdateTime()),
|
||||
nei.getErrortGetip(),
|
||||
nei.getErrortIp(),
|
||||
(nei.getErrorState() == null ? 0 : nei.getErrorState().intValue())+ "",
|
||||
nei.getErrorDesc()};
|
||||
paramsList.add(params);
|
||||
}
|
||||
conn.dbUpdateByBatch(sql, paramsList);
|
||||
}
|
||||
// if(dclist!= null && dclist.size()>0){
|
||||
// for(ServerTable st : dclist){
|
||||
// Integer [] stData = ThreadPoolCommon.DCStatusMap.get(st.getServerIp());
|
||||
/*
|
||||
int newState =
|
||||
* createErrorInfo(dcIp, newState, oldState);
|
||||
errorInfoList.add();
|
||||
Map<String, String> error = new HashMap<String, String>();
|
||||
// error.put("ERROR_CODE", ""); //异常code:非空
|
||||
error.put("ERROR_TIME", format.format(Calendar.getInstance().getTime())); //异常产生时间:非空
|
||||
error.put("ERRORT_GETIP", LocalAddress.getRealIp()); //异常信息提供IP:非空
|
||||
error.put("ERRORT_IP", st.getServerIp()); //异常信息产生IP:非空
|
||||
error.put("ERROR_STATE", "1"); //非空 异常状态:0已解决;1未解决
|
||||
*/
|
||||
//目标主机不存在
|
||||
/*if(stData[0]== ThreadConstants.HAND_SHAKE_RESULT_PING_FAILED){ //ping Failed
|
||||
error.put("ERROR_CODE", Constant.ERROR_NET_WORK_ERROR); //异常code:非空
|
||||
}
|
||||
else if(stData[0]==null || stData[0]== ThreadConstants.HAND_SHAKE_RESULT_SOCKET_FAILED || stData[0]== ThreadConstants.HAND_SHAKE_RESULT_PING_SUCCESS){ //ping OK socket Down
|
||||
error.put("ERROR_CODE", Constant.HANDSHAKE_ERROR); //异常code:非空
|
||||
}
|
||||
else if(stData[0]== ThreadConstants.HAND_SHAKE_RESULT_SOCKET_SUCCESS){ //socket success正常
|
||||
error.put("ERROR_CODE", Constant.); //异常code:非空
|
||||
}
|
||||
else if(stData[0]== ThreadConstants.HAND_SHAKE_RESULT_UNKNOWN_FAILED){ //其他异常
|
||||
error.put("ERROR_CODE", Constant.ERROR_UNKNOWN_ERROR); //异常code:非空
|
||||
}
|
||||
conn.insertObj("nms_error_info", error);*/
|
||||
// }
|
||||
// }
|
||||
|
||||
//分析告警DC Down
|
||||
|
||||
|
||||
// NmsErrorInfo info = new NmsErrorInfo(errorCode, errorTime,
|
||||
// errortGetip, errortIp, errorState,
|
||||
// stateUpdateTime, stateUpdateUserid);
|
||||
|
||||
/* 计算DC变更IP */
|
||||
// updateIPSegment(dclist,conn);
|
||||
|
||||
/* 将变更后的信息重新发送到 */
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("", e);
|
||||
}finally{
|
||||
errorInfoList.clear();//清理集合数据
|
||||
try {
|
||||
if(conn != null){
|
||||
conn.close();
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public void pl(Object obj){
|
||||
System.out.println(obj==null?null:obj.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询符合握手操作的DCList
|
||||
* 业务: 1、查询所有DC
|
||||
* 2、对失效DC查询异常校验是否需要再次握手
|
||||
* @time Jan 22, 2013-3:23:57 PM
|
||||
* @param serverList
|
||||
* @return
|
||||
*/
|
||||
public List<ServerTable> getHandShakeDCList(ConnectionOracle conn) throws Exception{
|
||||
List<ServerTable> dclist = new ArrayList<ServerTable>();
|
||||
String selectSql = "select st.id,st.server_ip,st.server_state from server_table st where st.server_state =0";
|
||||
ArrayList<String> fields = new ArrayList<String>();
|
||||
fields.add("id");
|
||||
fields.add("server_ip");
|
||||
fields.add("server_state");
|
||||
ArrayList<Map<String, String>> mapsList = conn.dbSelect(selectSql,fields);
|
||||
StringBuffer falseDCId = new StringBuffer("0");
|
||||
if(mapsList!= null && mapsList.size()>0){
|
||||
for(Map<String, String> map : mapsList){
|
||||
ServerTable serverTable = new ServerTable();
|
||||
serverTable.setId(StringUtils.isBlank(map.get("id"))?null:Long.parseLong(map.get("id")));
|
||||
serverTable.setServerIp(map.get("server_ip"));
|
||||
serverTable.setServerState(StringUtils.isBlank(map.get("server_state"))?null:Long.parseLong(map.get("server_state")));
|
||||
dclist.add(serverTable);
|
||||
if(serverTable.getServerState()==1l){//失效DC
|
||||
falseDCId.append(","+serverTable.getId());
|
||||
}
|
||||
DCIPIDMap.put(serverTable.getServerIp(), serverTable.getId());
|
||||
}
|
||||
//查询校验失效DC 的异常信息,判断是否做再次通讯处理(待完善)
|
||||
}
|
||||
return dclist;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @time Jan 22, 2013-10:54:57 AM
|
||||
* @param ipList
|
||||
*/
|
||||
public int handShakeForDC(List<ServerTable> serverList,CountDownLatch downLatch) {
|
||||
if(serverList!= null && serverList.size()>0){
|
||||
//单线程操作
|
||||
Semaphore handShakeSemaphore = new Semaphore(10,true);
|
||||
|
||||
for(int i = 0;i<serverList.size();i++){
|
||||
ServerTable st = serverList.get(i);
|
||||
|
||||
try {
|
||||
|
||||
handShakeSemaphore.acquire(); //申请监测信号
|
||||
// pl("handshake for:"+st.getServerIp());
|
||||
SSLClient client = new SSLClient(st.getServerIp(),SSLClient.HAND_SHAKE_DC,null);
|
||||
|
||||
//-- 启动新线程
|
||||
final Future<?> future = ThreadPoolCommon.service.submit(client);
|
||||
//-- 获取结果
|
||||
Integer val = (Integer) future.get();
|
||||
|
||||
//-- 结果保存
|
||||
Integer[] data = ThreadPoolCommon.DCStatusMap.get(st.getServerIp());
|
||||
if(data==null){ //新DC第一次握手结果不做告警处理
|
||||
data = new Integer[]{val,0};
|
||||
}else{
|
||||
//val值为null 或1 ,1为通讯正常,作通讯恢复判断
|
||||
if(val!=null && val.intValue()==1){
|
||||
NmsErrorInfo nei = createErrorInfo(st.getServerIp(),val,data[0]);
|
||||
if(nei!=null){
|
||||
errorInfoList.add(nei);
|
||||
}
|
||||
data[0] = val;
|
||||
}
|
||||
}
|
||||
ThreadPoolCommon.DCStatusMap.put(st.getServerIp(), data);
|
||||
|
||||
//-- 队列处理
|
||||
if(val == ThreadConstants.HAND_SHAKE_RESULT_SOCKET_SUCCESS){
|
||||
//删除该DC无需再次轮询
|
||||
serverList.remove(i);
|
||||
i--;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("",e);
|
||||
}finally{
|
||||
handShakeSemaphore.release();
|
||||
downLatch.countDown();
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
private NmsErrorInfo createErrorInfo(String dcIp,Integer newState,Integer oldState) throws Exception{
|
||||
|
||||
if(dcIp==null
|
||||
|| oldState == null
|
||||
|| (newState!=null && newState.intValue() == oldState.intValue())){
|
||||
return null;
|
||||
}
|
||||
|
||||
NmsErrorInfo nei = new NmsErrorInfo();
|
||||
nei.setErrorCode(Constant.HANDSHAKE_ERROR);
|
||||
nei.setErrorTime(Calendar.getInstance().getTime());
|
||||
nei.setStateUpdateTime(Calendar.getInstance().getTime());
|
||||
//nei.setErrortGetip(LocalAddress.getRealIp());
|
||||
nei.setErrortGetip(LocalAddress.getLocalIp());
|
||||
nei.setErrortIp(dcIp);
|
||||
nei.setErrorDesc("WEB与DC握手");
|
||||
|
||||
if(newState!=null && newState == 1){ //正常
|
||||
if(oldState != 1){
|
||||
nei.setErrorState(2l); //非空 异常状态:0已解决;1未解决;2已恢复
|
||||
}
|
||||
}else{ //异常
|
||||
if(oldState == 1){
|
||||
nei.setErrorState(1l); //非空 异常状态:0已解决;1未解决;2已恢复
|
||||
}
|
||||
}
|
||||
return nei;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据比较新旧DC握手状态
|
||||
* 获取告警描述信息
|
||||
* @time Apr 17, 2013-10:38:15 AM
|
||||
* @param newState
|
||||
* @param oldState
|
||||
* @return
|
||||
*/
|
||||
private String getErrorInfoDesc(int newState,int oldState){
|
||||
if(newState == oldState){
|
||||
return null;
|
||||
}
|
||||
// 情景处理:
|
||||
// DC通讯成功【1】 比较集合中state值比较并变更 [1:变更为1不作操作][0:变更为1做系统告警恢复(通讯恢复)][-1:变更为1做系统告警恢复(通讯恢复)]
|
||||
// DC通讯失败ping成功【0】 比较集合中state值并变更 [1:变更为0做系统告警异常(Ping正常,通讯失败)][0:不做操作][-1:变更为0做系统告警异常(Ping恢复,通讯失败)]
|
||||
// DC通讯失败ping失败【-1】 比较集合中state值并变更 [1:变更为-1做系统告警异常(Ping失败)][0:变更为-1做系统告警异常(Ping失败)][-1:不做操作]
|
||||
|
||||
switch (newState) {
|
||||
case -1:
|
||||
return "Ping失败";
|
||||
case 0:
|
||||
if (oldState == 1)
|
||||
return "Ping正常,通讯失败";
|
||||
else if(oldState ==-1)
|
||||
return "Ping恢复,通讯失败";
|
||||
break;
|
||||
case 1:
|
||||
return "通讯恢复";
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public int pingHandshake(List<ServerTable> serverList,CountDownLatch downLatch) {
|
||||
if(serverList!= null && serverList.size()>0){
|
||||
//单线程操作
|
||||
Semaphore handShakeSemaphore = new Semaphore(5,true);
|
||||
|
||||
for(int i = 0;i<serverList.size();i++){
|
||||
ServerTable st = serverList.get(i);
|
||||
try {
|
||||
|
||||
handShakeSemaphore.acquire(); //申请监测信号
|
||||
pl("ping for:"+st.getServerIp());
|
||||
PingThread pingThread = new PingThread(st.getServerIp());
|
||||
//-- 启动新线程
|
||||
final Future<?> future = ThreadPoolCommon.service.submit(pingThread);
|
||||
//-- 获取结果
|
||||
Integer val = (Integer) future.get();
|
||||
|
||||
//-- 结果处理
|
||||
Integer[] data = ThreadPoolCommon.DCStatusMap.get(st.getServerIp());
|
||||
if(data==null){
|
||||
data = new Integer[]{val,0};
|
||||
}else{
|
||||
//val值为null 或3 或4 ,3为Ping正常通讯失败,null 或 4为通讯失败 对节点做最终状态处理
|
||||
val = (val==null || val.intValue()==ThreadConstants.HAND_SHAKE_RESULT_PING_FAILED)?-1:0;
|
||||
if(val!=null && data[0]!=null){
|
||||
NmsErrorInfo nei = createErrorInfo(st.getServerIp(),val,data[0]);
|
||||
if(nei!=null){
|
||||
errorInfoList.add(nei);
|
||||
}
|
||||
}
|
||||
data[0] = val;
|
||||
}
|
||||
ThreadPoolCommon.DCStatusMap.put(st.getServerIp(), data);
|
||||
|
||||
//-- 队列处理
|
||||
/*if(val == ThreadConstants.HAND_SHAKE_RESULT_PING_SUCCESS){
|
||||
//删除该DC无需再次轮询
|
||||
serverList.remove(i);
|
||||
i--;
|
||||
}*/
|
||||
} catch (Exception e) {
|
||||
logger.error("",e);
|
||||
}finally{
|
||||
handShakeSemaphore.release();
|
||||
downLatch.countDown();
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新各DC管理的IP段
|
||||
* @time Jan 22, 2013-10:54:57 AM
|
||||
* @param ipList
|
||||
*/
|
||||
public int updateIPSegment(List<ServerTable> errorDCList,ConnectionOracle conn) throws Exception{
|
||||
//--查询节点类型
|
||||
String selectSql = "select distinct nt.node_type from node_table nt where nt.node_type is not null";
|
||||
ArrayList<String> fields = new ArrayList<String>();
|
||||
fields.add("node_type");
|
||||
ArrayList<Map<String, String>> nTypeMapsList = conn.dbSelect(selectSql,fields);
|
||||
StringBuffer falseDCId = new StringBuffer("0");
|
||||
LinkedList<String> nTypeList = new LinkedList<String>();
|
||||
if(nTypeMapsList!= null && nTypeMapsList.size()>0){
|
||||
for(Map<String, String> map : nTypeMapsList){
|
||||
nTypeList.add(map.get("node_type"));
|
||||
}
|
||||
}
|
||||
|
||||
//--统计DC状态
|
||||
int OKCount = 0; //有效数
|
||||
List<String> OKDCIpList = new ArrayList<String>(); //有效Ip集合
|
||||
Iterator<Entry<String, Integer[]>> ite = ThreadPoolCommon.DCStatusMap.entrySet().iterator();
|
||||
while (ite.hasNext()) {
|
||||
Map.Entry<java.lang.String,Integer[]> entry = (Map.Entry<java.lang.String,Integer[]>) ite.next();
|
||||
if(entry.getValue()[0] == 1){ //有效
|
||||
OKCount++;
|
||||
OKDCIpList.add(entry.getKey());
|
||||
}
|
||||
}
|
||||
|
||||
//--正序排序
|
||||
Collections.sort(OKDCIpList,new Comparator(){
|
||||
|
||||
@Override
|
||||
public int compare(Object o1, Object o2) {
|
||||
return o1.toString().compareTo(o2.toString());
|
||||
}
|
||||
|
||||
});
|
||||
//展示
|
||||
for(String ip :OKDCIpList){
|
||||
pl("ip>"+ip);
|
||||
}
|
||||
//--查询有效节点,条件节点类型,节点IP有小到大排序
|
||||
if(nTypeList.size()>0){
|
||||
for(String nType : nTypeList){
|
||||
String nSql = "select distinct nt.ipn from node_table nt where nt.node_state=0 and nt.node_type=? order by nt.ipn asc";
|
||||
ArrayList<String> ipnList = conn.dbSelectSingleColumn(nSql,nType);
|
||||
int segmentSize = ipnList.size()%OKCount==0?ipnList.size()%OKCount:(ipnList.size()%OKCount)+1;
|
||||
|
||||
//-- 分配操作
|
||||
long minIpn=0,maxipn=0,segmentCount=0;
|
||||
int i = 0;
|
||||
for(String dcIp : OKDCIpList){
|
||||
ipnF:for(;i<ipnList.size();i++){
|
||||
long ipn = Long.parseLong(ipnList.get(i));
|
||||
//最小值
|
||||
if(minIpn == 0){
|
||||
minIpn = ipn;
|
||||
}
|
||||
|
||||
//最大值
|
||||
if(maxipn<ipn){
|
||||
maxipn = ipn;
|
||||
}
|
||||
segmentCount++;
|
||||
|
||||
//跳出判断
|
||||
if(segmentCount == segmentSize){
|
||||
minIpn = 0;
|
||||
maxipn = 0;
|
||||
segmentCount = 0;
|
||||
break ipnF;
|
||||
}
|
||||
}
|
||||
|
||||
//更新或保存
|
||||
saveOrUpdateIPSegment(conn,DCIPIDMap.get(dcIp),dcIp,nType,minIpn,maxipn,segmentCount);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 插入或保存IPSegment操作
|
||||
* @time Jan 22, 2013-3:49:45 PM
|
||||
* @param conn
|
||||
* @param dcIp
|
||||
* @param nType
|
||||
* @param minIpn
|
||||
* @param maxipn
|
||||
* @param segmentCount
|
||||
*/
|
||||
public void saveOrUpdateIPSegment(ConnectionOracle conn,Long dcId,String dcIp,String nType,Long minIpn,Long maxipn,Long segmentCount) throws Exception{
|
||||
//查询是否存在
|
||||
// pl(dcId);
|
||||
String selectSql = "select sis.id from server_ip_segment sis where sis.SERVER_ID=? and sis.node_type=?";
|
||||
ArrayList<String> fields = new ArrayList<String>();
|
||||
fields.add("node_type");
|
||||
ArrayList<String> sisIdList = conn.dbSelectSingleColumn(selectSql,dcId,nType);
|
||||
if(sisIdList!= null && sisIdList.size()>0){ //update
|
||||
conn.dbUpdate("update server_ip_segment set start_ip=? ,start_ipn=?,end_ip=?,end_ipn=?,node_count=? where id=? ", IpCovert.longToIP(minIpn),minIpn,IpCovert.longToIP(maxipn),maxipn,segmentCount,sisIdList.get(0));
|
||||
}else{ //insert
|
||||
Map<String, String> obj = new HashMap<String, String>();
|
||||
obj.put("SERVER_ID", dcId+"");
|
||||
obj.put("start_ip", IpCovert.longToIP(minIpn));
|
||||
obj.put("start_ipn", minIpn+"");
|
||||
obj.put("end_ip", IpCovert.longToIP(maxipn));
|
||||
obj.put("end_ipn", maxipn+"");
|
||||
obj.put("segment_state", "1");
|
||||
obj.put("node_type", nType+"");
|
||||
obj.put("node_count", segmentCount+"");
|
||||
conn.insertObj("server_ip_segment", obj);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @time Jan 21, 2013-4:27:33 PM
|
||||
* @param args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
ThreadPoolCommon.scheduled.submit(new DCHandShakeThread());
|
||||
// ThreadPoolCommon.scheduled.scheduleAtFixedRate(new DCHandShakeManagerThread(),1,10,TimeUnit.SECONDS);
|
||||
}
|
||||
}
|
||||
109
src/com/nms/thread/DetectDatasTimeoutAlarmThread.java
Normal file
109
src/com/nms/thread/DetectDatasTimeoutAlarmThread.java
Normal file
@@ -0,0 +1,109 @@
|
||||
package com.nms.thread;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.nms.thread.service.ThreadService;
|
||||
|
||||
import nis.nms.bean.SetInfo;
|
||||
import nis.nms.util.ConnectionOracle;
|
||||
|
||||
public class DetectDatasTimeoutAlarmThread implements Runnable{
|
||||
private Logger logger = Logger.getLogger(DetectDatasTimeoutAlarmThread.class);
|
||||
private Date startTime = Calendar.getInstance().getTime();
|
||||
@Override
|
||||
public void run() {
|
||||
// Thread.currentThread().setName("监测数据超时告警线程");
|
||||
Thread.currentThread().setName("Monitoring Data Timeout Alarm Thread");
|
||||
ConnectionOracle conn = null;
|
||||
try {
|
||||
conn = ConnectionOracle.getConnection();
|
||||
ThreadService service = new ThreadService(conn);
|
||||
|
||||
//先检查握手监测是否正常,若正常再检查其他监测,若超周期无数据,则无需检查其他监测(因为握手如果异常,其他监测也会异常)
|
||||
FileInputStream inStream = null;
|
||||
URL url2 = ThreadService.class.getResource("/myconfig.properties");
|
||||
Properties properties = new Properties();
|
||||
inStream = new FileInputStream(url2.getPath().replace("%20", " "));
|
||||
properties.load(inStream);
|
||||
String checkTypeName = properties.getProperty("detec.nmsclient.str");
|
||||
// String checkTypeName = Constants.NMS_CLIENT_CHECKTYPENAME;
|
||||
if(StringUtils.isEmpty(checkTypeName)){
|
||||
checkTypeName = "NMSClient";
|
||||
}
|
||||
SetInfo nmsClientSet = service.getSetInfoByCheckName(1,checkTypeName); //查询握手监测相关信息
|
||||
|
||||
List<String[]> alarm = new ArrayList<String[]>();
|
||||
List<String []> nmsClientAlarmList = service.detectDatasTimeoutCheck(nmsClientSet,startTime,null);//监测当前监测是否超时无数据
|
||||
String errorSeqIds = "-1";//握手监测异常的节点
|
||||
if(nmsClientAlarmList != null && nmsClientAlarmList.size()>0){//握手监测异常:有异常的节点(此次检查产生超周期告警信息)
|
||||
alarm.addAll(nmsClientAlarmList);
|
||||
for(String [] datas: nmsClientAlarmList){
|
||||
try {
|
||||
//service.resoveAlarms(datas);
|
||||
if(StringUtils.isNotBlank(datas[1])) {//seqId和ip不为空
|
||||
errorSeqIds = errorSeqIds + "," + datas[1];
|
||||
}
|
||||
logger.info("握手监测超时告警:"+datas[9]);
|
||||
} catch (Exception e) {
|
||||
logger.error("Parsing handshake monitoring timeout anomaly information ", e);
|
||||
}
|
||||
}
|
||||
}else {
|
||||
logger.info("当前时间 所有节点握手监测均正常");
|
||||
}
|
||||
// //握手监测正常,查询握手最新时间的监测是否有异常的
|
||||
List<String> seqIds = new ArrayList<String>();
|
||||
seqIds = service.searchTimeoutNmsClient(nmsClientSet);
|
||||
for(String seqId:seqIds) {
|
||||
if(StringUtils.isNotBlank(seqId) && !(","+errorSeqIds+",").contains((","+seqId+","))) {
|
||||
errorSeqIds = errorSeqIds + "," + seqId;
|
||||
}
|
||||
}
|
||||
|
||||
logger.info("超时无握手监测信息节点的seqId:"+errorSeqIds);
|
||||
|
||||
List<SetInfo> setInfoList = service.getAllSetInfo(1,null); //查询有效SetInfo信息
|
||||
for(SetInfo setInfo : setInfoList){
|
||||
List<String []> alarmInfoList = service.detectDatasTimeoutCheck(setInfo,startTime,errorSeqIds);//监测当前监测是否超时无数据
|
||||
if(alarmInfoList != null && alarmInfoList.size()>0){
|
||||
alarm.addAll(alarmInfoList);
|
||||
/*for(String [] datas: alarmInfoList){
|
||||
try {
|
||||
// System.out.println("--"+JSONArray.fromObject(datas));
|
||||
service.resoveAlarms(datas);
|
||||
} catch (Exception e) {
|
||||
logger.error("Parsing the abnormity of the timeout anomaly information of the monitoring data", e);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
int size = alarm.size();
|
||||
logger.debug("监测超时告警:共 " + size +" 条,开始批量入库");
|
||||
boolean r = service.resoveAlarmsBatch(alarm);
|
||||
logger.debug("监测告警批量入库 -> "+ (r?"成功":"失败"));
|
||||
} catch (Exception e) {
|
||||
logger.error("Monitoring data timeout anomaly",e);
|
||||
}finally{
|
||||
try {
|
||||
if(conn != null){
|
||||
conn.close();
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String [] args){
|
||||
new Thread(new DetectDatasTimeoutAlarmThread()).start();
|
||||
}
|
||||
}
|
||||
112
src/com/nms/thread/DetectInsertThread.java
Normal file
112
src/com/nms/thread/DetectInsertThread.java
Normal file
@@ -0,0 +1,112 @@
|
||||
package com.nms.thread;
|
||||
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.Semaphore;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.nms.thread.common.ThreadPoolCommon;
|
||||
import com.nms.thread.pool.ThreadPoolConfig;
|
||||
import com.nms.thread.socket.SSLClient;
|
||||
|
||||
import nis.nms.util.BaseAction;
|
||||
/**
|
||||
* 监测数据入库 控制 线程,主动与dc 通信通知dc 入库监测数据
|
||||
* @author dell
|
||||
*
|
||||
*/
|
||||
public class DetectInsertThread implements Runnable{
|
||||
private static final Logger logger = Logger.getLogger(DetectInsertThread.class);
|
||||
public static boolean flag = true;//当前时间是否可以入库
|
||||
public static String currentDc;//当前入库的dc
|
||||
private static Semaphore insertSem = new Semaphore(1);
|
||||
//通知dc 入库,超过 此值 继续下一个 dc 入库,同时 尝试通知 超时的dc 暂停 入库,单位:s
|
||||
private static long timeout = Integer.parseInt(BaseAction.rb.getString("detect.insert.timeout"));//入库超时时间
|
||||
/**
|
||||
* 通知超时时间,3s
|
||||
*/
|
||||
public static long INSERT_DETECT_SSL_TIMEOUT = 3000l;
|
||||
/**
|
||||
* 释放锁
|
||||
*/
|
||||
public static void release(){
|
||||
DetectInsertTimeOutThread.stop();
|
||||
insertSem.release();
|
||||
currentDc = null;
|
||||
logger.debug("监测入库 release");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Thread.currentThread().setName("DC监测数据入库控制线程");
|
||||
long start = System.currentTimeMillis();
|
||||
long now = start;
|
||||
while(true){
|
||||
now = System.currentTimeMillis();
|
||||
if((now - start) > ThreadPoolConfig.DETECT_INSERT_CONTROL_PERIOD*1000){
|
||||
start = now;
|
||||
Set<Entry<String, Integer[]>> es = ThreadPoolCommon.DCStatusMap.entrySet();
|
||||
for(Entry<String, Integer[]> en : es){
|
||||
String ip = null;
|
||||
try {
|
||||
ip = en.getKey();
|
||||
Integer[] value = en.getValue();
|
||||
Integer status = value[0];
|
||||
logger.debug(ip +"状态:"+ status);
|
||||
if(status == null || status != 1){
|
||||
logger.error(ip + " 通信异常,不做监测入库通信");
|
||||
continue;
|
||||
}
|
||||
insertSem.acquire();
|
||||
currentDc = ip;
|
||||
SSLClient client = new SSLClient(ip, SSLClient.DC_PORT, SSLClient.INSERT_DETECT);
|
||||
Future<Object> future = ThreadPoolCommon.service.submit(client);
|
||||
Object r = future.get(INSERT_DETECT_SSL_TIMEOUT, TimeUnit.MILLISECONDS);
|
||||
Integer result = Integer.valueOf(r+"");
|
||||
logger.debug(ip+ " 通知下发结果 " + result);
|
||||
if(result.intValue() > 0){
|
||||
//启动超时判断线程
|
||||
ThreadPoolCommon.service.submit(new DetectInsertTimeOutThread(ip, SSLClient.DC_PORT, timeout));
|
||||
logger.info("入库超时监控线程创建成功");
|
||||
}else if(result.intValue() ==0){
|
||||
insertSem.release();//释放锁
|
||||
logger.debug(ip + "监测数据为 0");
|
||||
}else if(result.intValue() == -1){
|
||||
insertSem.release();//释放锁
|
||||
logger.debug(ip + "通知下发响应异常");
|
||||
}else if(result.intValue() == -2){//
|
||||
insertSem.release();//释放锁
|
||||
logger.debug(ip + " 监测数据上传web");
|
||||
}else if(result.intValue() == -4){
|
||||
insertSem.release();//释放锁
|
||||
logger.debug(ip + " DC 主动入库");
|
||||
}else{
|
||||
insertSem.release();//释放锁
|
||||
logger.debug("未知响应");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error(ip,e);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
try {
|
||||
Thread.sleep(now -start);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前入库的dc
|
||||
* @return
|
||||
*/
|
||||
public static String getCurrentDc(){
|
||||
return currentDc;
|
||||
}
|
||||
|
||||
}
|
||||
48
src/com/nms/thread/DetectInsertTimeOutThread.java
Normal file
48
src/com/nms/thread/DetectInsertTimeOutThread.java
Normal file
@@ -0,0 +1,48 @@
|
||||
package com.nms.thread;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.nms.thread.common.ThreadPoolCommon;
|
||||
import com.nms.thread.socket.SSLClient;
|
||||
|
||||
public class DetectInsertTimeOutThread implements Runnable{
|
||||
private static final Logger logger = Logger.getLogger(DetectDatasTimeoutAlarmThread.class);
|
||||
private String ip;
|
||||
private int port;
|
||||
private long timeout;
|
||||
private long start = System.currentTimeMillis();
|
||||
private static boolean stop = false;
|
||||
public DetectInsertTimeOutThread(String ip ,int port,long timeout) {
|
||||
this.ip = ip;
|
||||
this.port = port;
|
||||
this.timeout = timeout*1000;
|
||||
stop = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Thread.currentThread().setName(ip + "-监测数据入库超时监控线程-"+ System.currentTimeMillis());
|
||||
logger.debug("线程开始");
|
||||
try {
|
||||
long now;
|
||||
while(!stop){
|
||||
now = System.currentTimeMillis();
|
||||
if(now - start > timeout){
|
||||
SSLClient sc = new SSLClient(ip, port, SSLClient.RELEASE_DETECT);
|
||||
ThreadPoolCommon.service.submit(sc);
|
||||
DetectInsertThread.release();
|
||||
stop = true;
|
||||
logger.warn("监测数据入库超时释放锁");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("",e);
|
||||
DetectInsertThread.release();
|
||||
}
|
||||
logger.debug("线程结束");
|
||||
}
|
||||
|
||||
public static void stop() {
|
||||
stop = true;
|
||||
}
|
||||
}
|
||||
128
src/com/nms/thread/MailingManagerThread.java
Normal file
128
src/com/nms/thread/MailingManagerThread.java
Normal file
@@ -0,0 +1,128 @@
|
||||
package com.nms.thread;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ResourceBundle;
|
||||
import java.util.concurrent.Future;
|
||||
|
||||
import nis.nms.util.BaseAction;
|
||||
import nis.nms.util.ConnectionOracle;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.nms.thread.common.ThreadPoolCommon;
|
||||
import com.nms.thread.pool.ThreadPoolConfig;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* 邮件发送管理器
|
||||
* @date Mar 29, 2013 10:37:27 AM
|
||||
* @author ZhangGang
|
||||
*
|
||||
*/
|
||||
public class MailingManagerThread implements Runnable{
|
||||
private Logger logger = Logger.getLogger(MailingManagerThread.class);
|
||||
|
||||
private boolean emailConfigSuccess = true;
|
||||
private boolean dbErrorInfoFlag = true;
|
||||
private boolean dbInitFlag = true;
|
||||
|
||||
public void run() {
|
||||
//将线程运行程序,尽可能的catch捕获异常
|
||||
// Thread.currentThread().setName("邮件发送管理线程");
|
||||
Thread.currentThread().setName("Mail Send Management Thread");
|
||||
ConnectionOracle dao = null;
|
||||
try {
|
||||
dao = ConnectionOracle.getConnection();
|
||||
List<String> flaglist = dao.dbSelectSingleColumn("select t.type_state from type_table t where t.type_identity='emailflag'");//type_state:0启用;1:停用
|
||||
if(flaglist!=null&&flaglist.size()>0){//未配置emailflag,则默认为发送邮件
|
||||
String flag = flaglist.get(0);
|
||||
if(!"0".equals(flag)){
|
||||
logger.info("邮件功能未开启");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ResourceBundle rb = BaseAction.rb;
|
||||
String address = rb.getString("email.address");
|
||||
String userName = rb.getString("email.userName");
|
||||
String password = rb.getString("email.password");
|
||||
String host = rb.getString("email.host");
|
||||
|
||||
String errorInfo = null;
|
||||
if(StringUtils.isBlank(address)){
|
||||
emailConfigSuccess = false;
|
||||
// errorInfo += "缺少参数 email.address;";
|
||||
// logger.error("邮件功能已开启但缺少参数 email.address");
|
||||
errorInfo += "Lack of parameters email.address;";
|
||||
logger.error("The Email function has been opened,but the parameter email.address is missing");
|
||||
}
|
||||
|
||||
if(StringUtils.isBlank(userName)){
|
||||
emailConfigSuccess = false;
|
||||
// errorInfo += "缺少参数 email.userName;";
|
||||
// logger.error("邮件功能已开启但缺少参数 email.userName");
|
||||
errorInfo += "Lack of parameters email.userName;";
|
||||
logger.error("The Email function has been opened,but the parameter email.userName is missing");
|
||||
}
|
||||
|
||||
if(StringUtils.isBlank(password)){
|
||||
emailConfigSuccess = false;
|
||||
// errorInfo += "缺少参数 email.password;";
|
||||
// logger.error("邮件功能已开启但缺少参数 email.password");
|
||||
errorInfo += "Lack of parameters email.password;";
|
||||
logger.error("The Email function has been opened,but the parameter email.password is missing");
|
||||
}
|
||||
|
||||
if(StringUtils.isBlank(host)){
|
||||
emailConfigSuccess = false;
|
||||
// errorInfo += "缺少参数 email.host;";
|
||||
// logger.error("邮件功能已开启但缺少参数 email.host");
|
||||
errorInfo += "Lack of parameters email.host;";
|
||||
logger.error("The Email function has been opened,but the parameter email.host is missing");
|
||||
}
|
||||
|
||||
if(!emailConfigSuccess){
|
||||
logger.error("Mail function can not be started");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//- 检查线程运行状态 运行中无操作
|
||||
Future<?> future = ThreadPoolCommon.threadManagerMap.get(ThreadPoolConfig.MAILING_THREAD);
|
||||
if(future != null && !future.isCancelled() && !future.isDone()){ //运行中
|
||||
logger.info("邮件发送线程 运行中 不再启动新线程");
|
||||
}
|
||||
|
||||
//- 非升级操作判断
|
||||
logger.info("邮件发送线程 空闲中 启动新解析线程");
|
||||
//-- 获取线程执行 需进行主动告警和邮件通知等相关操作,待考虑
|
||||
future = ThreadPoolCommon.service.submit(new MailingThread());
|
||||
//注册
|
||||
ThreadPoolCommon.threadManagerMap.put(ThreadPoolConfig.MAILING_THREAD, future);
|
||||
logger.debug("执行结束");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if(dao != null){
|
||||
dao.close();
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void main(String [] args) {
|
||||
Thread thread = new Thread(new MailingManagerThread());
|
||||
thread.start();
|
||||
try {
|
||||
Thread.sleep(10000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
System.exit(0);
|
||||
}
|
||||
}
|
||||
141
src/com/nms/thread/MailingThread.java
Normal file
141
src/com/nms/thread/MailingThread.java
Normal file
@@ -0,0 +1,141 @@
|
||||
package com.nms.thread;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
import nis.nms.bean.EmailInfo;
|
||||
import nis.nms.util.ConnectionOracle;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.nms.thread.common.ThreadPoolCommon;
|
||||
import com.nms.thread.service.EmailService;
|
||||
|
||||
/**
|
||||
* CSV解析线程
|
||||
*
|
||||
* @author ZGGG3
|
||||
*
|
||||
*/
|
||||
public class MailingThread implements Callable<Object> {
|
||||
Logger logger = Logger.getLogger(MailingThread.class);
|
||||
volatile boolean stop = false;// 线程是否被取消标志
|
||||
private static long startTime;
|
||||
Long waitTime = 30 * 60 * 1000l;
|
||||
|
||||
// 初始化starttime 在重启服务器的时候
|
||||
static {
|
||||
ConnectionOracle dao = null;
|
||||
try {
|
||||
dao = ConnectionOracle.getConnection();
|
||||
List<String> emaillist = dao.dbSelectSingleColumn(
|
||||
"select to_char(create_time,'yyyy-mm-dd hh24:mi:ss') create_time from email_table where send_flag='0' and send_level='1' order by create_time asc");
|
||||
if (emaillist != null && emaillist.size() > 0) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
if (emaillist.get(0) != null && !emaillist.get(0).equals("")) {
|
||||
Date d = sdf.parse(emaillist.get(0));
|
||||
startTime = d.getTime();
|
||||
} else {
|
||||
startTime = System.currentTimeMillis();
|
||||
}
|
||||
} else {
|
||||
startTime = System.currentTimeMillis();
|
||||
}
|
||||
System.out.println("====static===,startTime=" + startTime);
|
||||
System.out.println("====static===,startTime=" + new Date(startTime));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}finally{
|
||||
try {
|
||||
if(dao != null){
|
||||
dao.close();
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* 线程操作
|
||||
*
|
||||
* 依次解析urlList中仍存在的Files
|
||||
*
|
||||
* 实现了依次解析Files,由于后期实现多线程解析操作
|
||||
*/
|
||||
public Object call() {
|
||||
// 为当前线程命名 ,用与开发阶段友好输出。
|
||||
// Thread.currentThread().setName("邮件发送线程");
|
||||
Thread.currentThread().setName("Mail Sending Thread");
|
||||
logger.info("**************startTime=" + startTime + "startTimeStr=" + new Date(startTime) + ",waitTime=" + waitTime);
|
||||
ConnectionOracle dao = null;
|
||||
try {
|
||||
dao = ConnectionOracle.getConnection();
|
||||
|
||||
boolean sendflag = true;// 发送标识 若非紧急状态下延时时间为-1 则不发送非紧急邮件
|
||||
List<String> timelist = dao.dbSelectSingleColumn(
|
||||
"select t.delay_time from option_table t where t.type_identity='emergent' and t.type_code='1'");
|
||||
if (timelist != null && timelist.size() > 0) {
|
||||
logger.info("delayTime:" + timelist.get(0));
|
||||
if (timelist.get(0).equals("-1")) {
|
||||
sendflag = false;
|
||||
}
|
||||
try {
|
||||
waitTime = Long.parseLong(timelist.get(0)) * 60 * 1000;
|
||||
} catch (Exception e) {
|
||||
logger.error("Non emergency time setting error", e);
|
||||
}
|
||||
}
|
||||
EmailService service = new EmailService(dao);
|
||||
boolean flag = false;// 时间标识 若等待时间大于等于设定周期 则发送非紧急邮件 否则不发送
|
||||
|
||||
System.out.println("当前时间:" + new Date() + ",=" + System.currentTimeMillis());
|
||||
System.out.println("startTime=" + startTime);
|
||||
System.out.println("waitTime=" + waitTime);
|
||||
System.out.println("startTimeStr=" + new Date(startTime));
|
||||
System.out.println("startTimeWaitTimeStr=" + new Date(startTime + waitTime));
|
||||
logger.info("当前时间:" + new Date() + ",=" + System.currentTimeMillis());
|
||||
logger.info("startTime=" + startTime);
|
||||
logger.info("waitTime=" + waitTime);
|
||||
logger.info("startTimeStr=" + new Date(startTime));
|
||||
logger.info("startTimeWaitTimeStr=" + new Date(startTime + waitTime));
|
||||
|
||||
if (startTime + waitTime < System.currentTimeMillis()) {
|
||||
flag = true;
|
||||
startTime = startTime + waitTime;// 每个周期结束后重新设定起始时间,起始时间增加值为设定周期时间
|
||||
logger.info(new Date(startTime));
|
||||
}
|
||||
logger.info("----------" + new Date(startTime) + "延时设置:" + sendflag + ",到时,发送非紧急邮件:" + flag);
|
||||
// 发送标识和时间标识皆为true时 系统发送非紧急邮件 (注:预防设定非紧急状态下的延时时间为-1时
|
||||
// 系统按照默认30分钟发送非紧急邮件)
|
||||
List<EmailInfo> eiList = service.getEmailInfoList(sendflag, flag);
|
||||
// -- 空数据集合 结束操作
|
||||
if (eiList == null || eiList.size() == 0) {
|
||||
return null;
|
||||
}
|
||||
long sTime = System.currentTimeMillis();
|
||||
service.sendEmailNew(eiList);
|
||||
long eTime = System.currentTimeMillis();
|
||||
logger.debug("本次邮件发送耗时: " + (sTime - eTime) + " ms");
|
||||
} catch (Exception e) {
|
||||
logger.error("Running exception", e);
|
||||
} finally {
|
||||
try {
|
||||
if(dao != null){
|
||||
dao.close();
|
||||
}
|
||||
} catch (Exception e2) {
|
||||
}
|
||||
logger.debug("线程结束");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
ThreadPoolCommon.service.submit(new MailingThread());
|
||||
}
|
||||
}
|
||||
42
src/com/nms/thread/NmsPortThread.java
Normal file
42
src/com/nms/thread/NmsPortThread.java
Normal file
@@ -0,0 +1,42 @@
|
||||
package com.nms.thread;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
import nis.nms.util.BaseAction;
|
||||
import nis.nms.util.ConnectionOracle;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.nms.thread.service.NmsReportService;
|
||||
|
||||
public class NmsPortThread implements Runnable {
|
||||
|
||||
private Logger logger = Logger.getLogger(NmsPortThread.class);
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Date now = new Date();
|
||||
Long nowLong = now.getTime();
|
||||
Integer interval = null;
|
||||
try {
|
||||
interval = Integer.parseInt(BaseAction.rb.getString("nms.report.interval"));
|
||||
} catch (Exception e) {
|
||||
interval = 300;
|
||||
}
|
||||
|
||||
ConnectionOracle connection = null;
|
||||
try {
|
||||
connection = ConnectionOracle.getConnection();
|
||||
NmsReportService service = new NmsReportService(connection);
|
||||
//ArrayList<Map<String, String>> nmsRuleInfo = service.getNmsPortInfo(nowLong, nowLong-interval);
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
} finally {
|
||||
if (connection != null) {
|
||||
connection.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
43
src/com/nms/thread/NmsRuleThread.java
Normal file
43
src/com/nms/thread/NmsRuleThread.java
Normal file
@@ -0,0 +1,43 @@
|
||||
package com.nms.thread;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
import nis.nms.util.BaseAction;
|
||||
import nis.nms.util.ConnectionOracle;
|
||||
import nis.nms.util.DateUtil;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.nms.thread.service.NmsReportService;
|
||||
|
||||
public class NmsRuleThread implements Runnable {
|
||||
|
||||
private Logger logger = Logger.getLogger(NmsRuleThread.class);
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Date now = new Date();
|
||||
Long nowLong = now.getTime();
|
||||
Integer interval = null;
|
||||
try {
|
||||
interval = Integer.parseInt(BaseAction.rb.getString("nms.report.interval"));
|
||||
} catch (Exception e) {
|
||||
interval = 300;
|
||||
}
|
||||
|
||||
ConnectionOracle connection = null;
|
||||
try {
|
||||
connection = ConnectionOracle.getConnection();
|
||||
NmsReportService service = new NmsReportService(connection);
|
||||
//ArrayList<Map<String, String>> nmsRuleInfo = service.getNmsRuleInfo(nowLong, nowLong-interval);
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
} finally {
|
||||
if (connection != null) {
|
||||
connection.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
104
src/com/nms/thread/NmsStatusThread.java
Normal file
104
src/com/nms/thread/NmsStatusThread.java
Normal file
@@ -0,0 +1,104 @@
|
||||
package com.nms.thread;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nms.thread.service.NmsReportService;
|
||||
|
||||
import net.sf.json.JSONObject;
|
||||
import nis.nms.util.BaseAction;
|
||||
import nis.nms.util.ConnectionOracle;
|
||||
import nis.nms.util.DateUtil;
|
||||
import nis.nms.util.HttpClientUtil;
|
||||
|
||||
public class NmsStatusThread implements Runnable {
|
||||
|
||||
private Logger logger = Logger.getLogger(NmsStatusThread.class);
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
String now = DateUtil.format.format(new Date());
|
||||
List<Map> results = new ArrayList<Map>();
|
||||
String setId = null;
|
||||
try {
|
||||
setId = BaseAction.rb.getString("nms.status.setId");
|
||||
} catch (Exception e) {
|
||||
setId = "7";
|
||||
}
|
||||
ConnectionOracle connection = null;
|
||||
try {
|
||||
connection = ConnectionOracle.getConnection();
|
||||
NmsReportService service = new NmsReportService(connection);
|
||||
|
||||
ArrayList<Map<String, String>> nmsReportInfo = service.getNmsStatusInfo(setId);
|
||||
Map<String, List<Map<String, String>>> tmp = new HashMap<String, List<Map<String, String>>>();
|
||||
tmp.put("unknown", new ArrayList<Map<String, String>>());
|
||||
for (Map<String, String> info : nmsReportInfo) {
|
||||
if (!StringUtil.isBlank(info.get("system_name"))) {
|
||||
if (tmp.containsKey(info.get("system_name"))) {
|
||||
tmp.get(info.get("system_name")).add(info);
|
||||
} else {
|
||||
List<Map<String, String>> l = new ArrayList<Map<String, String>>();
|
||||
l.add(info);
|
||||
tmp.put(info.get("system_name"), l);
|
||||
}
|
||||
} else {
|
||||
tmp.get("unknown").add(info);
|
||||
}
|
||||
}
|
||||
|
||||
for (String area : tmp.keySet()) {
|
||||
|
||||
List<Map<String, String>> l = tmp.get(area);
|
||||
if (l.size() > 0) {
|
||||
Map result = new HashMap();
|
||||
result.put("area", area);
|
||||
result.put("commitTime", now);
|
||||
result.put("total", l.size());
|
||||
|
||||
List<Map<String, String>> abnormalList = new ArrayList<Map<String, String>>();
|
||||
|
||||
int normal = 0;
|
||||
for (Map<String, String> m : l) {
|
||||
if ("1".equals(m.get("detectioned_state"))) {
|
||||
normal++;
|
||||
} else {
|
||||
Map<String, String> abnormal = new HashMap<String, String>();
|
||||
abnormal.put("hostName", m.get("host_name"));
|
||||
abnormal.put("ip", m.get("node_ip"));
|
||||
abnormalList.add(abnormal);
|
||||
}
|
||||
}
|
||||
|
||||
result.put("normal", normal);
|
||||
result.put("abnormal", l.size()-normal);
|
||||
if (abnormalList.size() > 0) {
|
||||
result.put("abnormalMachineList", abnormalList);
|
||||
}
|
||||
|
||||
results.add(result);
|
||||
}
|
||||
}
|
||||
Map<String, List<Map>> map = new HashMap<String, List<Map>>();
|
||||
map.put("trafficNmsServerList", results);
|
||||
HttpClientUtil httpUtil = new HttpClientUtil();
|
||||
JSONObject fromObject = JSONObject.fromObject(map);
|
||||
|
||||
httpUtil.post(BaseAction.rb.getString("nms.status.url"), fromObject.toString());
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
} finally {
|
||||
if (connection != null) {
|
||||
connection.close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
79
src/com/nms/thread/PingThread.java
Normal file
79
src/com/nms/thread/PingThread.java
Normal file
@@ -0,0 +1,79 @@
|
||||
package com.nms.thread;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.nms.thread.pool.ThreadConstants;
|
||||
|
||||
|
||||
public class PingThread implements Callable<Object> {
|
||||
private Logger logger = Logger.getLogger(DCHandShakeThread.class);
|
||||
private String ip;
|
||||
public PingThread(String ip){
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object call() throws Exception {
|
||||
String command = ""; // 命令语句
|
||||
int snum = 0, fnum = 0; // 发包成功和失败数
|
||||
|
||||
Process process = null;
|
||||
BufferedReader in = null; // 读取 Ping命令返回的信息
|
||||
try {
|
||||
|
||||
// 判断系统类型 win or Linux
|
||||
String system = (String) (System.getProperty("os.name")).toLowerCase();
|
||||
|
||||
if (system.toLowerCase().indexOf("win") != -1) {
|
||||
command += "ping -n 4 " + ip;
|
||||
} else if (system.toLowerCase().indexOf("linux") != -1) {
|
||||
command += "ping -c 4 " + ip;
|
||||
} else {
|
||||
command += "ping -w 4 " + ip;
|
||||
}
|
||||
|
||||
process = Runtime.getRuntime().exec(command);
|
||||
in = new BufferedReader(new InputStreamReader(process.getInputStream()));
|
||||
String line = null;
|
||||
long count = 4 + 10;
|
||||
// 最多多读10行
|
||||
while ((line = in.readLine()) != null && count != 0) {
|
||||
if ("".equals(line)) {
|
||||
continue;
|
||||
} // 空串跳过
|
||||
|
||||
line = line.toLowerCase();
|
||||
logger.debug("line:"+line);
|
||||
if (line.indexOf("ttl") > 0) { // 获得成功响应的数据
|
||||
count--; // 计数器自减1
|
||||
snum++; // 成功接收次数加1
|
||||
} else if (line.split(" ").length < 4) {
|
||||
count--; // 计数器自减1
|
||||
fnum++; // 失败接收次数加1
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("",e);
|
||||
}finally{
|
||||
if(in!=null){try {
|
||||
in.close();
|
||||
} catch (IOException e) {
|
||||
logger.error("",e);
|
||||
}}
|
||||
if(process!= null)process.destroy();
|
||||
process = null;
|
||||
}
|
||||
|
||||
if(snum>0){
|
||||
return ThreadConstants.HAND_SHAKE_RESULT_PING_SUCCESS;
|
||||
}else{
|
||||
return ThreadConstants.HAND_SHAKE_RESULT_PING_FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
44
src/com/nms/thread/common/EmailTypeConstants.java
Normal file
44
src/com/nms/thread/common/EmailTypeConstants.java
Normal file
@@ -0,0 +1,44 @@
|
||||
package com.nms.thread.common;
|
||||
|
||||
public class EmailTypeConstants {
|
||||
// private static final Object[][] type =new Object[][]{
|
||||
// {10,"监测信息恢复"},
|
||||
// {11,"监测信息异常"},
|
||||
// {12,"监测信息超时"},
|
||||
// {20,"主动告警异常"},
|
||||
// {21,"主动告警恢复"},
|
||||
// {31,"节点结果失败"},
|
||||
// {32,"任务状态变更"},
|
||||
// {40,"系统运行异常"},
|
||||
// {41,"系统运行恢复"},
|
||||
// };
|
||||
public static final int FLAG_SEND_LATER = 0;
|
||||
public static final int FLAG_SEND_ALLREADY = 1;
|
||||
public static final int FLAG_SEND_IMMEDIATELY = 2;
|
||||
|
||||
public static final int URGENT_IMMEDIATELY = 0;
|
||||
public static final int URGENT_LATER = 1;
|
||||
|
||||
|
||||
public static final int TYPE_DETECTION_INFO_RECOVER = 10;
|
||||
public static final String DESC_DETECTION_INFO_RECOVER = "i18n_EmailTypeConstants.content.DESC_DETECTION_INFO_RECOVER_n81i";
|
||||
public static final int TYPE_DETECTION_INFO_EXCEPTION = 11;
|
||||
public static final String DESC_DETECTION_INFO_EXCEPTION = "i18n_EmailTypeConstants.content.DESC_DETECTION_INFO_EXCEPTION_n81i";
|
||||
public static final int TYPE_DETECTION_INFO_TIMEOUT = 12;
|
||||
public static final String DESC_DETECTION_INFO_TIMEOUT = "i18n_EmailTypeConstants.content.DESC_DETECTION_INFO_TIMEOUT_n81i";
|
||||
|
||||
public static final int TYPE_ALARM_INFO_EXCEPTION = 20;
|
||||
public static final String DESC_ALARM_INFO_EXCEPTION = "i18n_EmailTypeConstants.content.DESC_ALARM_INFO_EXCEPTION_n81i";
|
||||
public static final int TYPE_ALARM_INFO_RECOVER = 21;
|
||||
public static final String DESC_ALARM_INFO_RECOVER = "i18n_EmailTypeConstants.content.DESC_ALARM_INFO_RECOVER_n81i";
|
||||
|
||||
public static final int TYPE_TASK_NODE_RESULT_ERROR = 31;
|
||||
public static final String DESC_TASK_NODE_RESULT_ERROR = "i18n_EmailTypeConstants.content.DESC_TASK_NODE_RESULT_ERROR_n81i";
|
||||
public static final int TYPE_TASK_STATE_CHANGE = 32;
|
||||
public static final String DESC_TASK_STATE_CHANGE = "i18n_EmailTypeConstants.content.DESC_TASK_STATE_CHANGE_n81i";
|
||||
|
||||
public static final int TYPE_SYSTEM_RUNNING_EXCEPTION = 40;
|
||||
public static final String DESC_SYSTEM_RUNNING_EXCEPTION = "i18n_EmailTypeConstants.content.DESC_SYSTEM_RUNNING_EXCEPTION_n81i";
|
||||
public static final int TYPE_SYSTEM_RUNNING_RECOVER = 41;
|
||||
public static final String DESC_SYSTEM_RUNNING_RECOVER = "i18n_EmailTypeConstants.content.DESC_SYSTEM_RUNNING_RECOVER_n81i";
|
||||
}
|
||||
47
src/com/nms/thread/common/TaskResources.java
Normal file
47
src/com/nms/thread/common/TaskResources.java
Normal file
@@ -0,0 +1,47 @@
|
||||
package com.nms.thread.common;
|
||||
|
||||
import java.util.ListResourceBundle;
|
||||
|
||||
public class TaskResources extends ListResourceBundle{
|
||||
static final Object[][] contents = new String[][]{
|
||||
// { "ms_1", "已创建" },
|
||||
// { "ms_2", "进行中" },
|
||||
// { "ms_3", "已完成" },
|
||||
// { "ms_30", "全部成功" },
|
||||
// { "ms_31", "全部失败" },
|
||||
// { "ms_32", "部分成功" },
|
||||
// { "ms_4", "未能执行" },
|
||||
// { "ms_5", "撤销准备" },
|
||||
// { "ms_6", "撤销开始" },
|
||||
// { "ms_7", "撤销完成" },
|
||||
// { "mt_1", "推送文件" },
|
||||
// { "mt_4", "命令执行" },
|
||||
// { "mt_6", "升级部署" },
|
||||
// { "loop_0", "非周期任务" },
|
||||
// { "loop_1", "周期任务" },
|
||||
// { "ec_1", "任务开始下发" },
|
||||
// { "ec_4", "任务开始下发" },
|
||||
// { "ec_6", "任务开始下发"}};
|
||||
{ "ms_1", "i18n_TaskResources.contents.ms_1_n81i" },
|
||||
{ "ms_2", "i18n_TaskResources.contents.ms_2_n81i" },
|
||||
{ "ms_3", "i18n_TaskResources.contents.ms_3_n81i" },
|
||||
{ "ms_30", "i18n_TaskResources.contents.ms_30_n81i" },
|
||||
{ "ms_31", "i18n_TaskResources.contents.ms_31_n81i" },
|
||||
{ "ms_32", "i18n_TaskResources.contents.ms_32_n81i" },
|
||||
{ "ms_4", "i18n_TaskResources.contents.ms_4_n81i" },
|
||||
{ "ms_5", "i18n_TaskResources.contents.ms_5_n81i" },
|
||||
{ "ms_6", "i18n_TaskResources.contents.ms_6_n81i" },
|
||||
{ "ms_7", "i18n_TaskResources.contents.ms_7_n81i" },
|
||||
{ "mt_1", "i18n_TaskResources.contents.mt_1_n81i" },
|
||||
{ "mt_4", "i18n_TaskResources.contents.mt_4_n81i" },
|
||||
{ "mt_6", "i18n_TaskResources.contents.mt_6_n81i" },
|
||||
{ "loop_0", "i18n_TaskResources.contents.loop_0_n81i" },
|
||||
{ "loop_1", "i18n_TaskResources.contents.loop_1_n81i" },
|
||||
{ "ec_1", "i18n_TaskResources.contents.ec_1_n81i" },
|
||||
{ "ec_4", "i18n_TaskResources.contents.ec_4_n81i" },
|
||||
{ "ec_6", "i18n_TaskResources.contents.ec_6_n81i"}};
|
||||
public Object[][] getContents() {
|
||||
return contents;
|
||||
}
|
||||
|
||||
}
|
||||
191
src/com/nms/thread/common/ThreadPoolCommon.java
Normal file
191
src/com/nms/thread/common/ThreadPoolCommon.java
Normal file
@@ -0,0 +1,191 @@
|
||||
package com.nms.thread.common;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.Semaphore;
|
||||
|
||||
import nis.nms.domains.NmsErrorInfo;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.nms.thread.pool.ThreadPoolConfig;
|
||||
|
||||
public class ThreadPoolCommon {
|
||||
private static Logger logger = Logger.getLogger(ThreadPoolCommon.class);
|
||||
public static ExecutorService service = Executors.newFixedThreadPool(ThreadPoolConfig.EXECUTOR_SOCKET_THREAD_SIZE); //非周期执行线程池
|
||||
public static ScheduledExecutorService scheduled = Executors.newScheduledThreadPool(ThreadPoolConfig.EXECUTOR_SCHEDULED_THREAD_SIZE); //定时周期执行线程池
|
||||
|
||||
public static Map<String, Future<?>> threadManagerMap = new HashMap<String, Future<?>>();
|
||||
|
||||
|
||||
public static Map<String,Integer[]> DCStatusMap = new HashMap<String,Integer[]>(); //
|
||||
// Map<dcip,int[]{state,nodeNum}> state(DC状态值1 通讯正常、0通讯失败、-1Ping失败、2通讯恢复[从非1状态恢复]) NodeNum(管理节点数量 0表示未分配节点,其他表示已分配节点)
|
||||
private static final Semaphore handShakeSemaphore = new Semaphore(5,true); //主动监测线程最大并发数
|
||||
|
||||
// public static List<NmsErrorInfo> nelist = new LinkedList<NmsErrorInfo>();
|
||||
private static boolean alarmDataFlag = true;
|
||||
private static final LinkedList<NmsErrorInfo> nmsErrorList1 = new LinkedList<NmsErrorInfo>();
|
||||
private static final LinkedList<NmsErrorInfo> nmsErrorList2 = new LinkedList<NmsErrorInfo>();
|
||||
|
||||
private static final Byte[] ALARM_DATA_LOCK = new Byte[0]; //告警数据锁
|
||||
/**
|
||||
* 改变存放监测数据的数据集合
|
||||
* @time Mar 7, 2012-2:15:38 PM
|
||||
*/
|
||||
public static void chengeNmsErrorFlag() {
|
||||
|
||||
alarmDataFlag = alarmDataFlag ? false : true;
|
||||
logger.info("监测数据缓存集合变更为集合"+(alarmDataFlag?"1":"2"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得 非存放状态的数据集合
|
||||
* @time Mar 7, 2012-3:18:11 PM
|
||||
* @return
|
||||
*/
|
||||
public static LinkedList<NmsErrorInfo> getNmsErrorList() {
|
||||
|
||||
if(!alarmDataFlag){logger.info("取到集合1的缓存告警数据 共"+nmsErrorList1.size());
|
||||
return nmsErrorList1;}
|
||||
else{logger.info("取到集合2的缓存告警数据 共"+nmsErrorList2.size());
|
||||
return nmsErrorList2;}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 将监测数据存入存放状态的数据集合中
|
||||
* @time Mar 7, 2012-3:18:58 PM
|
||||
* @param dsb
|
||||
*/
|
||||
public static void addNmsError(NmsErrorInfo nei) {
|
||||
|
||||
synchronized (ALARM_DATA_LOCK) {
|
||||
if(nei==null){
|
||||
logger.debug("告警数据 字节长度0 无需添加到监测数据集合");
|
||||
return;
|
||||
}
|
||||
|
||||
if(alarmDataFlag){logger.debug("告警数据 添加到 集合1");
|
||||
nmsErrorList1.add(nei);}
|
||||
else{logger.debug("告警数据 添加到 集合2");
|
||||
nmsErrorList2.add(nei); }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 将监测数据存入存放状态的数据集合中
|
||||
* @time Mar 7, 2012-3:18:58 PM
|
||||
* @param seqId
|
||||
* @param dsb
|
||||
*/
|
||||
public static void addAllAlarmDataList(List<NmsErrorInfo> neiList) {
|
||||
|
||||
synchronized (ALARM_DATA_LOCK) {
|
||||
if(neiList==null || neiList.size()==0l){
|
||||
logger.debug("告警数据 个数0 无需添加到监测数据集合");
|
||||
return;
|
||||
}
|
||||
if(alarmDataFlag){logger.debug("告警数据 添加到 集合1");
|
||||
nmsErrorList1.addAll(neiList);}
|
||||
else{logger.debug("告警数据 添加到 集合2");
|
||||
nmsErrorList2.addAll(neiList);}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 清空非存放状态的数据集合
|
||||
* @time Mar 7, 2012-3:19:30 PM
|
||||
* @param seqId
|
||||
* @param dsb
|
||||
*/
|
||||
public static void clearAlarmDataList() {
|
||||
|
||||
synchronized (ALARM_DATA_LOCK) {
|
||||
|
||||
getNmsErrorList().clear();
|
||||
logger.info("清空该集合");
|
||||
}
|
||||
|
||||
}
|
||||
/**
|
||||
* 获取握手信号
|
||||
* @time Nov 23, 2011-3:49:38 PM
|
||||
*/
|
||||
public static void acquireHandShakeSemaphore() {
|
||||
// synchronized (changeSemaphore) {
|
||||
try {
|
||||
handShakeSemaphore.acquire();
|
||||
logger.debug("变更锁 已申请 剩余可用许可:> "+handShakeSemaphore.availablePermits());
|
||||
} catch (Exception e) {
|
||||
logger.warn("Changed lock thread failed to apply for ,and it has been interrupted:"+Thread.currentThread().interrupted(),e);
|
||||
}
|
||||
// }
|
||||
}
|
||||
/**
|
||||
* 释放握手信号
|
||||
* @time Nov 25, 2011-1:24:08 PM
|
||||
*/
|
||||
public static void releaseHandShakeSemaphore() {
|
||||
// synchronized (changeSemaphore) {
|
||||
handShakeSemaphore.release();
|
||||
logger.debug("变更锁 已释放 当前可用许可:> "+handShakeSemaphore.availablePermits());
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 执行握手线程
|
||||
* 引入 申请信号,和释放信号 操作
|
||||
* @time Sep 12, 2012-4:28:45 PM
|
||||
* @param runnable
|
||||
*/
|
||||
public static void runHandShakeRunnable(final Object runnable){
|
||||
try {
|
||||
//-- 针对节点 进行文件推送
|
||||
acquireHandShakeSemaphore(); //申请监测信号
|
||||
|
||||
//-- 启动新线程 推送文件和任务信息
|
||||
final Future<?> future;
|
||||
if(runnable instanceof Runnable){
|
||||
future = service.submit((Runnable)runnable);
|
||||
}else if(runnable instanceof Callable){
|
||||
future = service.submit((Callable)runnable);
|
||||
}else {
|
||||
future = null;
|
||||
}
|
||||
|
||||
final String threadName = Thread.currentThread().getName();
|
||||
service.submit(new Runnable() {
|
||||
|
||||
public void run() {
|
||||
Thread.currentThread().setName(threadName);
|
||||
try {
|
||||
future.get();
|
||||
} catch (Exception e) {
|
||||
logger.error("",e);
|
||||
}finally{
|
||||
releaseHandShakeSemaphore();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("",e);
|
||||
releaseHandShakeSemaphore();
|
||||
}finally{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
static{
|
||||
// System.out.println("公共信息类加载");
|
||||
}
|
||||
}
|
||||
9
src/com/nms/thread/pool/ThreadConstants.java
Normal file
9
src/com/nms/thread/pool/ThreadConstants.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package com.nms.thread.pool;
|
||||
|
||||
public class ThreadConstants {
|
||||
public static final Integer HAND_SHAKE_RESULT_SOCKET_SUCCESS = 1;
|
||||
public static final Integer HAND_SHAKE_RESULT_SOCKET_FAILED = null;
|
||||
public static final Integer HAND_SHAKE_RESULT_PING_SUCCESS = 2;
|
||||
public static final Integer HAND_SHAKE_RESULT_PING_FAILED = 3;
|
||||
public static final Integer HAND_SHAKE_RESULT_UNKNOWN_FAILED = 4;
|
||||
}
|
||||
30
src/com/nms/thread/pool/ThreadPoolConfig.java
Normal file
30
src/com/nms/thread/pool/ThreadPoolConfig.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package com.nms.thread.pool;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import nis.nms.util.BaseAction;
|
||||
|
||||
public class ThreadPoolConfig {
|
||||
public static Integer EXECUTOR_SOCKET_THREAD_SIZE = StringUtils.isNotBlank(BaseAction.rb.getString("executor_socket_thread_size"))? Integer.parseInt(BaseAction.rb.getString("executor_socket_thread_size")): 10 ;// 线程池
|
||||
public static Integer EXECUTOR_SCHEDULED_THREAD_SIZE = StringUtils.isNotBlank(BaseAction.rb.getString("executor_scheduled_thread_size"))? Integer.parseInt(BaseAction.rb.getString("executor_scheduled_thread_size")): 5 ;// 线程池
|
||||
public static final String DC_HANDSHAKE_MANAGER = "DC_HANDSHAKE_MANAGER";
|
||||
public static final String DC_HANDSHAKE = "DC_HANDSHAKE";
|
||||
public static final Integer DC_HANDSHAKE_START = StringUtils.isNotBlank(BaseAction.rb.getString("dc.handshake.start"))? Integer.parseInt(BaseAction.rb.getString("dc.handshake.start")):30;
|
||||
public static final Integer DC_HANDSHAKE_PERIOD = StringUtils.isNotBlank(BaseAction.rb.getString("dc.handshake.period"))? Integer.parseInt(BaseAction.rb.getString("dc.handshake.period")):60*5;
|
||||
public static final String DETEC_TIMEOUT_CHECK_MANAGER = "DETEC_TIMEOUT_CHECK_MANAGER";
|
||||
public static final Integer DETEC_TIMEOUT_ALARM_PERIOD_TIMES =2;
|
||||
public static final Integer DETEC_TIMEOUT_CHECK_PERIOD = StringUtils.isNotBlank(BaseAction.rb.getString("detec.timeout.check.period"))? Integer.parseInt(BaseAction.rb.getString("detec.timeout.check.period")): 15*60;
|
||||
public static final Integer FLAG_DETEC_TIMEOUT = StringUtils.isNotBlank(BaseAction.rb.getString("flag_detec_timeout"))? Integer.parseInt(BaseAction.rb.getString("flag_detec_timeout")): 1;
|
||||
|
||||
public static final String MAILING_MANAGER = "errorInfoResoveManager"; //错误信息解析入库管理线程 标识, futureMap 中的Key值
|
||||
public static final String MAILING_THREAD = "errorInfoResove"; //错误信息解析入库操作线程 标识, futureMap 中的Key值
|
||||
public static final Integer MAILING_PERIOD = StringUtils.isNotBlank(BaseAction.rb.getString("mailing_period"))? Integer.parseInt(BaseAction.rb.getString("mailing_period")): 2*60; //邮件发送周期
|
||||
/**
|
||||
* 是否启用 监测入库控制线程
|
||||
*/
|
||||
public static final Integer FLAG_DETECT_INSERT_CONTROL = StringUtils.isNotBlank(BaseAction.rb.getString("flag.detect.insert.control"))? Integer.parseInt(BaseAction.rb.getString("flag.detect.insert.control")): 0;
|
||||
/**
|
||||
* 监测入库 控制轮询间隔
|
||||
*/
|
||||
public static final Integer DETECT_INSERT_CONTROL_PERIOD = StringUtils.isNotBlank(BaseAction.rb.getString("detect.insert.control.period"))? Integer.parseInt(BaseAction.rb.getString("detect.insert.control.period")): 60;
|
||||
}
|
||||
1240
src/com/nms/thread/service/EmailService.java
Normal file
1240
src/com/nms/thread/service/EmailService.java
Normal file
File diff suppressed because it is too large
Load Diff
87
src/com/nms/thread/service/NmsReportService.java
Normal file
87
src/com/nms/thread/service/NmsReportService.java
Normal file
@@ -0,0 +1,87 @@
|
||||
package com.nms.thread.service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import nis.nms.util.ConnectionOracle;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
public class NmsReportService {
|
||||
private final Logger logger = Logger.getLogger(NmsReportService.class);
|
||||
private ConnectionOracle dao = null;
|
||||
|
||||
public NmsReportService(ConnectionOracle dao){
|
||||
this.dao = dao;
|
||||
}
|
||||
|
||||
public ArrayList<Map<String, String>> getNmsStatusInfo(String setId) {
|
||||
|
||||
//detectioned_state=1时正常
|
||||
String sql = "select nt.node_ip, ds.host_name, din.detectioned_state, st.system_name "
|
||||
+ "from node_table nt "
|
||||
+ "left join detection_info_new din on din.SEQ_ID=nt.seq_id "
|
||||
+ "left join di_systeminfo ds on nt.SEQ_ID=ds.SEQ_ID "
|
||||
+ "left join system_table st ON nt.system_id=st.system_id "
|
||||
+ "where nt.node_state=0 AND din.DETECTION_SET_INFO_ID=" + setId + " "
|
||||
+ "group by nt.node_ip";
|
||||
ArrayList<String> fields = new ArrayList<String>();
|
||||
fields.add("node_ip");
|
||||
fields.add("host_name");
|
||||
fields.add("detectioned_state");
|
||||
fields.add("system_name");
|
||||
try {
|
||||
ArrayList<Map<String, String>> dbSelect = dao.dbSelect(sql, fields);
|
||||
return dbSelect;
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<Map<String, String>> getNmsRuleInfo(Long end, Long start) {
|
||||
String sql = "SELECT nt.node_ip, dr.ServiceIndex, dr.ServiceCode, dr.ServiceDesc, dr.agedTime, dr.ClientNum, dr.RefluxPort, dr.RuleNumber, dr.usedRuleNum, dr.leftRuleNum, dr.HitTotalNum, dr.DETECTIONED_STATE "
|
||||
+ "FROM di_rule dr "
|
||||
+ "LEFT JOIN node_table nt ON nt.seq_id=dr.seq_id "
|
||||
+ "WHERE nt.node_state=0 AND dr.data_check_time_digital<" + end + " AND dr.data_check_time_digital>=" + start;
|
||||
ArrayList<String> fields = new ArrayList<String>();
|
||||
fields.add("node_ip");
|
||||
fields.add("ServiceIndex");
|
||||
fields.add("ServiceCode");
|
||||
fields.add("ServiceDesc");
|
||||
fields.add("agedTime");
|
||||
fields.add("ClientNum");
|
||||
fields.add("RefluxPort");
|
||||
fields.add("RuleNumber");
|
||||
fields.add("usedRuleNum");
|
||||
fields.add("leftRuleNum");
|
||||
fields.add("HitTotalNum");
|
||||
fields.add("DETECTIONED_STATE");
|
||||
|
||||
try {
|
||||
ArrayList<Map<String, String>> dbSelect = dao.dbSelect(sql, fields);
|
||||
return dbSelect;
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<Map<String, String>> getNmsPortInfo(Long end, Long start) {
|
||||
String sql = "SELECT nt.node_ip, ds.* "
|
||||
+ "FROM di_switchport ds "
|
||||
+ "LEFT JOIN node_table nt ON nt.seq_id=ds.seq_id"
|
||||
+ "WHERE nt.node_state=0 AND ds.data_check_time_digital<" + end + " AND ds.data_check_time_digital>=" + start;
|
||||
ArrayList<String> fields = new ArrayList<String>();
|
||||
fields.add("node_ip");
|
||||
|
||||
try {
|
||||
ArrayList<Map<String, String>> dbSelect = dao.dbSelect(sql, fields);
|
||||
return dbSelect;
|
||||
} catch (Exception e) {
|
||||
logger.error(e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
1597
src/com/nms/thread/service/ThreadService.java
Normal file
1597
src/com/nms/thread/service/ThreadService.java
Normal file
File diff suppressed because it is too large
Load Diff
80
src/com/nms/thread/socket/SSLClient.java
Normal file
80
src/com/nms/thread/socket/SSLClient.java
Normal file
@@ -0,0 +1,80 @@
|
||||
package com.nms.thread.socket;
|
||||
import nis.nms.util.BaseAction;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.nms.thread.common.ThreadPoolCommon;
|
||||
import com.nms.thread.pool.ThreadConstants;
|
||||
import com.nms.thread.utils.ssl.SSLSocketCallable;
|
||||
|
||||
/**
|
||||
* 安全通讯的客户端
|
||||
*/
|
||||
|
||||
public class SSLClient extends SSLSocketCallable {
|
||||
private Logger logger = Logger.getLogger(SSLClient.class);
|
||||
private String cmd = null;
|
||||
private String content = null;
|
||||
|
||||
public static final String HAND_SHAKE_DC = "char:handshake";
|
||||
public static final String UPDATE_CONFIG_DC = "char:updateConfig";
|
||||
public static final String INSERT_DETECT = "char:insertDetect";
|
||||
public static final String RELEASE_DETECT = "char:releaseDetect";
|
||||
//dc server 端口
|
||||
public static final Integer DC_PORT = Integer.parseInt(BaseAction.rb.getString("common.single.socket.port"));
|
||||
|
||||
public SSLClient(String ip,String cmd,String content){
|
||||
super(ip,Integer.parseInt(BaseAction.rb.getString("common.single.socket.port")));
|
||||
this.cmd = cmd;
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public SSLClient(String ip,int port,String cmd){
|
||||
super(ip, port);
|
||||
this.cmd = cmd;
|
||||
}
|
||||
|
||||
public SSLClient(String ip, int port)throws Exception {
|
||||
super(ip, port);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Object toDo() throws Exception {
|
||||
// Thread.currentThread().setName("通信线程 TO:>"+ip);
|
||||
Thread.currentThread().setName("Communication Thread TO:>"+ip);
|
||||
logger.debug("通讯命令:>"+cmd);
|
||||
if(HAND_SHAKE_DC.equals(cmd)){
|
||||
/*通讯内容 */
|
||||
sendMessage(cmd);
|
||||
String str = receiveMessage();
|
||||
return ThreadConstants.HAND_SHAKE_RESULT_SOCKET_SUCCESS;
|
||||
}else if(UPDATE_CONFIG_DC.equals(cmd)){
|
||||
sendMessage(cmd);
|
||||
receiveMessage();
|
||||
sendMessage(content);
|
||||
receiveMessage();
|
||||
return 1;
|
||||
}else if(INSERT_DETECT.equalsIgnoreCase(cmd)){
|
||||
/**
|
||||
* 通知dc 入库 监测数据
|
||||
*/
|
||||
sendMessage(cmd);
|
||||
String msg = receiveMessage();//当前缓存 监测内容 条数
|
||||
Integer size = Integer.valueOf(msg);//-1:dc升级中,0 :没有监测数据,>0:监测数据条数,-2监测数据上传web -4 dc主动入库
|
||||
return size;
|
||||
}else if(RELEASE_DETECT.equalsIgnoreCase(cmd)){
|
||||
/**
|
||||
* 通知 dc 取消 入库监测数据
|
||||
*/
|
||||
sendMessage(cmd);
|
||||
String msg = receiveMessage();
|
||||
logger.debug(RELEASE_DETECT + " -> " + msg);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void main(String [] args){
|
||||
SSLClient client = new SSLClient("10.0.6.113",HAND_SHAKE_DC,null);
|
||||
ThreadPoolCommon.service.submit(client);
|
||||
}
|
||||
}
|
||||
154
src/com/nms/thread/socket/SSLServer.java
Normal file
154
src/com/nms/thread/socket/SSLServer.java
Normal file
@@ -0,0 +1,154 @@
|
||||
package com.nms.thread.socket;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.Socket;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import nis.nms.util.BaseAction;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.filefilter.FalseFileFilter;
|
||||
import org.apache.commons.io.filefilter.PrefixFileFilter;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import com.nms.thread.DetectInsertThread;
|
||||
import com.nms.thread.utils.ssl.SSLSocketRunnable;
|
||||
import com.socket.utils.FileComment;
|
||||
|
||||
public class SSLServer extends SSLSocketRunnable{
|
||||
private String uploadPath ;
|
||||
private String snmpDir ;
|
||||
|
||||
public static final String TYPE_MISSION = "1";
|
||||
public static final String TYPE_SNMP_CLASS = "2";
|
||||
public static final String TYPE_SNMP_MIB = "3";
|
||||
|
||||
public SSLServer(Socket client,String uploadPath,String snmpDir) {
|
||||
super(client);
|
||||
this.uploadPath = uploadPath;
|
||||
this.snmpDir = snmpDir;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected void toDo() throws Exception {
|
||||
String cmd = this.receiveMessage();
|
||||
System.out.println("cmd "+cmd);
|
||||
String uploadPath = this.uploadPath;
|
||||
//- 断点下载MissionFiles
|
||||
|
||||
// if("byte:bpDownloadFile".equals(cmd)){
|
||||
if(StringUtils.isNotEmpty(cmd) && cmd.startsWith("byte:bpDownloadFile")){
|
||||
this.sendMessage(SUCCESS);
|
||||
String[] cmds = cmd.split(":");
|
||||
if(cmds.length>2){
|
||||
if(cmds[2].equals(TYPE_MISSION)){ //download MissionFile
|
||||
uploadPath = this.uploadPath;
|
||||
}else if(cmds[2].equals(TYPE_SNMP_CLASS)){ //download snmp jarFile
|
||||
uploadPath = this.snmpDir;
|
||||
}else if(cmds[2].equals(TYPE_SNMP_MIB)){ //download snmp mibFile
|
||||
uploadPath = this.snmpDir;
|
||||
}
|
||||
}
|
||||
List<FileComment> fileList = (List<FileComment>) this.receiveObject();
|
||||
for(FileComment fileInfo : fileList){
|
||||
fileInfo.setFileName(uploadPath+ fileInfo.getFileName());
|
||||
pl("DownloadPath "+fileInfo.getFileName());
|
||||
}
|
||||
bpSendFileByBathMD5(fileList);
|
||||
this.receiveMessage();
|
||||
}
|
||||
|
||||
//- 断点上传
|
||||
else if("byte:bpUploadFiles".equals(cmd)){
|
||||
this.sendMessage(SUCCESS);
|
||||
bpReceiveFileByBath(uploadPath);
|
||||
this.sendMessage(SUCCESS);
|
||||
}
|
||||
//- server握手请求
|
||||
else if("char:getLocalIp".equals(cmd)){
|
||||
this.sendMessage(socket.getInetAddress().getHostAddress());
|
||||
pl(socket.getInetAddress().getHostAddress());
|
||||
this.receiveMessage();
|
||||
}
|
||||
|
||||
/**
|
||||
* server请求下载第三方监测脚本
|
||||
* 根据脚本文件名下发单个脚本
|
||||
*/
|
||||
else if("char:downloadPluginScript".equalsIgnoreCase(cmd)) {
|
||||
this.sendMessage(SUCCESS);
|
||||
String prefixNames = this.receiveMessage();
|
||||
String uploadFilePath = new String(BaseAction.rb.getString("uploadServerPath"));
|
||||
File pluginScriptDir = new File(uploadFilePath, "pluginDetecScript");
|
||||
Collection<?> files = FileUtils.listFiles(pluginScriptDir,
|
||||
new PrefixFileFilter(prefixNames.split(",")), FalseFileFilter.FALSE);
|
||||
if(files.isEmpty()) {
|
||||
this.sendMessage(FAIL);
|
||||
} else {
|
||||
this.sendMessage(SUCCESS);
|
||||
this.receiveMessage();
|
||||
List<File> fileList = new ArrayList<File>();
|
||||
fileList.addAll((Collection<? extends File>) files);
|
||||
this.bpSendFileByBath(fileList, pluginScriptDir.getCanonicalPath());
|
||||
}
|
||||
}
|
||||
/**
|
||||
* dc 释放 监测数据入库锁
|
||||
*/
|
||||
else if("char:releaseDetect".equalsIgnoreCase(cmd)){
|
||||
this.sendMessage(SUCCESS);
|
||||
String ip = socket.getInetAddress().getHostAddress();
|
||||
String cip = DetectInsertThread.getCurrentDc();
|
||||
if(cip != null && ip.equalsIgnoreCase(cip)){
|
||||
DetectInsertThread.release();
|
||||
logger.info(ip + " char:releaseDetect 监测数据入库完成");
|
||||
}else{
|
||||
logger.debug("监测数据入库锁不一致:currentDc: "+ cip + ",requestIp : " + ip);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
private boolean bpUpLoadFiles(){
|
||||
boolean flag = true;
|
||||
//- 获取上传文件参数 fileNames 字符串数组 Json信息
|
||||
String params = this.receiveMessage();
|
||||
System.out.println(""+params);
|
||||
//- JSON解析 并循环
|
||||
List<String> upFName = new LinkedList<String>();
|
||||
JSONArray fileNames = JSONArray.fromObject(params);
|
||||
|
||||
if(fileNames!= null && fileNames.size()>0 ){
|
||||
for(int i = 0; i < fileNames.size() ; i++){
|
||||
String fileName = (String)fileNames.get(i);
|
||||
File file = new File(uploadPath+fileName);
|
||||
if(!file.exists()){
|
||||
upFName.add(fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.sendMessage(JSONArray.fromObject(upFName).toString());
|
||||
|
||||
String msg = this.receiveMessage();
|
||||
try {
|
||||
while (SUCCESS.equals(msg)) {
|
||||
this.sendMessage(SUCCESS);
|
||||
String fn = this.receiveMessage();
|
||||
this.sendMessage(SUCCESS);
|
||||
|
||||
pl("" + fn + "文件接收开始");
|
||||
logger.debug("" + fn + "文件接收开始");
|
||||
bpReceiveFile(uploadPath+fn);
|
||||
this.sendMessage(SUCCESS);
|
||||
msg = this.receiveMessage();
|
||||
}
|
||||
}catch (Exception e) {
|
||||
logger.error(ExceptionPrintUtils.printExceptionStack(e));
|
||||
}
|
||||
return flag;
|
||||
}*/
|
||||
}
|
||||
106
src/com/nms/thread/socket/SocketClientServeice.java
Normal file
106
src/com/nms/thread/socket/SocketClientServeice.java
Normal file
@@ -0,0 +1,106 @@
|
||||
package com.nms.thread.socket;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import javax.net.ssl.SSLSocket;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
|
||||
import com.nms.thread.utils.ssl.SocketUtils;
|
||||
|
||||
import nis.nms.util.BaseAction;
|
||||
import nis.nms.util.ExceptionPrintUtils;
|
||||
|
||||
/**
|
||||
* 安全通讯的客户端
|
||||
*/
|
||||
|
||||
public class SocketClientServeice extends SocketUtils {
|
||||
|
||||
public SocketClientServeice(String ip)throws Exception {
|
||||
super(ip,Integer.parseInt(BaseAction.rb.getString("common.single.socket.port")));
|
||||
}
|
||||
public SocketClientServeice(String ip, int port)throws Exception {
|
||||
super(ip, port);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建通讯
|
||||
*
|
||||
* @time Feb 29, 2012-5:39:01 PM
|
||||
*/
|
||||
private void init() throws Exception {
|
||||
logger.debug("目标通讯:>" + ip + " 创建开始" );
|
||||
try {
|
||||
|
||||
// -- create SocketFactory
|
||||
SSLSocketFactory ssf = sSLContext.getSocketFactory();
|
||||
|
||||
// -- create socket
|
||||
socket = (SSLSocket) ssf.createSocket(ip, port);
|
||||
this.in = socket.getInputStream();
|
||||
this.out = socket.getOutputStream();
|
||||
logger.debug("create socket success.");
|
||||
|
||||
//2014-1-23 hyx 如果建立socket成功,但是startHandshake握手失败,且未设置超时时间时,则会一直阻塞
|
||||
socket.setSoTimeout(1000*1000); //1000秒
|
||||
|
||||
// -- handshake 握手
|
||||
((SSLSocket) socket).startHandshake();
|
||||
logger.debug("handshake success.");
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
logger.warn("Target communication:>" + ip + " create failure" + ExceptionPrintUtils.printExceptionStack(e));
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
public void sendInfoToServer(String cmd,String str) throws Exception{
|
||||
try {logger.debug("sendInfoToServer begin:"+str );
|
||||
init();
|
||||
sendMessage(cmd);
|
||||
receiveMessage();
|
||||
sendMessage(str);
|
||||
receiveMessage();
|
||||
logger.debug("sendInfoToServer end:"+str );
|
||||
// } catch (Exception e) {
|
||||
// logger.debug("sendInfoToServer 异常:"+str );
|
||||
// throw e;
|
||||
} finally {
|
||||
close();
|
||||
}
|
||||
}
|
||||
public String sendInfoToServer2(String cmd,String str) throws Exception{
|
||||
try {logger.debug("sendInfoToServer begin:"+str );
|
||||
init();
|
||||
sendMessage(cmd);
|
||||
receiveMessage();
|
||||
sendMessage(str);
|
||||
String result = receiveMessage();
|
||||
sendMessage(SUCCESS);
|
||||
logger.debug("sendInfoToServer end:"+str );
|
||||
return result;
|
||||
// } catch (Exception e) {
|
||||
// logger.debug("sendInfoToServer 异常:"+str );
|
||||
// throw e;
|
||||
} finally {
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
public String sendFilesToServer(String cmd, List<File> files) throws Exception {
|
||||
try {
|
||||
logger.debug("sendFilesToServer begin");
|
||||
init();
|
||||
sendMessage(cmd);
|
||||
receiveMessage();
|
||||
this.bpSendFileByBath(files, files.get(0).getParent());
|
||||
String result = receiveMessage();
|
||||
sendMessage(SUCCESS);
|
||||
logger.debug("sendFilesToServer end");
|
||||
return result;
|
||||
} finally {
|
||||
close();
|
||||
}
|
||||
}
|
||||
}
|
||||
330
src/com/nms/thread/utils/SQLExecuteTimeoutException.java
Normal file
330
src/com/nms/thread/utils/SQLExecuteTimeoutException.java
Normal file
@@ -0,0 +1,330 @@
|
||||
package com.nms.thread.utils;
|
||||
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.SQLException;
|
||||
import java.util.Iterator;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
|
||||
|
||||
public class SQLExecuteTimeoutException extends SQLException implements Iterable<Throwable>{
|
||||
|
||||
/**
|
||||
* Constructs a <code>SQLExecuteTimeoutExeception</code> object with a given
|
||||
* <code>reason</code>, <code>SQLState</code> and
|
||||
* <code>vendorCode</code>.
|
||||
*
|
||||
* The <code>cause</code> is not initialized, and may subsequently be
|
||||
* initialized by a call to the
|
||||
* {@link Throwable#initCause(java.lang.Throwable)} method.
|
||||
* <p>
|
||||
* @param reason a description of the exception
|
||||
* @param SQLState an XOPEN or SQL:2003 code identifying the exception
|
||||
* @param vendorCode a database vendor-specific exception code
|
||||
*/
|
||||
public SQLExecuteTimeoutException(String reason, String SQLState, int vendorCode) {
|
||||
super(reason);
|
||||
this.SQLState = SQLState;
|
||||
this.vendorCode = vendorCode;
|
||||
// if (!(this instanceof SQLWarning)) {
|
||||
if (DriverManager.getLogWriter() != null) {
|
||||
DriverManager.println("SQLState(" + SQLState +
|
||||
") vendor code(" + vendorCode + ")");
|
||||
printStackTrace(DriverManager.getLogWriter());
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructs a <code>SQLExecuteTimeoutExeception</code> object with a given
|
||||
* <code>reason</code> and <code>SQLState</code>.
|
||||
*
|
||||
* The <code>cause</code> is not initialized, and may subsequently be
|
||||
* initialized by a call to the
|
||||
* {@link Throwable#initCause(java.lang.Throwable)} method. The vendor code
|
||||
* is initialized to 0.
|
||||
* <p>
|
||||
* @param reason a description of the exception
|
||||
* @param SQLState an XOPEN or SQL:2003 code identifying the exception
|
||||
*/
|
||||
public SQLExecuteTimeoutException(String reason, String SQLState) {
|
||||
super(reason);
|
||||
this.SQLState = SQLState;
|
||||
this.vendorCode = 0;
|
||||
// if (!(this instanceof SQLWarning)) {
|
||||
if (DriverManager.getLogWriter() != null) {
|
||||
printStackTrace(DriverManager.getLogWriter());
|
||||
DriverManager.println("SQLExecuteTimeoutExeception: SQLState(" + SQLState + ")");
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>SQLExecuteTimeoutExeception</code> object with a given
|
||||
* <code>reason</code>. The <code>SQLState</code> is initialized to
|
||||
* <code>null</code> and the vender code is initialized to 0.
|
||||
*
|
||||
* The <code>cause</code> is not initialized, and may subsequently be
|
||||
* initialized by a call to the
|
||||
* {@link Throwable#initCause(java.lang.Throwable)} method.
|
||||
* <p>
|
||||
* @param reason a description of the exception
|
||||
*/
|
||||
public SQLExecuteTimeoutException(String reason) {
|
||||
super(reason);
|
||||
this.SQLState = null;
|
||||
this.vendorCode = 0;
|
||||
// if (!(this instanceof SQLWarning)) {
|
||||
if (DriverManager.getLogWriter() != null) {
|
||||
printStackTrace(DriverManager.getLogWriter());
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>SQLExecuteTimeoutExeception</code> object.
|
||||
* The <code>reason</code>, <code>SQLState</code> are initialized
|
||||
* to <code>null</code> and the vendor code is initialized to 0.
|
||||
*
|
||||
* The <code>cause</code> is not initialized, and may subsequently be
|
||||
* initialized by a call to the
|
||||
* {@link Throwable#initCause(java.lang.Throwable)} method.
|
||||
* <p>
|
||||
*/
|
||||
public SQLExecuteTimeoutException() {
|
||||
super();
|
||||
this.SQLState = null;
|
||||
this.vendorCode = 0;
|
||||
// if (!(this instanceof SQLWarning)) {
|
||||
if (DriverManager.getLogWriter() != null) {
|
||||
printStackTrace(DriverManager.getLogWriter());
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>SQLExecuteTimeoutExeception</code> object with a given
|
||||
* <code>cause</code>.
|
||||
* The <code>SQLState</code> is initialized
|
||||
* to <code>null</code> and the vendor code is initialized to 0.
|
||||
* The <code>reason</code> is initialized to <code>null</code> if
|
||||
* <code>cause==null</code> or to <code>cause.toString()</code> if
|
||||
* <code>cause!=null</code>.
|
||||
* <p>
|
||||
* @param cause the underlying reason for this <code>SQLExecuteTimeoutExeception</code>
|
||||
* (which is saved for later retrieval by the <code>getCause()</code> method);
|
||||
* may be null indicating the cause is non-existent or unknown.
|
||||
* @since 1.6
|
||||
*/
|
||||
public SQLExecuteTimeoutException(Throwable cause) {
|
||||
super(cause);
|
||||
|
||||
// if (!(this instanceof SQLWarning)) {
|
||||
if (DriverManager.getLogWriter() != null) {
|
||||
printStackTrace(DriverManager.getLogWriter());
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>SQLExecuteTimeoutExeception</code> object with a given
|
||||
* <code>reason</code> and <code>cause</code>.
|
||||
* The <code>SQLState</code> is initialized to <code>null</code>
|
||||
* and the vendor code is initialized to 0.
|
||||
* <p>
|
||||
* @param reason a description of the exception.
|
||||
* @param cause the underlying reason for this <code>SQLExecuteTimeoutExeception</code>
|
||||
* (which is saved for later retrieval by the <code>getCause()</code> method);
|
||||
* may be null indicating the cause is non-existent or unknown.
|
||||
* @since 1.6
|
||||
*/
|
||||
public SQLExecuteTimeoutException(String reason, Throwable cause) {
|
||||
super(reason,cause);
|
||||
|
||||
// if (!(this instanceof SQLWarning)) {
|
||||
if (DriverManager.getLogWriter() != null) {
|
||||
printStackTrace(DriverManager.getLogWriter());
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>SQLExecuteTimeoutExeception</code> object with a given
|
||||
* <code>reason</code>, <code>SQLState</code> and <code>cause</code>.
|
||||
* The vendor code is initialized to 0.
|
||||
* <p>
|
||||
* @param reason a description of the exception.
|
||||
* @param sqlState an XOPEN or SQL:2003 code identifying the exception
|
||||
* @param cause the underlying reason for this <code>SQLExecuteTimeoutExeception</code>
|
||||
* (which is saved for later retrieval by the
|
||||
* <code>getCause()</code> method); may be null indicating
|
||||
* the cause is non-existent or unknown.
|
||||
* @since 1.6
|
||||
*/
|
||||
public SQLExecuteTimeoutException(String reason, String sqlState, Throwable cause) {
|
||||
super(reason,cause);
|
||||
|
||||
this.SQLState = sqlState;
|
||||
this.vendorCode = 0;
|
||||
// if (!(this instanceof SQLWarning)) {
|
||||
if (DriverManager.getLogWriter() != null) {
|
||||
printStackTrace(DriverManager.getLogWriter());
|
||||
DriverManager.println("SQLState(" + SQLState + ")");
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a <code>SQLExecuteTimeoutExeception</code> object with a given
|
||||
* <code>reason</code>, <code>SQLState</code>, <code>vendorCode</code>
|
||||
* and <code>cause</code>.
|
||||
* <p>
|
||||
* @param reason a description of the exception
|
||||
* @param sqlState an XOPEN or SQL:2003 code identifying the exception
|
||||
* @param vendorCode a database vendor-specific exception code
|
||||
* @param cause the underlying reason for this <code>SQLExecuteTimeoutExeception</code>
|
||||
* (which is saved for later retrieval by the <code>getCause()</code> method);
|
||||
* may be null indicating the cause is non-existent or unknown.
|
||||
* @since 1.6
|
||||
*/
|
||||
public SQLExecuteTimeoutException(String reason, String sqlState, int vendorCode, Throwable cause) {
|
||||
super(reason,cause);
|
||||
|
||||
this.SQLState = sqlState;
|
||||
this.vendorCode = vendorCode;
|
||||
// if (!(this instanceof SQLWarning)) {
|
||||
if (DriverManager.getLogWriter() != null) {
|
||||
DriverManager.println("SQLState(" + SQLState +
|
||||
") vendor code(" + vendorCode + ")");
|
||||
printStackTrace(DriverManager.getLogWriter());
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the SQLState for this <code>SQLExecuteTimeoutExeception</code> object.
|
||||
*
|
||||
* @return the SQLState value
|
||||
*/
|
||||
public String getSQLState() {
|
||||
return (SQLState);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the vendor-specific exception code
|
||||
* for this <code>SQLExecuteTimeoutExeception</code> object.
|
||||
*
|
||||
* @return the vendor's error code
|
||||
*/
|
||||
public int getErrorCode() {
|
||||
return (vendorCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the exception chained to this
|
||||
* <code>SQLExecuteTimeoutExeception</code> object by setNextException(SQLExecuteTimeoutExeception ex).
|
||||
*
|
||||
* @return the next <code>SQLExecuteTimeoutExeception</code> object in the chain;
|
||||
* <code>null</code> if there are none
|
||||
* @see #setNextException
|
||||
*/
|
||||
public SQLExecuteTimeoutException getNextException() {
|
||||
return (next);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an <code>SQLExecuteTimeoutExeception</code> object to the end of the chain.
|
||||
*
|
||||
* @param ex the new exception that will be added to the end of
|
||||
* the <code>SQLExecuteTimeoutExeception</code> chain
|
||||
* @see #getNextException
|
||||
*/
|
||||
public void setNextException(SQLExecuteTimeoutException ex) {
|
||||
|
||||
SQLExecuteTimeoutException current = this;
|
||||
for(;;) {
|
||||
SQLExecuteTimeoutException next=current.next;
|
||||
if (next != null) {
|
||||
current = next;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (nextUpdater.compareAndSet(current,null,ex)) {
|
||||
return;
|
||||
}
|
||||
current=current.next;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an iterator over the chained SQLExecuteTimeoutExeceptions. The iterator will
|
||||
* be used to iterate over each SQLExecuteTimeoutExeception and its underlying cause
|
||||
* (if any).
|
||||
*
|
||||
* @return an iterator over the chained SQLExecuteTimeoutExeceptions and causes in the proper
|
||||
* order
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
public Iterator<Throwable> iterator() {
|
||||
|
||||
return new Iterator<Throwable>() {
|
||||
|
||||
SQLExecuteTimeoutException firstException = SQLExecuteTimeoutException.this;
|
||||
SQLExecuteTimeoutException nextException = firstException.getNextException();
|
||||
Throwable cause = firstException.getCause();
|
||||
|
||||
public boolean hasNext() {
|
||||
if(firstException != null || nextException != null || cause != null)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public Throwable next() {
|
||||
Throwable throwable = null;
|
||||
if(firstException != null){
|
||||
throwable = firstException;
|
||||
firstException = null;
|
||||
}
|
||||
else if(cause != null){
|
||||
throwable = cause;
|
||||
cause = cause.getCause();
|
||||
}
|
||||
else if(nextException != null){
|
||||
throwable = nextException;
|
||||
cause = nextException.getCause();
|
||||
nextException = nextException.getNextException();
|
||||
}
|
||||
else
|
||||
throw new NoSuchElementException();
|
||||
return throwable;
|
||||
}
|
||||
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @serial
|
||||
*/
|
||||
private String SQLState;
|
||||
|
||||
/**
|
||||
* @serial
|
||||
*/
|
||||
private int vendorCode;
|
||||
|
||||
/**
|
||||
* @serial
|
||||
*/
|
||||
private volatile SQLExecuteTimeoutException next;
|
||||
|
||||
private static final AtomicReferenceFieldUpdater<SQLExecuteTimeoutException,SQLExecuteTimeoutException> nextUpdater =
|
||||
AtomicReferenceFieldUpdater.newUpdater(SQLExecuteTimeoutException.class,SQLExecuteTimeoutException.class,"next");
|
||||
|
||||
private static final long serialVersionUID = 2135244094396331484L;
|
||||
}
|
||||
112
src/com/nms/thread/utils/ssl/SSLSocketCallable.java
Normal file
112
src/com/nms/thread/utils/ssl/SSLSocketCallable.java
Normal file
@@ -0,0 +1,112 @@
|
||||
package com.nms.thread.utils.ssl;
|
||||
|
||||
import java.net.Socket;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
import javax.net.ssl.SSLSocket;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
|
||||
import nis.nms.util.ExceptionPrintUtils;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
/**
|
||||
* SSL 通讯 工具类
|
||||
* @date Feb 29, 2012 10:05:50 AM
|
||||
* @author ZhangGang
|
||||
*
|
||||
*/
|
||||
public abstract class SSLSocketCallable extends SocketUtils implements Callable<Object>{
|
||||
|
||||
/**
|
||||
* 通讯创建
|
||||
* @param ip 目标主机IP
|
||||
* @param port 目标主机端口
|
||||
* @throws Exception
|
||||
*/
|
||||
public SSLSocketCallable(String ip,Integer port){
|
||||
super(ip, port);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通讯创建
|
||||
* @param client 目标通讯实例
|
||||
*/
|
||||
public SSLSocketCallable(Socket client) {
|
||||
super(client);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通讯线程执行方法 默认格式
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public Object call(){
|
||||
|
||||
Object obj = null; //返回对象
|
||||
|
||||
//- 校验 是否创建新通讯连接
|
||||
if(socket==null && (StringUtils.isNotEmpty(ip) && port != null)){
|
||||
|
||||
try {
|
||||
|
||||
//-- create SocketFactory
|
||||
SSLSocketFactory ssf = sSLContext.getSocketFactory();
|
||||
|
||||
//-- create socket
|
||||
socket=(SSLSocket)ssf.createSocket(ip,port);
|
||||
logger.debug("create socket success.");
|
||||
|
||||
//2014-1-23 hyx 如果建立socket成功,但是startHandshake握手失败,且未设置超时时间时,则会一直阻塞
|
||||
socket.setSoTimeout(1000*1000); //1000秒
|
||||
|
||||
//-- handshake 握手
|
||||
((SSLSocket) socket).startHandshake();
|
||||
logger.debug("handshake success.");
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
logger.warn("Target communication:>"+ip+" create failure "+e.getMessage());
|
||||
close();
|
||||
return obj;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//- socket 不为空 执行通讯操作
|
||||
if(socket!=null){
|
||||
|
||||
try {
|
||||
|
||||
//-- 获取通讯IO流
|
||||
out = socket.getOutputStream();
|
||||
in = socket.getInputStream();
|
||||
|
||||
socket.setSoTimeout(1000*1000); //1000秒
|
||||
//-- 自定义通讯操作
|
||||
obj = toDo();
|
||||
|
||||
}catch (Exception e) {
|
||||
logger.error("Communicating Exception "+e.getMessage());
|
||||
} finally {
|
||||
|
||||
logger.info("--- 通信关闭 ---");
|
||||
close();
|
||||
}
|
||||
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* 待实现的通信操作
|
||||
* @time Aug 28, 2011-9:04:46 PM
|
||||
* @param out
|
||||
* @param in
|
||||
* @throws Exception
|
||||
*/
|
||||
|
||||
protected abstract Object toDo()throws Exception;
|
||||
|
||||
|
||||
}
|
||||
107
src/com/nms/thread/utils/ssl/SSLSocketRunnable.java
Normal file
107
src/com/nms/thread/utils/ssl/SSLSocketRunnable.java
Normal file
@@ -0,0 +1,107 @@
|
||||
package com.nms.thread.utils.ssl;
|
||||
|
||||
import java.net.Socket;
|
||||
|
||||
import javax.net.ssl.SSLSocket;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
|
||||
import nis.nms.util.ExceptionPrintUtils;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
/**
|
||||
* SSL 通讯 工具类
|
||||
* @date Feb 29, 2012 10:05:50 AM
|
||||
* @author ZhangGang
|
||||
*
|
||||
*/
|
||||
public abstract class SSLSocketRunnable extends SocketUtils implements Runnable{
|
||||
|
||||
|
||||
/**
|
||||
* 通讯成功标识
|
||||
*/
|
||||
protected static final String SOCKET_SUCCESS_FLAG ="success"; //成功通信
|
||||
/**
|
||||
* 通讯失败标识
|
||||
*/
|
||||
protected static final String SOCKET_FAIL_FLAG ="fail"; //失败通信
|
||||
|
||||
/**
|
||||
* 通讯创建
|
||||
* @param client 目标通讯实例
|
||||
*/
|
||||
public SSLSocketRunnable(Socket client) {
|
||||
super(client);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通讯线程执行方法 默认格式
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
//- 校验 是否创建新通讯连接
|
||||
if(socket==null && (StringUtils.isNotEmpty(ip) && port != null)){
|
||||
|
||||
try {
|
||||
|
||||
//-- create SocketFactory
|
||||
SSLSocketFactory ssf = sSLContext.getSocketFactory();
|
||||
|
||||
//-- create socket
|
||||
socket=(SSLSocket)ssf.createSocket(ip,port);
|
||||
logger.debug("create socket success.");
|
||||
|
||||
//2014-1-23 hyx 如果建立socket成功,但是startHandshake握手失败,且未设置超时时间时,则会一直阻塞
|
||||
socket.setSoTimeout(1000*1000); //1000秒
|
||||
|
||||
//-- handshake 握手
|
||||
((SSLSocket) socket).startHandshake();
|
||||
logger.debug("handshake success.");
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
logger.warn("Target communication:>"+ip+" create failure"+ExceptionPrintUtils.printExceptionStack(e));
|
||||
close();
|
||||
return ;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//- socket 不为空 执行通讯操作
|
||||
if(socket!=null){
|
||||
|
||||
try {
|
||||
|
||||
//-- 获取通讯IO流
|
||||
out = socket.getOutputStream();
|
||||
in = socket.getInputStream();
|
||||
|
||||
//-- 自定义通讯操作
|
||||
toDo();
|
||||
|
||||
}catch (Exception e) {
|
||||
logger.error(ExceptionPrintUtils.printExceptionStack(e));
|
||||
} finally {
|
||||
|
||||
logger.info("--- 通信关闭 ---");
|
||||
close();
|
||||
}
|
||||
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
||||
/**
|
||||
* 待实现的通信操作
|
||||
* @time Aug 28, 2011-9:04:46 PM
|
||||
* @param out
|
||||
* @param in
|
||||
* @throws Exception
|
||||
*/
|
||||
|
||||
protected abstract void toDo()throws Exception;
|
||||
}
|
||||
1515
src/com/nms/thread/utils/ssl/SocketUtils.java
Normal file
1515
src/com/nms/thread/utils/ssl/SocketUtils.java
Normal file
File diff suppressed because it is too large
Load Diff
13
src/conf/hibernate.cfg.xml
Normal file
13
src/conf/hibernate.cfg.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE hibernate-configuration PUBLIC
|
||||
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
|
||||
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
|
||||
|
||||
<!-- Generated by MyEclipse Hibernate Tools. -->
|
||||
<hibernate-configuration>
|
||||
|
||||
<session-factory>
|
||||
|
||||
</session-factory>
|
||||
|
||||
</hibernate-configuration>
|
||||
45
src/conf/hibernate/jdbc.properties
Normal file
45
src/conf/hibernate/jdbc.properties
Normal file
@@ -0,0 +1,45 @@
|
||||
#jdbc.driver=oracle.jdbc.driver.OracleDriver
|
||||
#jdbc.url=jdbc:oracle:thin:@(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = 10.149.8.141)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 10.149.8.142)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 10.149.8.143)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 10.149.8.144)(PORT = 1521))(ADDRESS = (PROTOCOL = TCP)(HOST = 10.149.8.145)(PORT = 1521))(LOAD_BALANCE = yes)(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = gkptrac1)(FAILOVER_MODE =(TYPE = session)(METHOD = basic)(RETRIES = 180)(DELAY = 5))))
|
||||
#jdbc.driver=oracle.jdbc.driver.OracleDriver
|
||||
#jdbc.url=jdbc:oracle:thin:@10.0.6.100:1521:ict
|
||||
#jdbc.username=nms
|
||||
#jdbc.password=nms
|
||||
|
||||
jdbc.driver=com.mysql.jdbc.Driver
|
||||
jdbc.url=jdbc:mysql://10.0.6.247:3306/nms?useUnicode=true&characterEncoding=utf-8&useOldAliasMetadataBehavior=true
|
||||
jdbc.username=nms
|
||||
jdbc.password=nms
|
||||
|
||||
#jdbc.driver=org.gjt.mm.mysql.Driver
|
||||
#jdbc.driver=com.mysql.jdbc.Driver
|
||||
#jdbc.url=jdbc\:mysql\://localhost\:3306/nms?useUnicode=true\&characterEncoding=utf8
|
||||
#jdbc.url=jdbc\:mysql\://10.0.6.202\:3306/monitor?useUnicode\=true&characterEncoding\=utf8
|
||||
#jdbc.username=root
|
||||
#jdbc.password=root
|
||||
|
||||
jdbc.maxActive=10
|
||||
jdbc.maxIdle=2
|
||||
jdbc.maxWait=120000
|
||||
jdbc.whenExhaustedAction=1
|
||||
jdbc.testOnBorrow=true
|
||||
jdbc.testOnReturn=false
|
||||
|
||||
#hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
|
||||
hibernate.dialect=nis.nms.persistence.MySQLDialect
|
||||
|
||||
hibernate.show_sql=true
|
||||
hibernate.format_sql=true
|
||||
hibernate.cache.use_query_cache=true
|
||||
hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider
|
||||
hibernate.jdbc.fetch_size=50
|
||||
hibernate.jdbc.batch_size=100
|
||||
hibernate.connection.release_mode=after_transaction
|
||||
|
||||
c3p0.acquireIncrement=3
|
||||
c3p0.initialPoolSize=3
|
||||
c3p0.idleConnectionTestPeriod=900
|
||||
c3p0.minPoolSize=2
|
||||
c3p0.maxPoolSize=50
|
||||
c3p0.maxStatements=100
|
||||
c3p0.numHelperThreads=10
|
||||
c3p0.maxIdleTime=600
|
||||
81
src/conf/i18n/globalMessages_en_US.properties
Normal file
81
src/conf/i18n/globalMessages_en_US.properties
Normal file
@@ -0,0 +1,81 @@
|
||||
# -- Standard Errors --
|
||||
errors.header=<ul>
|
||||
errors.prefix=<li class="error">
|
||||
errors.suffix=</li>
|
||||
errors.footer=</ul>
|
||||
|
||||
# -- Struts Validator Error Messages --
|
||||
errors.required={0} \u4e0d\u80fd\u4e3a\u7a7a.
|
||||
errors.minlength={0} \u4e0d\u80fd\u5c11\u4e8e {1} \u4f4d\u5b57\u7b26.
|
||||
errors.maxlength={0} \u4e0d\u80fd\u591a\u4e8e {1} \u4f4d\u5b57\u7b26.
|
||||
errors.invalid={0} \u683c\u5f0f\u4e0d\u6b63\u786e.
|
||||
errors.byte={0} \u5fc5\u987b\u4e3a byte.
|
||||
errors.short={0} \u5fc5\u987b\u4e3a \u6574\u6570.
|
||||
errors.integer={0} \u5fc5\u987b\u4e3a\u6574\u6570.
|
||||
errors.long={0} \u5fc5\u987b\u4e3a\u6574\u6570.
|
||||
errors.float={0} \u5fc5\u987b\u4e3a\u6570\u5b57\uff08\u53ef\u4ee5\u5e26\u6709\u6570\u70b9\uff09.
|
||||
errors.floatRange={0} \u4e0d\u5728{1}\u5230{2}\u7684\u8303\u56f4\u5185.
|
||||
errors.double={0} \u5fc5\u987b\u4e3a\u6570\u5b57\uff08\u53ef\u4ee5\u5e26\u6709\u6570\u70b9\uff09.
|
||||
errors.date={0} \u5fc5\u987b\u4e3a\u65e5\u671f\u578b.
|
||||
errors.range={0} \u4e0d\u5728{1}\u5230{2}\u7684\u8303\u56f4\u5185.
|
||||
errors.creditcard={0}\u4e0d\u662f\u6b63\u786e\u7684\u4fe1\u7528\u5361\u53f7\u7801.
|
||||
errors.email={0} \u4e0d\u662f\u6b63\u786e\u7684Email\u5730\u5740.
|
||||
|
||||
# -- other --
|
||||
errors.cancel=\u64cd\u4f5c\u88ab\u53d6\u6d88.
|
||||
errors.detail={0}
|
||||
errors.general=The process did not complete. Details should follow.
|
||||
errors.token=Request could not be completed. Operation is not in sequence.
|
||||
errors.twofields=The '{0}' field must have the same value as the '{1}' field.
|
||||
errors.name.required=Name is required.
|
||||
errors.secret.required=Please tell me a secret (it doesn't have to be true).
|
||||
|
||||
# -- formatting --
|
||||
format.date=yyyy-MM-dd
|
||||
format.currency=$#,##0.00;$(#,##0.00)
|
||||
org.apache.struts.taglib.bean.format.date=yyyy-MM-dd
|
||||
org.apache.struts.taglib.bean.format.float=0.00
|
||||
|
||||
#org.apache.struts.taglib.bean.format.sql.timestamp java.sql.Timestamp
|
||||
# org.apache.struts.taglib.bean.format.sql.date java.sql.Date
|
||||
# org.apache.struts.taglib.bean.format.sql.time java.sql.Time
|
||||
# org.apache.struts.taglib.bean.format.date java.util.Date
|
||||
# org.apache.struts.taglib.bean.format.int Byte\uff0cShort\uff0cInteger\uff0cLong\uff0cBigInteger
|
||||
# org.apache.struts.taglib.bean.format.float Float\uff0cDouble\uff0cBigDecimal
|
||||
|
||||
|
||||
|
||||
# -- buttons --
|
||||
button.submit=Submit
|
||||
button.cancel=Cancel
|
||||
button.confirm=Confirm
|
||||
button.reset=Reset
|
||||
button.save=Save
|
||||
|
||||
# -- messages --
|
||||
message.detail={0}
|
||||
message.example.simple=This is a simple message.
|
||||
message.example.replaceable=This is <strong>{0}</strong> message with <strong>{1}</strong> parameters.
|
||||
message.welcome=Welcome to the examples page.
|
||||
message.test.
|
||||
# -- prompts --
|
||||
prompt.name=Name
|
||||
prompt.secret=Secret phrase
|
||||
|
||||
prompt.required=Required
|
||||
prompt.byte=Byte
|
||||
prompt.creditCard=Credit Card
|
||||
prompt.date=Date
|
||||
prompt.double=Double
|
||||
prompt.email=Email
|
||||
prompt.float=Float
|
||||
prompt.integer=Integer
|
||||
prompt.long=Long
|
||||
prompt.mask=Mask
|
||||
prompt.min=Min. Length
|
||||
prompt.max=Max. Length
|
||||
prompt.range=Range
|
||||
prompt.required=Required
|
||||
prompt.short=Short
|
||||
prompt.password=Password
|
||||
prompt.password2=Password confirmation
|
||||
81
src/conf/i18n/globalMessages_zh_CN.properties
Normal file
81
src/conf/i18n/globalMessages_zh_CN.properties
Normal file
@@ -0,0 +1,81 @@
|
||||
# -- Standard Errors --
|
||||
errors.header=<ul>
|
||||
errors.prefix=<li class="error">
|
||||
errors.suffix=</li>
|
||||
errors.footer=</ul>
|
||||
|
||||
# -- Struts Validator Error Messages --
|
||||
errors.required={0} 不能为空.
|
||||
errors.minlength={0} 不能少于 {1} 位字符.
|
||||
errors.maxlength={0} 不能多于 {1} 位字符.
|
||||
errors.invalid={0} 格式不正确.
|
||||
errors.byte={0} 必须为 byte.
|
||||
errors.short={0} 必须为 整数.
|
||||
errors.integer={0} 必须为整数.
|
||||
errors.long={0} 必须为整数.
|
||||
errors.float={0} 必须为数字(可以带有数点).
|
||||
errors.floatRange={0} 不在{1}到{2}的范围内.
|
||||
errors.double={0} 必须为数字(可以带有数点).
|
||||
errors.date={0} 必须为日期型.
|
||||
errors.range={0} 不在{1}到{2}的范围内.
|
||||
errors.creditcard={0}不是正确的信用卡号码.
|
||||
errors.email={0} 不是正确的Email地址.
|
||||
|
||||
# -- other --
|
||||
errors.cancel=操作被取消.
|
||||
errors.detail={0}
|
||||
errors.general=The process did not complete. Details should follow.
|
||||
errors.token=Request could not be completed. Operation is not in sequence.
|
||||
errors.twofields=The '{0}' field must have the same value as the '{1}' field.
|
||||
errors.name.required=Name is required.
|
||||
errors.secret.required=Please tell me a secret (it doesn't have to be true).
|
||||
|
||||
# -- formatting --
|
||||
format.date=yyyy-MM-dd
|
||||
format.currency=$#,##0.00;$(#,##0.00)
|
||||
org.apache.struts.taglib.bean.format.date=yyyy-MM-dd
|
||||
org.apache.struts.taglib.bean.format.float=0.00
|
||||
|
||||
#org.apache.struts.taglib.bean.format.sql.timestamp java.sql.Timestamp
|
||||
# org.apache.struts.taglib.bean.format.sql.date java.sql.Date
|
||||
# org.apache.struts.taglib.bean.format.sql.time java.sql.Time
|
||||
# org.apache.struts.taglib.bean.format.date java.util.Date
|
||||
# org.apache.struts.taglib.bean.format.int Byte,Short,Integer,Long,BigInteger
|
||||
# org.apache.struts.taglib.bean.format.float Float,Double,BigDecimal
|
||||
|
||||
|
||||
|
||||
# -- buttons --
|
||||
button.submit=Submit
|
||||
button.cancel=Cancel
|
||||
button.confirm=Confirm
|
||||
button.reset=Reset
|
||||
button.save=Save
|
||||
|
||||
# -- messages --
|
||||
message.detail={0}
|
||||
message.example.simple=This is a simple message.
|
||||
message.example.replaceable=This is <strong>{0}</strong> message with <strong>{1}</strong> parameters.
|
||||
message.welcome=Welcome to the examples page.
|
||||
message.test.
|
||||
# -- prompts --
|
||||
prompt.name=Name
|
||||
prompt.secret=Secret phrase
|
||||
|
||||
prompt.required=Required
|
||||
prompt.byte=Byte
|
||||
prompt.creditCard=Credit Card
|
||||
prompt.date=Date
|
||||
prompt.double=Double
|
||||
prompt.email=Email
|
||||
prompt.float=Float
|
||||
prompt.integer=Integer
|
||||
prompt.long=Long
|
||||
prompt.mask=Mask
|
||||
prompt.min=Min. Length
|
||||
prompt.max=Max. Length
|
||||
prompt.range=Range
|
||||
prompt.required=Required
|
||||
prompt.short=Short
|
||||
prompt.password=Password
|
||||
prompt.password2=Password confirmation
|
||||
31
src/conf/log4j.properties
Normal file
31
src/conf/log4j.properties
Normal file
@@ -0,0 +1,31 @@
|
||||
log4j.rootLogger=error,stdout,logfile
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] [%t] - <%m>%n
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
log4j.appender.logfile=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.logfile.File=../logs/nms.log
|
||||
log4j.appender.logfile.layout.ConversionPattern=%d %p [%c] [%t] - <%m>%n
|
||||
log4j.appender.logfile.DatePattern=.yyyy-MM-dd
|
||||
log4j.appender.logfile.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
log4j.logger.org.hibernate=error
|
||||
log4j.logger.nis.nms.persistence.OracleToMysql=debug
|
||||
log4j.appender.sqltrans=org.apache.log4j.DailyRollingFileAppender
|
||||
log4j.appender.sqltrans.File=../logs/sqltrans.log
|
||||
log4j.appender.sqltrans.layout.ConversionPattern=%d %p [%c] [%t] - <%m>%n
|
||||
log4j.appender.sqltrans.DatePattern=.yyyy-MM-dd
|
||||
log4j.appender.sqltrans.layout=org.apache.log4j.PatternLayout
|
||||
|
||||
|
||||
#log4j.logger.nis.nms.persistence.OracleToMysql=debug,sqltrans
|
||||
#log4j.appender.sqltrans=org.apache.log4j.FileAppender
|
||||
#log4j.appender.sqltrans.file=../logs/sqltrans.log
|
||||
#log4j.appender.sqltrans.layout=org.apache.log4j.PatternLayout
|
||||
#log4j.appender.restful.layout.ConversionPattern=%d{HH:mm:ss} %X{ip} [%t] %5p %c{1} %m%n
|
||||
#log4j.appender.sqltrans.layout.ConversionPattern=[%d{yyyy-MM-dd HH\:mm\:ss}] [%-5p] %X{ip} [Thread\:%t] %l %x - %m%n
|
||||
|
||||
#log4j.logger.org.hibernate.type=info
|
||||
#log4j.logger.org.hibernate.tool.hbm2ddl=debug
|
||||
#log4j.logger.org.hibernate.hql=debug
|
||||
#log4j.logger.org.hibernate.SQL=debug
|
||||
93
src/conf/myconfig.properties
Normal file
93
src/conf/myconfig.properties
Normal file
@@ -0,0 +1,93 @@
|
||||
|
||||
validate_user=true
|
||||
defaultPageSize=30
|
||||
##--email user address
|
||||
email.address = wangwenrui@intranet.com
|
||||
##--username
|
||||
email.userName = wangwenrui
|
||||
##--emailpassword
|
||||
email.password = wwr@intranet
|
||||
##--
|
||||
email.host = 10.0.6.100
|
||||
#file save path
|
||||
uploadServerPath=D:/Java/apache-tomcat-7.0.61-windows-x86/webapps/nmsweb/download/
|
||||
common.ssl.ks = D:/Java/apache-tomcat-7.0.61-windows-x86/webapps/nmsweb/WEB-INF/classes/ssl/client_ks
|
||||
common.ssl.ts = D:/Java/apache-tomcat-7.0.61-windows-x86/webapps/nmsweb/WEB-INF/classes/ssl/client_ts
|
||||
#--
|
||||
common.single.socket.port = 60702
|
||||
common.ssl.socket.port = 60703
|
||||
#admin mark 2012-02-07 add, Not Edit All of old Mark
|
||||
common.admin.mark = admin
|
||||
#charset
|
||||
ssl.sorket.encoding =utf-8
|
||||
|
||||
common.date.format =yyyy-MM-dd HH\:mm\:ss
|
||||
|
||||
#---CreateJavaBean-------
|
||||
packName = osDomains
|
||||
toPath= D:/Java/apache-tomcat-7.0.61-windows-x86/webapps/nmsweb/src/osDomains/
|
||||
|
||||
#----class property
|
||||
snmpDir = D:/Java/apache-tomcat-7.0.61-windows-x86/webapps/nmsweb/download2/
|
||||
|
||||
defaultSingleLogin=0
|
||||
defaultRoomMaxRows =20
|
||||
defaultRoomMaxCols =20
|
||||
detec.switch.str = switchport
|
||||
detec.systeminfo.str = systeminfo
|
||||
#超周期,默认紧急状态:0:紧急;1:非紧急
|
||||
detec.timeout.police.emergent = 0
|
||||
#超周期,默认告警级别
|
||||
detec.timeout.police.level = 0
|
||||
#监测数据设置告警时,对于指定多个标识符(如多个盘符、多个CPU、多个网卡)的分隔符 --暂时未使用
|
||||
alarm.set.marker.separator=|
|
||||
#默认查询历史监测数据的时间:单位天
|
||||
default.search.history.detect.data.day=3
|
||||
#任务配置-总体比例图中,表格节点超过一页时的叠加单位,默认为5
|
||||
#nmstaskmanager.resultchart.foldunit=5
|
||||
|
||||
#工具管理:上传下载插件的路径
|
||||
serverPath=/home/nms/apache-tomcat-7.0.59/webapps/NMSNMSA
|
||||
uploadFilePath=/download/
|
||||
#数据库类型:oracle/mysql
|
||||
db_type=mysql
|
||||
config.update.flag = 6
|
||||
|
||||
#跳转系统的url
|
||||
system.url=http://10.0.6.247:3000/login
|
||||
target.system.user=admin
|
||||
target.system.pwd=12345678
|
||||
|
||||
|
||||
#监测入库总控线程是否启用,1:启用
|
||||
flag.detect.insert.control=0
|
||||
#监测入库总控 轮询间隔 ,单位 s
|
||||
detect.insert.control.period=60
|
||||
#通知监测数据入库,释放锁超时时间,单位:s
|
||||
detect.insert.timeout=60
|
||||
|
||||
#线程池大小
|
||||
executor_socket_thread_size =10
|
||||
#周期线程池大小
|
||||
executor_scheduled_thread_size=5
|
||||
dc.handshake.start=30
|
||||
#与dc握手间隔
|
||||
dc.handshake.period=300
|
||||
detec.timeout.check.period=900
|
||||
#是否启动监测超时检查入库
|
||||
flag_detec_timeout=1
|
||||
#邮件周期
|
||||
mailing_period=120
|
||||
|
||||
consul.system.url=http://10.0.6.247:8787/thirdProjectLogin
|
||||
nextval_function_name=nextval
|
||||
currval_function_name=currval
|
||||
|
||||
nation.role.jsbh=224
|
||||
|
||||
dept.mk.id=280
|
||||
|
||||
#unit:s
|
||||
nms.report.interval=20
|
||||
nms.status.setId=7
|
||||
nms.status.url=http\://10.0.6.242\:8080/galaxy/service/nms/v1/saveServerStatus
|
||||
4
src/conf/myconfig配置文件参数说明
Normal file
4
src/conf/myconfig配置文件参数说明
Normal file
@@ -0,0 +1,4 @@
|
||||
myconfig.properties
|
||||
可不显示在配置文件中的参数,需要修改时,再添加即可,避免用户配置错误
|
||||
#管理员角色编号 用于节点配置的新增和修改节点时密码的明文显示 当配置文件中不填 默认代码中默认为1(默认的管理员角色编号),当管理员角色编号发生改变时修改这个配置文件
|
||||
jsbh=
|
||||
9
src/conf/readme
Normal file
9
src/conf/readme
Normal file
@@ -0,0 +1,9 @@
|
||||
数据库切换说明:
|
||||
1、修改jdbc.properties文件中
|
||||
jdbc.drive
|
||||
jdbc.url
|
||||
jdbc.username
|
||||
jdbc.password
|
||||
hibernate.dialect
|
||||
2、修改myconfig.properties文件
|
||||
db_type
|
||||
18
src/conf/spring/applicationContext-dao.xml
Normal file
18
src/conf/spring/applicationContext-dao.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
|
||||
<beans default-autowire="byName" default-lazy-init="true">
|
||||
<!-- 解决CLOB -->
|
||||
<bean id="nativeJdbcExtractor" class="org.springframework.jdbc.support.nativejdbc.SimpleNativeJdbcExtractor" />
|
||||
<bean id="oracleLobHandler" class="org.springframework.jdbc.support.lob.OracleLobHandler" >
|
||||
<property name="nativeJdbcExtractor">
|
||||
<ref bean="nativeJdbcExtractor" />
|
||||
</property>
|
||||
</bean>
|
||||
<!--
|
||||
<bean id="autoChangeWebStartStateServlet" class="com.nms.servlet.auto.run.AutoChangeWebStartStateServlet" scope="prototype">
|
||||
<property name="commonService">
|
||||
<ref bean="commonService"/>
|
||||
</property>
|
||||
</bean>
|
||||
-->
|
||||
</beans>
|
||||
5
src/conf/spring/applicationContext-service.xml
Normal file
5
src/conf/spring/applicationContext-service.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
|
||||
<beans default-autowire="byName" default-lazy-init="true">
|
||||
<bean id="commonService" class="nis.nms.service.CommonService" scope="prototype"></bean>
|
||||
</beans>
|
||||
110
src/conf/spring/applicationContext.xml
Normal file
110
src/conf/spring/applicationContext.xml
Normal file
@@ -0,0 +1,110 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/s ... ing-context-2.5.xsd
|
||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"
|
||||
default-autowire="byName" default-lazy-init="true">
|
||||
<!--
|
||||
<bean id="sessionFactory"
|
||||
class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
|
||||
</bean>
|
||||
-->
|
||||
<bean id="propertyConfigurer"
|
||||
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
|
||||
<property name="locations">
|
||||
<list>
|
||||
<value>WEB-INF/classes/hibernate/jdbc.properties</value>
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="myDataSource"
|
||||
class="com.mchange.v2.c3p0.ComboPooledDataSource"
|
||||
destroy-method="close" dependency-check="none">
|
||||
<property name="driverClass">
|
||||
<value>${jdbc.driver}</value>
|
||||
</property>
|
||||
<property name="jdbcUrl">
|
||||
<value>${jdbc.url}</value>
|
||||
</property>
|
||||
<property name="user">
|
||||
<value>${jdbc.username}</value>
|
||||
</property>
|
||||
<property name="password">
|
||||
<value>${jdbc.password}</value>
|
||||
</property>
|
||||
<property name="acquireIncrement">
|
||||
<value>${c3p0.acquireIncrement}</value>
|
||||
</property>
|
||||
<property name="initialPoolSize">
|
||||
<value>${c3p0.initialPoolSize}</value>
|
||||
</property>
|
||||
<property name="minPoolSize">
|
||||
<value>${c3p0.minPoolSize}</value>
|
||||
</property>
|
||||
<property name="maxPoolSize">
|
||||
<value>${c3p0.maxPoolSize}</value>
|
||||
</property>
|
||||
<property name="maxIdleTime">
|
||||
<value>${c3p0.maxIdleTime}</value>
|
||||
</property>
|
||||
<property name="idleConnectionTestPeriod">
|
||||
<value>${c3p0.idleConnectionTestPeriod}</value>
|
||||
</property>
|
||||
<property name="maxStatements">
|
||||
<value>${c3p0.maxStatements}</value>
|
||||
</property>
|
||||
<property name="numHelperThreads">
|
||||
<value>${c3p0.numHelperThreads}</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
|
||||
<property name="dataSource" ref="myDataSource" />
|
||||
<property name="mappingDirectoryLocations">
|
||||
<list>
|
||||
<value>/WEB-INF/classes/nis/nms/domains/</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="hibernateProperties">
|
||||
<props>
|
||||
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
|
||||
<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
|
||||
<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
|
||||
<prop key="hibernate.jdbc.fetch_size">${hibernate.jdbc.fetch_size}</prop>
|
||||
<prop key="hibernate.jdbc.batch_size">${hibernate.jdbc.batch_size}</prop>
|
||||
</props>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
|
||||
<!-- <bean id="transactionManager"
|
||||
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
||||
<property name="dataSource" ref="myDataSource" />
|
||||
</bean> -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- <aop:config proxy-target-class="true">
|
||||
<aop:advisor pointcut="execution(* nis.nms.service..*Service.*(..))" advice-ref="txAdvice" />
|
||||
<aop:advisor pointcut="execution(* nis.nms.persistence.*Dao.*(..))" advice-ref="txAdvice"/>
|
||||
</aop:config> -->
|
||||
|
||||
|
||||
|
||||
<!-- 定义transactionManager作事务管理,get*方法事务为readonly,其它方法按默认设置 -->
|
||||
<!-- <tx:advice id="txAdvice">
|
||||
<tx:attributes>
|
||||
<tx:method name="get*" read-only="true" />
|
||||
<tx:method name="find*" read-only="true" />
|
||||
<tx:method name="*" />
|
||||
</tx:attributes>
|
||||
</tx:advice> -->
|
||||
|
||||
</beans>
|
||||
BIN
src/conf/ssl/client_ks
Normal file
BIN
src/conf/ssl/client_ks
Normal file
Binary file not shown.
BIN
src/conf/ssl/client_ts
Normal file
BIN
src/conf/ssl/client_ts
Normal file
Binary file not shown.
51
src/conf/struts.xml
Normal file
51
src/conf/struts.xml
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE struts PUBLIC
|
||||
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
|
||||
"http://struts.apache.org/dtds/struts-2.0.dtd">
|
||||
|
||||
<struts>
|
||||
<constant name="struts.configuration.xml.reload" value="true" />
|
||||
<constant name="struts.objectFactory" value="spring" />
|
||||
<constant name="struts.objectFactory.spring.autoWire" value="name" />
|
||||
<constant name="struts.objectFactory.spring.useClassCache" value="true" />
|
||||
<constant name="struts.action.extension" value="do" />
|
||||
<constant name="struts.devMode" value="false" />
|
||||
<!--<constant name="struts.enable.DynamicMethodInvocation" value="true" /> -->
|
||||
<constant name="struts.i18n.encoding" value="UTF-8" />
|
||||
<constant name="struts.i18n.reload" value="true" />
|
||||
<constant name="struts.locale" value="zh_CN" />
|
||||
<!-- <constant name="struts.locale" value="zh_CN" /> -->
|
||||
<constant name="struts.custom.i18n.resources" value="globalMessages" />
|
||||
<constant name="struts.serve.static.browserCache" value="false" />
|
||||
<constant name="struts.url.includeParams" value="none" />
|
||||
<constant name="struts.ui.theme" value="html" />
|
||||
<constant name="struts.ui.theme" value="simple" />
|
||||
<constant name="struts.multipart.parser" value="jakarta" />
|
||||
<constant name="struts.multipart.saveDir" value="/tmp" />
|
||||
<constant name="struts.multipart.maxSize" value="1000000000" />
|
||||
|
||||
<include file="struts-default.xml" />
|
||||
|
||||
<package name="default" extends="struts-default">
|
||||
<interceptors>
|
||||
<interceptor-stack name="myDefaultStack">
|
||||
<interceptor-ref name="defaultStack" />
|
||||
<interceptor-ref name="token" />
|
||||
</interceptor-stack>
|
||||
</interceptors>
|
||||
|
||||
<default-interceptor-ref name="myDefaultStack" />
|
||||
|
||||
<global-results>
|
||||
<!-- 全局Action异常错误页 -->
|
||||
<result name="all">/error.jsp</result>
|
||||
<result name="error">/error.jsp</result>
|
||||
</global-results>
|
||||
|
||||
<global-exception-mappings>
|
||||
<exception-mapping result="all" exception="java.lang.Exception" />
|
||||
<!-- Action抛出异常时,转到的Exception类 -->
|
||||
<exception-mapping result="error" exception="npo.nms.exceptions.ActionException" />
|
||||
</global-exception-mappings>
|
||||
</package>
|
||||
</struts>
|
||||
443
src/mibs/APPLICATION-MIB
Normal file
443
src/mibs/APPLICATION-MIB
Normal file
@@ -0,0 +1,443 @@
|
||||
-- extracted from rfc1565.txt
|
||||
-- at Mon Nov 15 17:11:54 1999
|
||||
|
||||
APPLICATION-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
OBJECT-TYPE, Counter32, Gauge32
|
||||
FROM SNMPv2-SMI
|
||||
mib-2
|
||||
FROM RFC1213-MIB
|
||||
DisplayString, TimeStamp
|
||||
FROM SNMPv2-TC;
|
||||
|
||||
|
||||
-- Textual conventions
|
||||
|
||||
-- DistinguishedName [5] is used to refer to objects in the
|
||||
-- directory.
|
||||
|
||||
DistinguishedName ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A Distinguished Name represented in accordance with
|
||||
RFC1485."
|
||||
SYNTAX DisplayString
|
||||
|
||||
application MODULE-IDENTITY
|
||||
LAST-UPDATED "9311280000Z"
|
||||
ORGANIZATION "IETF Mail and Directory Management Working Group"
|
||||
CONTACT-INFO
|
||||
" Ned Freed
|
||||
|
||||
Postal: Innosoft International, Inc.
|
||||
250 West First Street, Suite 240
|
||||
Claremont, CA 91711
|
||||
US
|
||||
|
||||
Tel: +1 909 624 7907
|
||||
Fax: +1 909 621 5319
|
||||
|
||||
E-Mail: ned@innosoft.com"
|
||||
DESCRIPTION
|
||||
"The MIB module describing network service applications"
|
||||
::= { mib-2 27 }
|
||||
|
||||
-- The basic applTable contains a list of the application
|
||||
-- entities.
|
||||
applTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF ApplEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The table holding objects which apply to all different
|
||||
kinds of applications providing network services."
|
||||
::= {application 1}
|
||||
|
||||
applEntry OBJECT-TYPE
|
||||
SYNTAX ApplEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An entry associated with a network service application."
|
||||
INDEX {applIndex}
|
||||
::= {applTable 1}
|
||||
|
||||
ApplEntry ::= SEQUENCE {
|
||||
applIndex
|
||||
INTEGER,
|
||||
applName
|
||||
DisplayString,
|
||||
applDirectoryName
|
||||
DistinguishedName,
|
||||
applVersion
|
||||
DisplayString,
|
||||
applUptime
|
||||
TimeStamp,
|
||||
applOperStatus
|
||||
INTEGER,
|
||||
applLastChange
|
||||
TimeStamp,
|
||||
applInboundAssociations
|
||||
Gauge32,
|
||||
applOutboundAssociations
|
||||
Gauge32,
|
||||
applAccumulatedInboundAssociations
|
||||
Counter32,
|
||||
applAccumulatedOutboundAssociations
|
||||
Counter32,
|
||||
applLastInboundActivity
|
||||
TimeStamp,
|
||||
applLastOutboundActivity
|
||||
TimeStamp,
|
||||
applRejectedInboundAssociations
|
||||
Counter32,
|
||||
applFailedOutboundAssociations
|
||||
Counter32
|
||||
}
|
||||
|
||||
applIndex OBJECT-TYPE
|
||||
SYNTAX INTEGER (1..2147483647)
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An index to uniquely identify the network service
|
||||
application."
|
||||
::= {applEntry 1}
|
||||
|
||||
applName OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The name the network service application chooses to be
|
||||
known by."
|
||||
::= {applEntry 2}
|
||||
|
||||
applDirectoryName OBJECT-TYPE
|
||||
SYNTAX DistinguishedName
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The Distinguished Name of the directory entry where
|
||||
static information about this application is stored.
|
||||
An empty string indicates that no information about
|
||||
the application is available in the directory."
|
||||
::= {applEntry 3}
|
||||
|
||||
applVersion OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The version of network service application software."
|
||||
::= {applEntry 4}
|
||||
|
||||
applUptime OBJECT-TYPE
|
||||
SYNTAX TimeStamp
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The value of sysUpTime at the time the network service
|
||||
application was last initialized. If the application was
|
||||
last initialized prior to the last initialization of the
|
||||
network management subsystem, then this object contains
|
||||
a zero value."
|
||||
::= {applEntry 5}
|
||||
|
||||
applOperStatus OBJECT-TYPE
|
||||
SYNTAX INTEGER {
|
||||
up(1),
|
||||
down(2),
|
||||
halted(3),
|
||||
congested(4),
|
||||
restarting(5)
|
||||
}
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Indicates the operational status of the network service
|
||||
application. 'down' indicates that the network service is
|
||||
not available. 'running' indicates that the network service
|
||||
is operational and available. 'halted' indicates that the
|
||||
service is operational but not available. 'congested'
|
||||
indicates that the service is operational but no additional
|
||||
inbound associations can be accomodated. 'restarting'
|
||||
indicates that the service is currently unavailable but is
|
||||
in the process of restarting and will be available soon."
|
||||
::= {applEntry 6}
|
||||
|
||||
applLastChange OBJECT-TYPE
|
||||
SYNTAX TimeStamp
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The value of sysUpTime at the time the network service
|
||||
application entered its current operational state. If
|
||||
the current state was entered prior to the last
|
||||
initialization of the local network management subsystem,
|
||||
then this object contains a zero value."
|
||||
::= {applEntry 7}
|
||||
|
||||
applInboundAssociations OBJECT-TYPE
|
||||
SYNTAX Gauge32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The number of current associations to the network service
|
||||
application, where it is the responder. For dynamic single
|
||||
threaded processes, this will be the number of application
|
||||
instances."
|
||||
::= {applEntry 8}
|
||||
|
||||
applOutboundAssociations OBJECT-TYPE
|
||||
SYNTAX Gauge32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The number of current associations to the network service
|
||||
application, where it is the initiator. For dynamic single
|
||||
threaded processes, this will be the number of application
|
||||
instances."
|
||||
::= {applEntry 9}
|
||||
|
||||
applAccumulatedInboundAssociations OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of associations to the application entity
|
||||
since application initialization, where it was the responder.
|
||||
For dynamic single threaded processes, this will be the
|
||||
number of application instances."
|
||||
::= {applEntry 10}
|
||||
|
||||
applAccumulatedOutboundAssociations OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of associations to the application entity
|
||||
since application initialization, where it was the initiator.
|
||||
For dynamic single threaded processes, this will be the
|
||||
number of application instances."
|
||||
::= {applEntry 11}
|
||||
|
||||
applLastInboundActivity OBJECT-TYPE
|
||||
SYNTAX TimeStamp
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The value of sysUpTime at the time this application last
|
||||
had an inbound association. If the last association
|
||||
occurred prior to the last initialization of the network
|
||||
subsystem, then this object contains a zero value."
|
||||
::= {applEntry 12}
|
||||
|
||||
applLastOutboundActivity OBJECT-TYPE
|
||||
SYNTAX TimeStamp
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The value of sysUpTime at the time this application last
|
||||
had an outbound association. If the last association
|
||||
occurred prior to the last initialization of the network
|
||||
subsystem, then this object contains a zero value."
|
||||
::= {applEntry 13}
|
||||
|
||||
applRejectedInboundAssociations OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of inbound associations the application
|
||||
entity has rejected, since application initialization."
|
||||
::= {applEntry 14}
|
||||
|
||||
applFailedOutboundAssociations OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number associations where the application entity
|
||||
is initiator and association establishment has failed,
|
||||
since application initialization."
|
||||
::= {applEntry 15}
|
||||
|
||||
|
||||
-- The assocTable augments the information in the applTable
|
||||
-- with information about associations. Note that two levels
|
||||
-- of compliance are specified below, depending on whether
|
||||
-- association monitoring is mandated.
|
||||
assocTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF AssocEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The table holding a set of all active application
|
||||
associations."
|
||||
::= {application 2}
|
||||
|
||||
assocEntry OBJECT-TYPE
|
||||
SYNTAX AssocEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An entry associated with an association for a network
|
||||
service application."
|
||||
INDEX {applIndex, assocIndex}
|
||||
::= {assocTable 1}
|
||||
|
||||
AssocEntry ::= SEQUENCE {
|
||||
assocIndex
|
||||
INTEGER,
|
||||
assocRemoteApplication
|
||||
DisplayString,
|
||||
assocApplicationProtocol
|
||||
OBJECT IDENTIFIER,
|
||||
assocApplicationType
|
||||
INTEGER,
|
||||
assocDuration
|
||||
TimeStamp
|
||||
}
|
||||
|
||||
assocIndex OBJECT-TYPE
|
||||
SYNTAX INTEGER (1..2147483647)
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An index to uniquely identify each association for a network
|
||||
service application."
|
||||
::= {assocEntry 1}
|
||||
|
||||
assocRemoteApplication OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The name of the system running remote network service
|
||||
application. For an IP-based application this should be
|
||||
either a domain name or IP address. For an OSI application
|
||||
it should be the string encoded distinguished name of the
|
||||
managed object. For X.400(84) MTAs which do not have a
|
||||
Distinguished Name, the RFC1327 [6] syntax
|
||||
'mta in globalid' should be used."
|
||||
::= {assocEntry 2}
|
||||
|
||||
assocApplicationProtocol OBJECT-TYPE
|
||||
SYNTAX OBJECT IDENTIFIER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An identification of the protocol being used for the
|
||||
application. For an OSI Application, this will be the
|
||||
Application Context. For Internet applications, the IANA
|
||||
maintains a registry of the OIDs which correspond to
|
||||
well-known applications. If the application protocol is
|
||||
not listed in the registry, an OID value of the form
|
||||
{applTCPProtoID port} or {applUDProtoID port} are used for
|
||||
TCP-based and UDP-based protocols, respectively. In either
|
||||
case 'port' corresponds to the primary port number being
|
||||
used by the protocol."
|
||||
::= {assocEntry 3}
|
||||
|
||||
assocApplicationType OBJECT-TYPE
|
||||
SYNTAX INTEGER {
|
||||
ua-initiator(1),
|
||||
ua-responder(2),
|
||||
peer-initiator(3),
|
||||
peer-responder(4)}
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"This indicates whether the remote application is some type of
|
||||
client making use of this network service (e.g. a User Agent)
|
||||
or a server acting as a peer. Also indicated is whether the
|
||||
remote end initiated an incoming connection to the network
|
||||
service or responded to an outgoing connection made by the
|
||||
local application."
|
||||
::= {assocEntry 4}
|
||||
|
||||
assocDuration OBJECT-TYPE
|
||||
SYNTAX TimeStamp
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The value of sysUpTime at the time this association was
|
||||
started. If this association started prior to the last
|
||||
initialization of the network subsystem, then this
|
||||
object contains a zero value."
|
||||
::= {assocEntry 5}
|
||||
|
||||
|
||||
-- Conformance information
|
||||
|
||||
applConformance OBJECT IDENTIFIER ::= {application 3}
|
||||
|
||||
applGroups OBJECT IDENTIFIER ::= {applConformance 1}
|
||||
applCompliances OBJECT IDENTIFIER ::= {applConformance 2}
|
||||
|
||||
|
||||
-- Compliance statements
|
||||
|
||||
applCompliance MODULE-COMPLIANCE
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The compliance statement for SNMPv2 entities
|
||||
which implement the Network Services Monitoring MIB
|
||||
for basic monitoring of network service applications."
|
||||
MODULE -- this module
|
||||
MANDATORY-GROUPS {applGroup}
|
||||
::= {applCompliances 1}
|
||||
|
||||
assocCompliance MODULE-COMPLIANCE
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The compliance statement for SNMPv2 entities which
|
||||
implement the Network Services Monitoring MIB for basic
|
||||
monitoring of network service applications and their
|
||||
associations."
|
||||
MODULE -- this module
|
||||
MANDATORY-GROUPS {applGroup, assocGroup}
|
||||
::= {applCompliances 2}
|
||||
|
||||
-- Units of conformance
|
||||
|
||||
applGroup OBJECT-GROUP
|
||||
OBJECTS {
|
||||
applName, applVersion, applUptime, applOperStatus,
|
||||
applLastChange, applInboundAssociations,
|
||||
applOutboundAssociations, applAccumulatedInboundAssociations,
|
||||
applAccumulatedOutboundAssociations, applLastInboundActivity,
|
||||
applLastOutboundActivity, applRejectedInboundAssociations,
|
||||
applFailedOutboundAssociations}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A collection of objects providing basic monitoring of
|
||||
network service applications."
|
||||
::= {applGroups 1}
|
||||
|
||||
assocGroup OBJECT-GROUP
|
||||
OBJECTS {
|
||||
assocRemoteApplication, assocApplicationProtocol,
|
||||
assocApplicationType, assocDuration}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A collection of objects providing basic monitoring of
|
||||
network service applications' associations."
|
||||
::= {applGroups 2}
|
||||
|
||||
|
||||
-- OIDs of the form {applTCPProtoID port} are intended to be used
|
||||
-- for TCP-based protocols that don't have OIDs assigned by other
|
||||
-- means. {applUDPProtoID port} serves the same purpose for
|
||||
-- UDP-based protocols. In either case 'port' corresponds to
|
||||
-- the primary port number being used by the protocol. For example,
|
||||
-- assuming no other OID is assigned for SMTP, an OID of
|
||||
-- {applTCPProtoID 25} could be used, since SMTP is a TCP-based
|
||||
-- protocol that uses port 25 as its primary port.
|
||||
|
||||
applTCPProtoID OBJECT IDENTIFIER ::= {application 4}
|
||||
applUDPProtoID OBJECT IDENTIFIER ::= {application 5}
|
||||
|
||||
END
|
||||
1083
src/mibs/BRIDGE-MIB
Normal file
1083
src/mibs/BRIDGE-MIB
Normal file
File diff suppressed because it is too large
Load Diff
1397
src/mibs/ENTITY-MIB.txt
Normal file
1397
src/mibs/ENTITY-MIB.txt
Normal file
File diff suppressed because it is too large
Load Diff
1368
src/mibs/HOST-RESOURCES-MIB
Normal file
1368
src/mibs/HOST-RESOURCES-MIB
Normal file
File diff suppressed because it is too large
Load Diff
1814
src/mibs/IF-MIB.txt
Normal file
1814
src/mibs/IF-MIB.txt
Normal file
File diff suppressed because it is too large
Load Diff
421
src/mibs/INET-ADDRESS-MIB
Normal file
421
src/mibs/INET-ADDRESS-MIB
Normal file
@@ -0,0 +1,421 @@
|
||||
INET-ADDRESS-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY, mib-2, Unsigned32 FROM SNMPv2-SMI
|
||||
TEXTUAL-CONVENTION FROM SNMPv2-TC;
|
||||
|
||||
inetAddressMIB MODULE-IDENTITY
|
||||
LAST-UPDATED "200502040000Z"
|
||||
ORGANIZATION
|
||||
"IETF Operations and Management Area"
|
||||
CONTACT-INFO
|
||||
"Juergen Schoenwaelder (Editor)
|
||||
International University Bremen
|
||||
P.O. Box 750 561
|
||||
28725 Bremen, Germany
|
||||
|
||||
Phone: +49 421 200-3587
|
||||
EMail: j.schoenwaelder@iu-bremen.de
|
||||
|
||||
Send comments to <ietfmibs@ops.ietf.org>."
|
||||
DESCRIPTION
|
||||
"This MIB module defines textual conventions for
|
||||
representing Internet addresses. An Internet
|
||||
address can be an IPv4 address, an IPv6 address,
|
||||
or a DNS domain name. This module also defines
|
||||
textual conventions for Internet port numbers,
|
||||
autonomous system numbers, and the length of an
|
||||
Internet address prefix.
|
||||
|
||||
Copyright (C) The Internet Society (2005). This version
|
||||
of this MIB module is part of RFC 4001, see the RFC
|
||||
itself for full legal notices."
|
||||
REVISION "200502040000Z"
|
||||
DESCRIPTION
|
||||
"Third version, published as RFC 4001. This revision
|
||||
introduces the InetZoneIndex, InetScopeType, and
|
||||
InetVersion textual conventions."
|
||||
REVISION "200205090000Z"
|
||||
DESCRIPTION
|
||||
"Second version, published as RFC 3291. This
|
||||
revision contains several clarifications and
|
||||
introduces several new textual conventions:
|
||||
InetAddressPrefixLength, InetPortNumber,
|
||||
InetAutonomousSystemNumber, InetAddressIPv4z,
|
||||
and InetAddressIPv6z."
|
||||
REVISION "200006080000Z"
|
||||
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
"Initial version, published as RFC 2851."
|
||||
::= { mib-2 76 }
|
||||
|
||||
InetAddressType ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A value that represents a type of Internet address.
|
||||
|
||||
unknown(0) An unknown address type. This value MUST
|
||||
be used if the value of the corresponding
|
||||
InetAddress object is a zero-length string.
|
||||
It may also be used to indicate an IP address
|
||||
that is not in one of the formats defined
|
||||
below.
|
||||
|
||||
ipv4(1) An IPv4 address as defined by the
|
||||
InetAddressIPv4 textual convention.
|
||||
|
||||
ipv6(2) An IPv6 address as defined by the
|
||||
InetAddressIPv6 textual convention.
|
||||
|
||||
ipv4z(3) A non-global IPv4 address including a zone
|
||||
index as defined by the InetAddressIPv4z
|
||||
textual convention.
|
||||
|
||||
ipv6z(4) A non-global IPv6 address including a zone
|
||||
index as defined by the InetAddressIPv6z
|
||||
textual convention.
|
||||
|
||||
dns(16) A DNS domain name as defined by the
|
||||
InetAddressDNS textual convention.
|
||||
|
||||
Each definition of a concrete InetAddressType value must be
|
||||
accompanied by a definition of a textual convention for use
|
||||
with that InetAddressType.
|
||||
|
||||
To support future extensions, the InetAddressType textual
|
||||
convention SHOULD NOT be sub-typed in object type definitions.
|
||||
It MAY be sub-typed in compliance statements in order to
|
||||
require only a subset of these address types for a compliant
|
||||
implementation.
|
||||
|
||||
Implementations must ensure that InetAddressType objects
|
||||
and any dependent objects (e.g., InetAddress objects) are
|
||||
consistent. An inconsistentValue error must be generated
|
||||
if an attempt to change an InetAddressType object would,
|
||||
for example, lead to an undefined InetAddress value. In
|
||||
|
||||
|
||||
|
||||
particular, InetAddressType/InetAddress pairs must be
|
||||
changed together if the address type changes (e.g., from
|
||||
ipv6(2) to ipv4(1))."
|
||||
SYNTAX INTEGER {
|
||||
unknown(0),
|
||||
ipv4(1),
|
||||
ipv6(2),
|
||||
ipv4z(3),
|
||||
ipv6z(4),
|
||||
dns(16)
|
||||
}
|
||||
|
||||
InetAddress ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Denotes a generic Internet address.
|
||||
|
||||
An InetAddress value is always interpreted within the context
|
||||
of an InetAddressType value. Every usage of the InetAddress
|
||||
textual convention is required to specify the InetAddressType
|
||||
object that provides the context. It is suggested that the
|
||||
InetAddressType object be logically registered before the
|
||||
object(s) that use the InetAddress textual convention, if
|
||||
they appear in the same logical row.
|
||||
|
||||
The value of an InetAddress object must always be
|
||||
consistent with the value of the associated InetAddressType
|
||||
object. Attempts to set an InetAddress object to a value
|
||||
inconsistent with the associated InetAddressType
|
||||
must fail with an inconsistentValue error.
|
||||
|
||||
When this textual convention is used as the syntax of an
|
||||
index object, there may be issues with the limit of 128
|
||||
sub-identifiers specified in SMIv2, STD 58. In this case,
|
||||
the object definition MUST include a 'SIZE' clause to
|
||||
limit the number of potential instance sub-identifiers;
|
||||
otherwise the applicable constraints MUST be stated in
|
||||
the appropriate conceptual row DESCRIPTION clauses, or
|
||||
in the surrounding documentation if there is no single
|
||||
DESCRIPTION clause that is appropriate."
|
||||
SYNTAX OCTET STRING (SIZE (0..255))
|
||||
|
||||
InetAddressIPv4 ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "1d.1d.1d.1d"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Represents an IPv4 network address:
|
||||
|
||||
|
||||
|
||||
|
||||
Octets Contents Encoding
|
||||
1-4 IPv4 address network-byte order
|
||||
|
||||
The corresponding InetAddressType value is ipv4(1).
|
||||
|
||||
This textual convention SHOULD NOT be used directly in object
|
||||
definitions, as it restricts addresses to a specific format.
|
||||
However, if it is used, it MAY be used either on its own or in
|
||||
conjunction with InetAddressType, as a pair."
|
||||
SYNTAX OCTET STRING (SIZE (4))
|
||||
|
||||
InetAddressIPv6 ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "2x:2x:2x:2x:2x:2x:2x:2x"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Represents an IPv6 network address:
|
||||
|
||||
Octets Contents Encoding
|
||||
1-16 IPv6 address network-byte order
|
||||
|
||||
The corresponding InetAddressType value is ipv6(2).
|
||||
|
||||
This textual convention SHOULD NOT be used directly in object
|
||||
definitions, as it restricts addresses to a specific format.
|
||||
However, if it is used, it MAY be used either on its own or in
|
||||
conjunction with InetAddressType, as a pair."
|
||||
SYNTAX OCTET STRING (SIZE (16))
|
||||
|
||||
InetAddressIPv4z ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "1d.1d.1d.1d%4d"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Represents a non-global IPv4 network address, together
|
||||
with its zone index:
|
||||
|
||||
Octets Contents Encoding
|
||||
1-4 IPv4 address network-byte order
|
||||
5-8 zone index network-byte order
|
||||
|
||||
The corresponding InetAddressType value is ipv4z(3).
|
||||
|
||||
The zone index (bytes 5-8) is used to disambiguate identical
|
||||
address values on nodes that have interfaces attached to
|
||||
different zones of the same scope. The zone index may contain
|
||||
the special value 0, which refers to the default zone for each
|
||||
scope.
|
||||
|
||||
This textual convention SHOULD NOT be used directly in object
|
||||
|
||||
|
||||
|
||||
definitions, as it restricts addresses to a specific format.
|
||||
However, if it is used, it MAY be used either on its own or in
|
||||
conjunction with InetAddressType, as a pair."
|
||||
SYNTAX OCTET STRING (SIZE (8))
|
||||
|
||||
InetAddressIPv6z ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "2x:2x:2x:2x:2x:2x:2x:2x%4d"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Represents a non-global IPv6 network address, together
|
||||
with its zone index:
|
||||
|
||||
Octets Contents Encoding
|
||||
1-16 IPv6 address network-byte order
|
||||
17-20 zone index network-byte order
|
||||
|
||||
The corresponding InetAddressType value is ipv6z(4).
|
||||
|
||||
The zone index (bytes 17-20) is used to disambiguate
|
||||
identical address values on nodes that have interfaces
|
||||
attached to different zones of the same scope. The zone index
|
||||
may contain the special value 0, which refers to the default
|
||||
zone for each scope.
|
||||
|
||||
This textual convention SHOULD NOT be used directly in object
|
||||
definitions, as it restricts addresses to a specific format.
|
||||
However, if it is used, it MAY be used either on its own or in
|
||||
conjunction with InetAddressType, as a pair."
|
||||
SYNTAX OCTET STRING (SIZE (20))
|
||||
|
||||
InetAddressDNS ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "255a"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Represents a DNS domain name. The name SHOULD be fully
|
||||
qualified whenever possible.
|
||||
|
||||
The corresponding InetAddressType is dns(16).
|
||||
|
||||
The DESCRIPTION clause of InetAddress objects that may have
|
||||
InetAddressDNS values MUST fully describe how (and when)
|
||||
these names are to be resolved to IP addresses.
|
||||
|
||||
The resolution of an InetAddressDNS value may require to
|
||||
query multiple DNS records (e.g., A for IPv4 and AAAA for
|
||||
IPv6). The order of the resolution process and which DNS
|
||||
record takes precedence depends on the configuration of the
|
||||
resolver.
|
||||
|
||||
|
||||
|
||||
This textual convention SHOULD NOT be used directly in object
|
||||
definitions, as it restricts addresses to a specific format.
|
||||
However, if it is used, it MAY be used either on its own or in
|
||||
conjunction with InetAddressType, as a pair."
|
||||
SYNTAX OCTET STRING (SIZE (1..255))
|
||||
|
||||
InetAddressPrefixLength ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "d"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Denotes the length of a generic Internet network address
|
||||
prefix. A value of n corresponds to an IP address mask
|
||||
that has n contiguous 1-bits from the most significant
|
||||
bit (MSB), with all other bits set to 0.
|
||||
|
||||
An InetAddressPrefixLength value is always interpreted within
|
||||
the context of an InetAddressType value. Every usage of the
|
||||
InetAddressPrefixLength textual convention is required to
|
||||
specify the InetAddressType object that provides the
|
||||
context. It is suggested that the InetAddressType object be
|
||||
logically registered before the object(s) that use the
|
||||
InetAddressPrefixLength textual convention, if they appear
|
||||
in the same logical row.
|
||||
|
||||
InetAddressPrefixLength values larger than
|
||||
the maximum length of an IP address for a specific
|
||||
InetAddressType are treated as the maximum significant
|
||||
value applicable for the InetAddressType. The maximum
|
||||
significant value is 32 for the InetAddressType
|
||||
'ipv4(1)' and 'ipv4z(3)' and 128 for the InetAddressType
|
||||
'ipv6(2)' and 'ipv6z(4)'. The maximum significant value
|
||||
for the InetAddressType 'dns(16)' is 0.
|
||||
|
||||
The value zero is object-specific and must be defined as
|
||||
part of the description of any object that uses this
|
||||
syntax. Examples of the usage of zero might include
|
||||
situations where the Internet network address prefix
|
||||
is unknown or does not apply.
|
||||
|
||||
The upper bound of the prefix length has been chosen to
|
||||
be consistent with the maximum size of an InetAddress."
|
||||
SYNTAX Unsigned32 (0..2040)
|
||||
|
||||
InetPortNumber ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "d"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Represents a 16 bit port number of an Internet transport
|
||||
|
||||
|
||||
|
||||
layer protocol. Port numbers are assigned by IANA. A
|
||||
current list of all assignments is available from
|
||||
<http://www.iana.org/>.
|
||||
|
||||
The value zero is object-specific and must be defined as
|
||||
part of the description of any object that uses this
|
||||
syntax. Examples of the usage of zero might include
|
||||
situations where a port number is unknown, or when the
|
||||
value zero is used as a wildcard in a filter."
|
||||
REFERENCE "STD 6 (RFC 768), STD 7 (RFC 793) and RFC 2960"
|
||||
SYNTAX Unsigned32 (0..65535)
|
||||
|
||||
InetAutonomousSystemNumber ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "d"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Represents an autonomous system number that identifies an
|
||||
Autonomous System (AS). An AS is a set of routers under a
|
||||
single technical administration, using an interior gateway
|
||||
protocol and common metrics to route packets within the AS,
|
||||
and using an exterior gateway protocol to route packets to
|
||||
other ASes'. IANA maintains the AS number space and has
|
||||
delegated large parts to the regional registries.
|
||||
|
||||
Autonomous system numbers are currently limited to 16 bits
|
||||
(0..65535). There is, however, work in progress to enlarge the
|
||||
autonomous system number space to 32 bits. Therefore, this
|
||||
textual convention uses an Unsigned32 value without a
|
||||
range restriction in order to support a larger autonomous
|
||||
system number space."
|
||||
REFERENCE "RFC 1771, RFC 1930"
|
||||
SYNTAX Unsigned32
|
||||
|
||||
InetScopeType ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Represents a scope type. This textual convention can be used
|
||||
in cases where a MIB has to represent different scope types
|
||||
and there is no context information, such as an InetAddress
|
||||
object, that implicitly defines the scope type.
|
||||
|
||||
Note that not all possible values have been assigned yet, but
|
||||
they may be assigned in future revisions of this specification.
|
||||
Applications should therefore be able to deal with values
|
||||
not yet assigned."
|
||||
REFERENCE "RFC 3513"
|
||||
SYNTAX INTEGER {
|
||||
-- reserved(0),
|
||||
|
||||
|
||||
|
||||
interfaceLocal(1),
|
||||
linkLocal(2),
|
||||
subnetLocal(3),
|
||||
adminLocal(4),
|
||||
siteLocal(5), -- site-local unicast addresses
|
||||
-- have been deprecated by RFC 3879
|
||||
-- unassigned(6),
|
||||
-- unassigned(7),
|
||||
organizationLocal(8),
|
||||
-- unassigned(9),
|
||||
-- unassigned(10),
|
||||
-- unassigned(11),
|
||||
-- unassigned(12),
|
||||
-- unassigned(13),
|
||||
global(14)
|
||||
-- reserved(15)
|
||||
}
|
||||
|
||||
InetZoneIndex ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "d"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A zone index identifies an instance of a zone of a
|
||||
specific scope.
|
||||
|
||||
The zone index MUST disambiguate identical address
|
||||
values. For link-local addresses, the zone index will
|
||||
typically be the interface index (ifIndex as defined in the
|
||||
IF-MIB) of the interface on which the address is configured.
|
||||
|
||||
The zone index may contain the special value 0, which refers
|
||||
to the default zone. The default zone may be used in cases
|
||||
where the valid zone index is not known (e.g., when a
|
||||
management application has to write a link-local IPv6
|
||||
address without knowing the interface index value). The
|
||||
default zone SHOULD NOT be used as an easy way out in
|
||||
cases where the zone index for a non-global IPv6 address
|
||||
is known."
|
||||
REFERENCE "RFC4007"
|
||||
SYNTAX Unsigned32
|
||||
|
||||
InetVersion ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A value representing a version of the IP protocol.
|
||||
|
||||
unknown(0) An unknown or unspecified version of the IP
|
||||
protocol.
|
||||
|
||||
|
||||
|
||||
ipv4(1) The IPv4 protocol as defined in RFC 791 (STD 5).
|
||||
|
||||
ipv6(2) The IPv6 protocol as defined in RFC 2460.
|
||||
|
||||
Note that this textual convention SHOULD NOT be used to
|
||||
distinguish different address types associated with IP
|
||||
protocols. The InetAddressType has been designed for this
|
||||
purpose."
|
||||
REFERENCE "RFC 791, RFC 2460"
|
||||
SYNTAX INTEGER {
|
||||
unknown(0),
|
||||
ipv4(1),
|
||||
ipv6(2)
|
||||
}
|
||||
END
|
||||
4993
src/mibs/IP-MIB.txt
Normal file
4993
src/mibs/IP-MIB.txt
Normal file
File diff suppressed because it is too large
Load Diff
3246
src/mibs/JVM-MANAGEMENT-MIB.mib
Normal file
3246
src/mibs/JVM-MANAGEMENT-MIB.mib
Normal file
File diff suppressed because it is too large
Load Diff
2738
src/mibs/OSPF-MIB
Normal file
2738
src/mibs/OSPF-MIB
Normal file
File diff suppressed because it is too large
Load Diff
38
src/mibs/RFC-1215.txt
Normal file
38
src/mibs/RFC-1215.txt
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
RFC-1215 DEFINITIONS ::= BEGIN
|
||||
|
||||
-- This module is a empty module. It has been created solely for the
|
||||
-- purpose of allowing other modules to correctly import the TRAP-TYPE
|
||||
-- clause from RFC-1215 where it should be imported from. It's a
|
||||
-- built in type in the UCD-SNMP code, and in fact RFC-1215 doesn't
|
||||
-- actually define a mib at all; it only defines macros. However,
|
||||
-- importing the TRAP-TYPE is conventionally done from an import
|
||||
-- clause pointing to RFC-1215.
|
||||
--
|
||||
-- Wes 7/17/98
|
||||
|
||||
TRAP-TYPE MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::= "ENTERPRISE" value
|
||||
(enterprise OBJECT IDENTIFIER)
|
||||
VarPart
|
||||
DescrPart
|
||||
ReferPart
|
||||
VALUE NOTATION ::= value (VALUE INTEGER)
|
||||
VarPart ::=
|
||||
"VARIABLES" "{" VarTypes "}"
|
||||
| empty
|
||||
VarTypes ::=
|
||||
VarType | VarTypes "," VarType
|
||||
VarType ::=
|
||||
value (vartype ObjectName)
|
||||
DescrPart ::=
|
||||
"DESCRIPTION" value (description DisplayString)
|
||||
| empty
|
||||
ReferPart ::=
|
||||
"REFERENCE" value (reference DisplayString)
|
||||
| empty
|
||||
END
|
||||
|
||||
|
||||
END
|
||||
2598
src/mibs/RFC1213-MIB
Normal file
2598
src/mibs/RFC1213-MIB
Normal file
File diff suppressed because it is too large
Load Diff
3356
src/mibs/RFC1271-MIB
Normal file
3356
src/mibs/RFC1271-MIB
Normal file
File diff suppressed because it is too large
Load Diff
1449
src/mibs/RFC1697_RDBMS.mib
Normal file
1449
src/mibs/RFC1697_RDBMS.mib
Normal file
File diff suppressed because it is too large
Load Diff
5241
src/mibs/RMON2-MIB
Normal file
5241
src/mibs/RMON2-MIB
Normal file
File diff suppressed because it is too large
Load Diff
660
src/mibs/SNMP-TARGET-MIB.txt
Normal file
660
src/mibs/SNMP-TARGET-MIB.txt
Normal file
@@ -0,0 +1,660 @@
|
||||
SNMP-TARGET-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY,
|
||||
OBJECT-TYPE,
|
||||
snmpModules,
|
||||
Counter32,
|
||||
Integer32
|
||||
FROM SNMPv2-SMI
|
||||
|
||||
TEXTUAL-CONVENTION,
|
||||
TDomain,
|
||||
TAddress,
|
||||
TimeInterval,
|
||||
RowStatus,
|
||||
StorageType,
|
||||
TestAndIncr
|
||||
FROM SNMPv2-TC
|
||||
|
||||
SnmpSecurityModel,
|
||||
SnmpMessageProcessingModel,
|
||||
SnmpSecurityLevel,
|
||||
SnmpAdminString
|
||||
FROM SNMP-FRAMEWORK-MIB
|
||||
|
||||
MODULE-COMPLIANCE,
|
||||
OBJECT-GROUP
|
||||
FROM SNMPv2-CONF;
|
||||
|
||||
snmpTargetMIB MODULE-IDENTITY
|
||||
LAST-UPDATED "200210140000Z"
|
||||
ORGANIZATION "IETF SNMPv3 Working Group"
|
||||
CONTACT-INFO
|
||||
"WG-email: snmpv3@lists.tislabs.com
|
||||
Subscribe: majordomo@lists.tislabs.com
|
||||
In message body: subscribe snmpv3
|
||||
|
||||
Co-Chair: Russ Mundy
|
||||
Network Associates Laboratories
|
||||
Postal: 15204 Omega Drive, Suite 300
|
||||
Rockville, MD 20850-4601
|
||||
USA
|
||||
EMail: mundy@tislabs.com
|
||||
Phone: +1 301-947-7107
|
||||
|
||||
Co-Chair: David Harrington
|
||||
Enterasys Networks
|
||||
Postal: 35 Industrial Way
|
||||
P. O. Box 5004
|
||||
Rochester, New Hampshire 03866-5005
|
||||
USA
|
||||
EMail: dbh@enterasys.com
|
||||
Phone: +1 603-337-2614
|
||||
|
||||
Co-editor: David B. Levi
|
||||
Nortel Networks
|
||||
Postal: 3505 Kesterwood Drive
|
||||
Knoxville, Tennessee 37918
|
||||
EMail: dlevi@nortelnetworks.com
|
||||
Phone: +1 865 686 0432
|
||||
|
||||
Co-editor: Paul Meyer
|
||||
Secure Computing Corporation
|
||||
Postal: 2675 Long Lake Road
|
||||
|
||||
Roseville, Minnesota 55113
|
||||
EMail: paul_meyer@securecomputing.com
|
||||
Phone: +1 651 628 1592
|
||||
|
||||
Co-editor: Bob Stewart
|
||||
Retired"
|
||||
DESCRIPTION
|
||||
"This MIB module defines MIB objects which provide
|
||||
mechanisms to remotely configure the parameters used
|
||||
by an SNMP entity for the generation of SNMP messages.
|
||||
|
||||
Copyright (C) The Internet Society (2002). This
|
||||
version of this MIB module is part of RFC 3413;
|
||||
see the RFC itself for full legal notices.
|
||||
"
|
||||
REVISION "200210140000Z" -- 14 October 2002
|
||||
DESCRIPTION "Fixed DISPLAY-HINTS for UTF-8 strings, fixed hex
|
||||
value of LF characters, clarified meaning of zero
|
||||
length tag values, improved tag list examples.
|
||||
Published as RFC 3413."
|
||||
REVISION "199808040000Z" -- 4 August 1998
|
||||
DESCRIPTION "Clarifications, published as
|
||||
RFC 2573."
|
||||
REVISION "199707140000Z" -- 14 July 1997
|
||||
DESCRIPTION "The initial revision, published as RFC2273."
|
||||
::= { snmpModules 12 }
|
||||
|
||||
snmpTargetObjects OBJECT IDENTIFIER ::= { snmpTargetMIB 1 }
|
||||
snmpTargetConformance OBJECT IDENTIFIER ::= { snmpTargetMIB 3 }
|
||||
|
||||
SnmpTagValue ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "255t"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An octet string containing a tag value.
|
||||
Tag values are preferably in human-readable form.
|
||||
|
||||
To facilitate internationalization, this information
|
||||
is represented using the ISO/IEC IS 10646-1 character
|
||||
set, encoded as an octet string using the UTF-8
|
||||
character encoding scheme described in RFC 2279.
|
||||
|
||||
Since additional code points are added by amendments
|
||||
to the 10646 standard from time to time,
|
||||
implementations must be prepared to encounter any code
|
||||
point from 0x00000000 to 0x7fffffff.
|
||||
|
||||
The use of control codes should be avoided, and certain
|
||||
|
||||
control codes are not allowed as described below.
|
||||
|
||||
For code points not directly supported by user
|
||||
interface hardware or software, an alternative means
|
||||
of entry and display, such as hexadecimal, may be
|
||||
provided.
|
||||
|
||||
For information encoded in 7-bit US-ASCII, the UTF-8
|
||||
representation is identical to the US-ASCII encoding.
|
||||
|
||||
Note that when this TC is used for an object that
|
||||
is used or envisioned to be used as an index, then a
|
||||
SIZE restriction must be specified so that the number
|
||||
of sub-identifiers for any object instance does not
|
||||
exceed the limit of 128, as defined by [RFC1905].
|
||||
|
||||
An object of this type contains a single tag value
|
||||
which is used to select a set of entries in a table.
|
||||
|
||||
A tag value is an arbitrary string of octets, but
|
||||
may not contain a delimiter character. Delimiter
|
||||
characters are defined to be one of the following:
|
||||
|
||||
- An ASCII space character (0x20).
|
||||
|
||||
- An ASCII TAB character (0x09).
|
||||
|
||||
- An ASCII carriage return (CR) character (0x0D).
|
||||
|
||||
- An ASCII line feed (LF) character (0x0A).
|
||||
|
||||
Delimiter characters are used to separate tag values
|
||||
in a tag list. An object of this type may only
|
||||
contain a single tag value, and so delimiter
|
||||
characters are not allowed in a value of this type.
|
||||
|
||||
Note that a tag value of 0 length means that no tag is
|
||||
defined. In other words, a tag value of 0 length would
|
||||
never match anything in a tag list, and would never
|
||||
select any table entries.
|
||||
|
||||
Some examples of valid tag values are:
|
||||
|
||||
- 'acme'
|
||||
|
||||
- 'router'
|
||||
|
||||
- 'host'
|
||||
|
||||
The use of a tag value to select table entries is
|
||||
application and MIB specific."
|
||||
SYNTAX OCTET STRING (SIZE (0..255))
|
||||
|
||||
SnmpTagList ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "255t"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An octet string containing a list of tag values.
|
||||
Tag values are preferably in human-readable form.
|
||||
|
||||
To facilitate internationalization, this information
|
||||
is represented using the ISO/IEC IS 10646-1 character
|
||||
set, encoded as an octet string using the UTF-8
|
||||
character encoding scheme described in RFC 2279.
|
||||
|
||||
Since additional code points are added by amendments
|
||||
to the 10646 standard from time to time,
|
||||
implementations must be prepared to encounter any code
|
||||
point from 0x00000000 to 0x7fffffff.
|
||||
|
||||
The use of control codes should be avoided, except as
|
||||
described below.
|
||||
|
||||
For code points not directly supported by user
|
||||
interface hardware or software, an alternative means
|
||||
of entry and display, such as hexadecimal, may be
|
||||
provided.
|
||||
|
||||
For information encoded in 7-bit US-ASCII, the UTF-8
|
||||
representation is identical to the US-ASCII encoding.
|
||||
|
||||
An object of this type contains a list of tag values
|
||||
which are used to select a set of entries in a table.
|
||||
|
||||
A tag value is an arbitrary string of octets, but
|
||||
may not contain a delimiter character. Delimiter
|
||||
characters are defined to be one of the following:
|
||||
|
||||
- An ASCII space character (0x20).
|
||||
|
||||
- An ASCII TAB character (0x09).
|
||||
|
||||
- An ASCII carriage return (CR) character (0x0D).
|
||||
|
||||
- An ASCII line feed (LF) character (0x0A).
|
||||
|
||||
Delimiter characters are used to separate tag values
|
||||
|
||||
in a tag list. Only a single delimiter character may
|
||||
occur between two tag values. A tag value may not
|
||||
have a zero length. These constraints imply certain
|
||||
restrictions on the contents of this object:
|
||||
|
||||
- There cannot be a leading or trailing delimiter
|
||||
character.
|
||||
|
||||
- There cannot be multiple adjacent delimiter
|
||||
characters.
|
||||
|
||||
Some examples of valid tag lists are:
|
||||
|
||||
- '' -- an empty list
|
||||
|
||||
- 'acme' -- list of one tag
|
||||
|
||||
- 'host router bridge' -- list of several tags
|
||||
|
||||
Note that although a tag value may not have a length of
|
||||
zero, an empty string is still valid. This indicates
|
||||
an empty list (i.e. there are no tag values in the list).
|
||||
|
||||
The use of the tag list to select table entries is
|
||||
application and MIB specific. Typically, an application
|
||||
will provide one or more tag values, and any entry
|
||||
which contains some combination of these tag values
|
||||
will be selected."
|
||||
SYNTAX OCTET STRING (SIZE (0..255))
|
||||
|
||||
--
|
||||
--
|
||||
-- The snmpTargetObjects group
|
||||
--
|
||||
--
|
||||
|
||||
snmpTargetSpinLock OBJECT-TYPE
|
||||
SYNTAX TestAndIncr
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"This object is used to facilitate modification of table
|
||||
entries in the SNMP-TARGET-MIB module by multiple
|
||||
managers. In particular, it is useful when modifying
|
||||
the value of the snmpTargetAddrTagList object.
|
||||
|
||||
The procedure for modifying the snmpTargetAddrTagList
|
||||
object is as follows:
|
||||
|
||||
1. Retrieve the value of snmpTargetSpinLock and
|
||||
of snmpTargetAddrTagList.
|
||||
|
||||
2. Generate a new value for snmpTargetAddrTagList.
|
||||
|
||||
3. Set the value of snmpTargetSpinLock to the
|
||||
retrieved value, and the value of
|
||||
snmpTargetAddrTagList to the new value. If
|
||||
the set fails for the snmpTargetSpinLock
|
||||
object, go back to step 1."
|
||||
::= { snmpTargetObjects 1 }
|
||||
|
||||
snmpTargetAddrTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF SnmpTargetAddrEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A table of transport addresses to be used in the generation
|
||||
of SNMP messages."
|
||||
::= { snmpTargetObjects 2 }
|
||||
|
||||
snmpTargetAddrEntry OBJECT-TYPE
|
||||
SYNTAX SnmpTargetAddrEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A transport address to be used in the generation
|
||||
of SNMP operations.
|
||||
|
||||
Entries in the snmpTargetAddrTable are created and
|
||||
deleted using the snmpTargetAddrRowStatus object."
|
||||
INDEX { IMPLIED snmpTargetAddrName }
|
||||
::= { snmpTargetAddrTable 1 }
|
||||
|
||||
SnmpTargetAddrEntry ::= SEQUENCE {
|
||||
snmpTargetAddrName SnmpAdminString,
|
||||
snmpTargetAddrTDomain TDomain,
|
||||
snmpTargetAddrTAddress TAddress,
|
||||
snmpTargetAddrTimeout TimeInterval,
|
||||
snmpTargetAddrRetryCount Integer32,
|
||||
snmpTargetAddrTagList SnmpTagList,
|
||||
snmpTargetAddrParams SnmpAdminString,
|
||||
snmpTargetAddrStorageType StorageType,
|
||||
snmpTargetAddrRowStatus RowStatus
|
||||
}
|
||||
|
||||
snmpTargetAddrName OBJECT-TYPE
|
||||
SYNTAX SnmpAdminString (SIZE(1..32))
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The locally arbitrary, but unique identifier associated
|
||||
with this snmpTargetAddrEntry."
|
||||
::= { snmpTargetAddrEntry 1 }
|
||||
|
||||
snmpTargetAddrTDomain OBJECT-TYPE
|
||||
SYNTAX TDomain
|
||||
MAX-ACCESS read-create
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"This object indicates the transport type of the address
|
||||
contained in the snmpTargetAddrTAddress object."
|
||||
::= { snmpTargetAddrEntry 2 }
|
||||
|
||||
snmpTargetAddrTAddress OBJECT-TYPE
|
||||
SYNTAX TAddress
|
||||
MAX-ACCESS read-create
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"This object contains a transport address. The format of
|
||||
this address depends on the value of the
|
||||
snmpTargetAddrTDomain object."
|
||||
::= { snmpTargetAddrEntry 3 }
|
||||
|
||||
snmpTargetAddrTimeout OBJECT-TYPE
|
||||
SYNTAX TimeInterval
|
||||
MAX-ACCESS read-create
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"This object should reflect the expected maximum round
|
||||
trip time for communicating with the transport address
|
||||
defined by this row. When a message is sent to this
|
||||
address, and a response (if one is expected) is not
|
||||
received within this time period, an implementation
|
||||
may assume that the response will not be delivered.
|
||||
|
||||
Note that the time interval that an application waits
|
||||
for a response may actually be derived from the value
|
||||
of this object. The method for deriving the actual time
|
||||
interval is implementation dependent. One such method
|
||||
is to derive the expected round trip time based on a
|
||||
particular retransmission algorithm and on the number
|
||||
of timeouts which have occurred. The type of message may
|
||||
also be considered when deriving expected round trip
|
||||
times for retransmissions. For example, if a message is
|
||||
being sent with a securityLevel that indicates both
|
||||
|
||||
authentication and privacy, the derived value may be
|
||||
increased to compensate for extra processing time spent
|
||||
during authentication and encryption processing."
|
||||
DEFVAL { 1500 }
|
||||
::= { snmpTargetAddrEntry 4 }
|
||||
|
||||
snmpTargetAddrRetryCount OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..255)
|
||||
MAX-ACCESS read-create
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"This object specifies a default number of retries to be
|
||||
attempted when a response is not received for a generated
|
||||
message. An application may provide its own retry count,
|
||||
in which case the value of this object is ignored."
|
||||
DEFVAL { 3 }
|
||||
::= { snmpTargetAddrEntry 5 }
|
||||
|
||||
snmpTargetAddrTagList OBJECT-TYPE
|
||||
SYNTAX SnmpTagList
|
||||
MAX-ACCESS read-create
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"This object contains a list of tag values which are
|
||||
used to select target addresses for a particular
|
||||
operation."
|
||||
DEFVAL { "" }
|
||||
::= { snmpTargetAddrEntry 6 }
|
||||
|
||||
snmpTargetAddrParams OBJECT-TYPE
|
||||
SYNTAX SnmpAdminString (SIZE(1..32))
|
||||
MAX-ACCESS read-create
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The value of this object identifies an entry in the
|
||||
snmpTargetParamsTable. The identified entry
|
||||
contains SNMP parameters to be used when generating
|
||||
messages to be sent to this transport address."
|
||||
::= { snmpTargetAddrEntry 7 }
|
||||
|
||||
snmpTargetAddrStorageType OBJECT-TYPE
|
||||
SYNTAX StorageType
|
||||
MAX-ACCESS read-create
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The storage type for this conceptual row.
|
||||
Conceptual rows having the value 'permanent' need not
|
||||
allow write-access to any columnar objects in the row."
|
||||
DEFVAL { nonVolatile }
|
||||
::= { snmpTargetAddrEntry 8 }
|
||||
|
||||
snmpTargetAddrRowStatus OBJECT-TYPE
|
||||
SYNTAX RowStatus
|
||||
MAX-ACCESS read-create
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The status of this conceptual row.
|
||||
|
||||
To create a row in this table, a manager must
|
||||
set this object to either createAndGo(4) or
|
||||
createAndWait(5).
|
||||
|
||||
Until instances of all corresponding columns are
|
||||
appropriately configured, the value of the
|
||||
corresponding instance of the snmpTargetAddrRowStatus
|
||||
column is 'notReady'.
|
||||
|
||||
In particular, a newly created row cannot be made
|
||||
active until the corresponding instances of
|
||||
snmpTargetAddrTDomain, snmpTargetAddrTAddress, and
|
||||
snmpTargetAddrParams have all been set.
|
||||
|
||||
The following objects may not be modified while the
|
||||
value of this object is active(1):
|
||||
- snmpTargetAddrTDomain
|
||||
- snmpTargetAddrTAddress
|
||||
An attempt to set these objects while the value of
|
||||
snmpTargetAddrRowStatus is active(1) will result in
|
||||
an inconsistentValue error."
|
||||
::= { snmpTargetAddrEntry 9 }
|
||||
|
||||
snmpTargetParamsTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF SnmpTargetParamsEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A table of SNMP target information to be used
|
||||
in the generation of SNMP messages."
|
||||
::= { snmpTargetObjects 3 }
|
||||
|
||||
snmpTargetParamsEntry OBJECT-TYPE
|
||||
SYNTAX SnmpTargetParamsEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A set of SNMP target information.
|
||||
|
||||
Entries in the snmpTargetParamsTable are created and
|
||||
deleted using the snmpTargetParamsRowStatus object."
|
||||
INDEX { IMPLIED snmpTargetParamsName }
|
||||
::= { snmpTargetParamsTable 1 }
|
||||
|
||||
SnmpTargetParamsEntry ::= SEQUENCE {
|
||||
snmpTargetParamsName SnmpAdminString,
|
||||
snmpTargetParamsMPModel SnmpMessageProcessingModel,
|
||||
snmpTargetParamsSecurityModel SnmpSecurityModel,
|
||||
snmpTargetParamsSecurityName SnmpAdminString,
|
||||
snmpTargetParamsSecurityLevel SnmpSecurityLevel,
|
||||
snmpTargetParamsStorageType StorageType,
|
||||
snmpTargetParamsRowStatus RowStatus
|
||||
}
|
||||
|
||||
snmpTargetParamsName OBJECT-TYPE
|
||||
SYNTAX SnmpAdminString (SIZE(1..32))
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The locally arbitrary, but unique identifier associated
|
||||
with this snmpTargetParamsEntry."
|
||||
::= { snmpTargetParamsEntry 1 }
|
||||
|
||||
snmpTargetParamsMPModel OBJECT-TYPE
|
||||
SYNTAX SnmpMessageProcessingModel
|
||||
MAX-ACCESS read-create
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The Message Processing Model to be used when generating
|
||||
SNMP messages using this entry."
|
||||
::= { snmpTargetParamsEntry 2 }
|
||||
|
||||
snmpTargetParamsSecurityModel OBJECT-TYPE
|
||||
SYNTAX SnmpSecurityModel (1..2147483647)
|
||||
MAX-ACCESS read-create
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The Security Model to be used when generating SNMP
|
||||
messages using this entry. An implementation may
|
||||
choose to return an inconsistentValue error if an
|
||||
attempt is made to set this variable to a value
|
||||
for a security model which the implementation does
|
||||
not support."
|
||||
::= { snmpTargetParamsEntry 3 }
|
||||
|
||||
snmpTargetParamsSecurityName OBJECT-TYPE
|
||||
SYNTAX SnmpAdminString
|
||||
MAX-ACCESS read-create
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The securityName which identifies the Principal on
|
||||
whose behalf SNMP messages will be generated using
|
||||
this entry."
|
||||
::= { snmpTargetParamsEntry 4 }
|
||||
|
||||
snmpTargetParamsSecurityLevel OBJECT-TYPE
|
||||
SYNTAX SnmpSecurityLevel
|
||||
MAX-ACCESS read-create
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The Level of Security to be used when generating
|
||||
SNMP messages using this entry."
|
||||
::= { snmpTargetParamsEntry 5 }
|
||||
|
||||
snmpTargetParamsStorageType OBJECT-TYPE
|
||||
SYNTAX StorageType
|
||||
MAX-ACCESS read-create
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The storage type for this conceptual row.
|
||||
Conceptual rows having the value 'permanent' need not
|
||||
allow write-access to any columnar objects in the row."
|
||||
DEFVAL { nonVolatile }
|
||||
::= { snmpTargetParamsEntry 6 }
|
||||
|
||||
snmpTargetParamsRowStatus OBJECT-TYPE
|
||||
SYNTAX RowStatus
|
||||
MAX-ACCESS read-create
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The status of this conceptual row.
|
||||
|
||||
To create a row in this table, a manager must
|
||||
set this object to either createAndGo(4) or
|
||||
createAndWait(5).
|
||||
|
||||
Until instances of all corresponding columns are
|
||||
appropriately configured, the value of the
|
||||
corresponding instance of the snmpTargetParamsRowStatus
|
||||
column is 'notReady'.
|
||||
|
||||
In particular, a newly created row cannot be made
|
||||
active until the corresponding
|
||||
snmpTargetParamsMPModel,
|
||||
snmpTargetParamsSecurityModel,
|
||||
snmpTargetParamsSecurityName,
|
||||
and snmpTargetParamsSecurityLevel have all been set.
|
||||
|
||||
The following objects may not be modified while the
|
||||
value of this object is active(1):
|
||||
- snmpTargetParamsMPModel
|
||||
- snmpTargetParamsSecurityModel
|
||||
- snmpTargetParamsSecurityName
|
||||
- snmpTargetParamsSecurityLevel
|
||||
An attempt to set these objects while the value of
|
||||
snmpTargetParamsRowStatus is active(1) will result in
|
||||
an inconsistentValue error."
|
||||
::= { snmpTargetParamsEntry 7 }
|
||||
|
||||
snmpUnavailableContexts OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of packets received by the SNMP
|
||||
engine which were dropped because the context
|
||||
contained in the message was unavailable."
|
||||
::= { snmpTargetObjects 4 }
|
||||
|
||||
snmpUnknownContexts OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of packets received by the SNMP
|
||||
engine which were dropped because the context
|
||||
contained in the message was unknown."
|
||||
::= { snmpTargetObjects 5 }
|
||||
|
||||
--
|
||||
--
|
||||
-- Conformance information
|
||||
--
|
||||
--
|
||||
|
||||
snmpTargetCompliances OBJECT IDENTIFIER ::=
|
||||
{ snmpTargetConformance 1 }
|
||||
snmpTargetGroups OBJECT IDENTIFIER ::=
|
||||
{ snmpTargetConformance 2 }
|
||||
|
||||
--
|
||||
--
|
||||
-- Compliance statements
|
||||
|
||||
--
|
||||
--
|
||||
|
||||
snmpTargetCommandResponderCompliance MODULE-COMPLIANCE
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The compliance statement for SNMP entities which include
|
||||
a command responder application."
|
||||
MODULE -- This Module
|
||||
MANDATORY-GROUPS { snmpTargetCommandResponderGroup }
|
||||
::= { snmpTargetCompliances 1 }
|
||||
|
||||
snmpTargetBasicGroup OBJECT-GROUP
|
||||
OBJECTS {
|
||||
snmpTargetSpinLock,
|
||||
snmpTargetAddrTDomain,
|
||||
snmpTargetAddrTAddress,
|
||||
snmpTargetAddrTagList,
|
||||
snmpTargetAddrParams,
|
||||
snmpTargetAddrStorageType,
|
||||
snmpTargetAddrRowStatus,
|
||||
snmpTargetParamsMPModel,
|
||||
snmpTargetParamsSecurityModel,
|
||||
snmpTargetParamsSecurityName,
|
||||
snmpTargetParamsSecurityLevel,
|
||||
snmpTargetParamsStorageType,
|
||||
snmpTargetParamsRowStatus
|
||||
}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A collection of objects providing basic remote
|
||||
configuration of management targets."
|
||||
::= { snmpTargetGroups 1 }
|
||||
|
||||
snmpTargetResponseGroup OBJECT-GROUP
|
||||
OBJECTS {
|
||||
snmpTargetAddrTimeout,
|
||||
snmpTargetAddrRetryCount
|
||||
}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A collection of objects providing remote configuration
|
||||
of management targets for applications which generate
|
||||
SNMP messages for which a response message would be
|
||||
expected."
|
||||
::= { snmpTargetGroups 2 }
|
||||
|
||||
snmpTargetCommandResponderGroup OBJECT-GROUP
|
||||
|
||||
OBJECTS {
|
||||
snmpUnavailableContexts,
|
||||
snmpUnknownContexts
|
||||
}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A collection of objects required for command responder
|
||||
applications, used for counting error conditions."
|
||||
::= { snmpTargetGroups 3 }
|
||||
|
||||
END
|
||||
322
src/mibs/SNMPv2-CONF.txt
Normal file
322
src/mibs/SNMPv2-CONF.txt
Normal file
@@ -0,0 +1,322 @@
|
||||
SNMPv2-CONF DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS ObjectName, NotificationName, ObjectSyntax
|
||||
FROM SNMPv2-SMI;
|
||||
|
||||
-- definitions for conformance groups
|
||||
|
||||
OBJECT-GROUP MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
ObjectsPart
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
ObjectsPart ::=
|
||||
"OBJECTS" "{" Objects "}"
|
||||
Objects ::=
|
||||
Object
|
||||
| Objects "," Object
|
||||
Object ::=
|
||||
|
||||
value(ObjectName)
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
-- a character string as defined in [2]
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
-- more definitions for conformance groups
|
||||
|
||||
NOTIFICATION-GROUP MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
NotificationsPart
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
NotificationsPart ::=
|
||||
"NOTIFICATIONS" "{" Notifications "}"
|
||||
Notifications ::=
|
||||
Notification
|
||||
| Notifications "," Notification
|
||||
Notification ::=
|
||||
value(NotificationName)
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
-- a character string as defined in [2]
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
-- definitions for compliance statements
|
||||
|
||||
MODULE-COMPLIANCE MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
ModulePart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
ModulePart ::=
|
||||
Modules
|
||||
Modules ::=
|
||||
Module
|
||||
| Modules Module
|
||||
Module ::=
|
||||
-- name of module --
|
||||
"MODULE" ModuleName
|
||||
MandatoryPart
|
||||
CompliancePart
|
||||
|
||||
ModuleName ::=
|
||||
-- identifier must start with uppercase letter
|
||||
identifier ModuleIdentifier
|
||||
-- must not be empty unless contained
|
||||
-- in MIB Module
|
||||
| empty
|
||||
ModuleIdentifier ::=
|
||||
value(OBJECT IDENTIFIER)
|
||||
| empty
|
||||
|
||||
MandatoryPart ::=
|
||||
"MANDATORY-GROUPS" "{" Groups "}"
|
||||
| empty
|
||||
|
||||
Groups ::=
|
||||
|
||||
Group
|
||||
| Groups "," Group
|
||||
Group ::=
|
||||
value(OBJECT IDENTIFIER)
|
||||
|
||||
CompliancePart ::=
|
||||
Compliances
|
||||
| empty
|
||||
|
||||
Compliances ::=
|
||||
Compliance
|
||||
| Compliances Compliance
|
||||
Compliance ::=
|
||||
ComplianceGroup
|
||||
| Object
|
||||
|
||||
ComplianceGroup ::=
|
||||
"GROUP" value(OBJECT IDENTIFIER)
|
||||
"DESCRIPTION" Text
|
||||
|
||||
Object ::=
|
||||
"OBJECT" value(ObjectName)
|
||||
SyntaxPart
|
||||
WriteSyntaxPart
|
||||
AccessPart
|
||||
"DESCRIPTION" Text
|
||||
|
||||
-- must be a refinement for object's SYNTAX clause
|
||||
SyntaxPart ::= "SYNTAX" Syntax
|
||||
| empty
|
||||
|
||||
-- must be a refinement for object's SYNTAX clause
|
||||
WriteSyntaxPart ::= "WRITE-SYNTAX" Syntax
|
||||
| empty
|
||||
|
||||
Syntax ::= -- Must be one of the following:
|
||||
-- a base type (or its refinement),
|
||||
-- a textual convention (or its refinement), or
|
||||
-- a BITS pseudo-type
|
||||
type
|
||||
| "BITS" "{" NamedBits "}"
|
||||
|
||||
NamedBits ::= NamedBit
|
||||
| NamedBits "," NamedBit
|
||||
|
||||
NamedBit ::= identifier "(" number ")" -- number is nonnegative
|
||||
|
||||
AccessPart ::=
|
||||
"MIN-ACCESS" Access
|
||||
| empty
|
||||
Access ::=
|
||||
"not-accessible"
|
||||
| "accessible-for-notify"
|
||||
| "read-only"
|
||||
| "read-write"
|
||||
| "read-create"
|
||||
|
||||
-- a character string as defined in [2]
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
-- definitions for capabilities statements
|
||||
|
||||
AGENT-CAPABILITIES MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"PRODUCT-RELEASE" Text
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
ModulePart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
ModulePart ::=
|
||||
Modules
|
||||
| empty
|
||||
Modules ::=
|
||||
Module
|
||||
| Modules Module
|
||||
Module ::=
|
||||
-- name of module --
|
||||
"SUPPORTS" ModuleName
|
||||
"INCLUDES" "{" Groups "}"
|
||||
VariationPart
|
||||
|
||||
ModuleName ::=
|
||||
|
||||
-- identifier must start with uppercase letter
|
||||
identifier ModuleIdentifier
|
||||
ModuleIdentifier ::=
|
||||
value(OBJECT IDENTIFIER)
|
||||
| empty
|
||||
|
||||
Groups ::=
|
||||
Group
|
||||
| Groups "," Group
|
||||
Group ::=
|
||||
value(OBJECT IDENTIFIER)
|
||||
|
||||
VariationPart ::=
|
||||
Variations
|
||||
| empty
|
||||
Variations ::=
|
||||
Variation
|
||||
| Variations Variation
|
||||
|
||||
Variation ::=
|
||||
ObjectVariation
|
||||
| NotificationVariation
|
||||
|
||||
NotificationVariation ::=
|
||||
"VARIATION" value(NotificationName)
|
||||
AccessPart
|
||||
"DESCRIPTION" Text
|
||||
|
||||
ObjectVariation ::=
|
||||
"VARIATION" value(ObjectName)
|
||||
SyntaxPart
|
||||
WriteSyntaxPart
|
||||
AccessPart
|
||||
CreationPart
|
||||
DefValPart
|
||||
"DESCRIPTION" Text
|
||||
|
||||
-- must be a refinement for object's SYNTAX clause
|
||||
SyntaxPart ::= "SYNTAX" Syntax
|
||||
| empty
|
||||
|
||||
WriteSyntaxPart ::= "WRITE-SYNTAX" Syntax
|
||||
| empty
|
||||
|
||||
Syntax ::= -- Must be one of the following:
|
||||
-- a base type (or its refinement),
|
||||
-- a textual convention (or its refinement), or
|
||||
-- a BITS pseudo-type
|
||||
|
||||
type
|
||||
| "BITS" "{" NamedBits "}"
|
||||
|
||||
NamedBits ::= NamedBit
|
||||
| NamedBits "," NamedBit
|
||||
|
||||
NamedBit ::= identifier "(" number ")" -- number is nonnegative
|
||||
|
||||
AccessPart ::=
|
||||
"ACCESS" Access
|
||||
| empty
|
||||
|
||||
Access ::=
|
||||
"not-implemented"
|
||||
-- only "not-implemented" for notifications
|
||||
| "accessible-for-notify"
|
||||
| "read-only"
|
||||
| "read-write"
|
||||
| "read-create"
|
||||
-- following is for backward-compatibility only
|
||||
| "write-only"
|
||||
|
||||
CreationPart ::=
|
||||
"CREATION-REQUIRES" "{" Cells "}"
|
||||
| empty
|
||||
Cells ::=
|
||||
Cell
|
||||
| Cells "," Cell
|
||||
Cell ::=
|
||||
value(ObjectName)
|
||||
|
||||
DefValPart ::= "DEFVAL" "{" Defvalue "}"
|
||||
| empty
|
||||
|
||||
Defvalue ::= -- must be valid for the object's syntax
|
||||
-- in this macro's SYNTAX clause, if present,
|
||||
-- or if not, in object's OBJECT-TYPE macro
|
||||
value(ObjectSyntax)
|
||||
| "{" BitsValue "}"
|
||||
|
||||
BitsValue ::= BitNames
|
||||
| empty
|
||||
|
||||
BitNames ::= BitName
|
||||
| BitNames "," BitName
|
||||
|
||||
BitName ::= identifier
|
||||
|
||||
-- a character string as defined in [2]
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
END
|
||||
854
src/mibs/SNMPv2-MIB.txt
Normal file
854
src/mibs/SNMPv2-MIB.txt
Normal file
@@ -0,0 +1,854 @@
|
||||
SNMPv2-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
|
||||
TimeTicks, Counter32, snmpModules, mib-2
|
||||
FROM SNMPv2-SMI
|
||||
DisplayString, TestAndIncr, TimeStamp
|
||||
|
||||
FROM SNMPv2-TC
|
||||
MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
|
||||
FROM SNMPv2-CONF;
|
||||
|
||||
snmpMIB MODULE-IDENTITY
|
||||
LAST-UPDATED "200210160000Z"
|
||||
ORGANIZATION "IETF SNMPv3 Working Group"
|
||||
CONTACT-INFO
|
||||
"WG-EMail: snmpv3@lists.tislabs.com
|
||||
Subscribe: snmpv3-request@lists.tislabs.com
|
||||
|
||||
Co-Chair: Russ Mundy
|
||||
Network Associates Laboratories
|
||||
postal: 15204 Omega Drive, Suite 300
|
||||
Rockville, MD 20850-4601
|
||||
USA
|
||||
EMail: mundy@tislabs.com
|
||||
phone: +1 301 947-7107
|
||||
|
||||
Co-Chair: David Harrington
|
||||
Enterasys Networks
|
||||
postal: 35 Industrial Way
|
||||
P. O. Box 5005
|
||||
Rochester, NH 03866-5005
|
||||
USA
|
||||
EMail: dbh@enterasys.com
|
||||
phone: +1 603 337-2614
|
||||
|
||||
Editor: Randy Presuhn
|
||||
BMC Software, Inc.
|
||||
postal: 2141 North First Street
|
||||
San Jose, CA 95131
|
||||
USA
|
||||
EMail: randy_presuhn@bmc.com
|
||||
phone: +1 408 546-1006"
|
||||
DESCRIPTION
|
||||
"The MIB module for SNMP entities.
|
||||
|
||||
Copyright (C) The Internet Society (2002). This
|
||||
version of this MIB module is part of RFC 3418;
|
||||
see the RFC itself for full legal notices.
|
||||
"
|
||||
REVISION "200210160000Z"
|
||||
DESCRIPTION
|
||||
"This revision of this MIB module was published as
|
||||
RFC 3418."
|
||||
REVISION "199511090000Z"
|
||||
DESCRIPTION
|
||||
"This revision of this MIB module was published as
|
||||
RFC 1907."
|
||||
REVISION "199304010000Z"
|
||||
DESCRIPTION
|
||||
"The initial revision of this MIB module was published
|
||||
as RFC 1450."
|
||||
::= { snmpModules 1 }
|
||||
|
||||
snmpMIBObjects OBJECT IDENTIFIER ::= { snmpMIB 1 }
|
||||
|
||||
-- ::= { snmpMIBObjects 1 } this OID is obsolete
|
||||
-- ::= { snmpMIBObjects 2 } this OID is obsolete
|
||||
-- ::= { snmpMIBObjects 3 } this OID is obsolete
|
||||
|
||||
-- the System group
|
||||
--
|
||||
-- a collection of objects common to all managed systems.
|
||||
|
||||
system OBJECT IDENTIFIER ::= { mib-2 1 }
|
||||
|
||||
sysDescr OBJECT-TYPE
|
||||
SYNTAX DisplayString (SIZE (0..255))
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A textual description of the entity. This value should
|
||||
include the full name and version identification of
|
||||
the system's hardware type, software operating-system,
|
||||
and networking software."
|
||||
::= { system 1 }
|
||||
|
||||
sysObjectID OBJECT-TYPE
|
||||
SYNTAX OBJECT IDENTIFIER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The vendor's authoritative identification of the
|
||||
network management subsystem contained in the entity.
|
||||
This value is allocated within the SMI enterprises
|
||||
subtree (1.3.6.1.4.1) and provides an easy and
|
||||
unambiguous means for determining `what kind of box' is
|
||||
being managed. For example, if vendor `Flintstones,
|
||||
Inc.' was assigned the subtree 1.3.6.1.4.1.424242,
|
||||
it could assign the identifier 1.3.6.1.4.1.424242.1.1
|
||||
to its `Fred Router'."
|
||||
::= { system 2 }
|
||||
|
||||
sysUpTime OBJECT-TYPE
|
||||
SYNTAX TimeTicks
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The time (in hundredths of a second) since the
|
||||
network management portion of the system was last
|
||||
re-initialized."
|
||||
::= { system 3 }
|
||||
|
||||
sysContact OBJECT-TYPE
|
||||
SYNTAX DisplayString (SIZE (0..255))
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The textual identification of the contact person for
|
||||
this managed node, together with information on how
|
||||
to contact this person. If no contact information is
|
||||
known, the value is the zero-length string."
|
||||
::= { system 4 }
|
||||
|
||||
sysName OBJECT-TYPE
|
||||
SYNTAX DisplayString (SIZE (0..255))
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An administratively-assigned name for this managed
|
||||
node. By convention, this is the node's fully-qualified
|
||||
domain name. If the name is unknown, the value is
|
||||
the zero-length string."
|
||||
::= { system 5 }
|
||||
|
||||
sysLocation OBJECT-TYPE
|
||||
SYNTAX DisplayString (SIZE (0..255))
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The physical location of this node (e.g., 'telephone
|
||||
closet, 3rd floor'). If the location is unknown, the
|
||||
value is the zero-length string."
|
||||
::= { system 6 }
|
||||
|
||||
sysServices OBJECT-TYPE
|
||||
SYNTAX INTEGER (0..127)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A value which indicates the set of services that this
|
||||
entity may potentially offer. The value is a sum.
|
||||
|
||||
This sum initially takes the value zero. Then, for
|
||||
each layer, L, in the range 1 through 7, that this node
|
||||
performs transactions for, 2 raised to (L - 1) is added
|
||||
to the sum. For example, a node which performs only
|
||||
routing functions would have a value of 4 (2^(3-1)).
|
||||
In contrast, a node which is a host offering application
|
||||
services would have a value of 72 (2^(4-1) + 2^(7-1)).
|
||||
Note that in the context of the Internet suite of
|
||||
protocols, values should be calculated accordingly:
|
||||
|
||||
layer functionality
|
||||
1 physical (e.g., repeaters)
|
||||
2 datalink/subnetwork (e.g., bridges)
|
||||
3 internet (e.g., supports the IP)
|
||||
4 end-to-end (e.g., supports the TCP)
|
||||
7 applications (e.g., supports the SMTP)
|
||||
|
||||
For systems including OSI protocols, layers 5 and 6
|
||||
may also be counted."
|
||||
::= { system 7 }
|
||||
|
||||
-- object resource information
|
||||
--
|
||||
-- a collection of objects which describe the SNMP entity's
|
||||
-- (statically and dynamically configurable) support of
|
||||
-- various MIB modules.
|
||||
|
||||
sysORLastChange OBJECT-TYPE
|
||||
SYNTAX TimeStamp
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The value of sysUpTime at the time of the most recent
|
||||
change in state or value of any instance of sysORID."
|
||||
::= { system 8 }
|
||||
|
||||
sysORTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF SysOREntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The (conceptual) table listing the capabilities of
|
||||
the local SNMP application acting as a command
|
||||
responder with respect to various MIB modules.
|
||||
SNMP entities having dynamically-configurable support
|
||||
of MIB modules will have a dynamically-varying number
|
||||
of conceptual rows."
|
||||
::= { system 9 }
|
||||
|
||||
sysOREntry OBJECT-TYPE
|
||||
SYNTAX SysOREntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An entry (conceptual row) in the sysORTable."
|
||||
INDEX { sysORIndex }
|
||||
::= { sysORTable 1 }
|
||||
|
||||
SysOREntry ::= SEQUENCE {
|
||||
sysORIndex INTEGER,
|
||||
sysORID OBJECT IDENTIFIER,
|
||||
sysORDescr DisplayString,
|
||||
sysORUpTime TimeStamp
|
||||
}
|
||||
|
||||
sysORIndex OBJECT-TYPE
|
||||
SYNTAX INTEGER (1..2147483647)
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The auxiliary variable used for identifying instances
|
||||
of the columnar objects in the sysORTable."
|
||||
::= { sysOREntry 1 }
|
||||
|
||||
sysORID OBJECT-TYPE
|
||||
SYNTAX OBJECT IDENTIFIER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An authoritative identification of a capabilities
|
||||
statement with respect to various MIB modules supported
|
||||
by the local SNMP application acting as a command
|
||||
responder."
|
||||
::= { sysOREntry 2 }
|
||||
|
||||
sysORDescr OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A textual description of the capabilities identified
|
||||
by the corresponding instance of sysORID."
|
||||
::= { sysOREntry 3 }
|
||||
|
||||
sysORUpTime OBJECT-TYPE
|
||||
SYNTAX TimeStamp
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The value of sysUpTime at the time this conceptual
|
||||
row was last instantiated."
|
||||
::= { sysOREntry 4 }
|
||||
|
||||
-- the SNMP group
|
||||
--
|
||||
-- a collection of objects providing basic instrumentation and
|
||||
-- control of an SNMP entity.
|
||||
|
||||
snmp OBJECT IDENTIFIER ::= { mib-2 11 }
|
||||
|
||||
snmpInPkts OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of messages delivered to the SNMP
|
||||
entity from the transport service."
|
||||
::= { snmp 1 }
|
||||
|
||||
snmpInBadVersions OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of SNMP messages which were delivered
|
||||
to the SNMP entity and were for an unsupported SNMP
|
||||
version."
|
||||
::= { snmp 3 }
|
||||
|
||||
snmpInBadCommunityNames OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of community-based SNMP messages (for
|
||||
example, SNMPv1) delivered to the SNMP entity which
|
||||
used an SNMP community name not known to said entity.
|
||||
Also, implementations which authenticate community-based
|
||||
SNMP messages using check(s) in addition to matching
|
||||
the community name (for example, by also checking
|
||||
whether the message originated from a transport address
|
||||
allowed to use a specified community name) MAY include
|
||||
in this value the number of messages which failed the
|
||||
additional check(s). It is strongly RECOMMENDED that
|
||||
|
||||
the documentation for any security model which is used
|
||||
to authenticate community-based SNMP messages specify
|
||||
the precise conditions that contribute to this value."
|
||||
::= { snmp 4 }
|
||||
|
||||
snmpInBadCommunityUses OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of community-based SNMP messages (for
|
||||
example, SNMPv1) delivered to the SNMP entity which
|
||||
represented an SNMP operation that was not allowed for
|
||||
the SNMP community named in the message. The precise
|
||||
conditions under which this counter is incremented
|
||||
(if at all) depend on how the SNMP entity implements
|
||||
its access control mechanism and how its applications
|
||||
interact with that access control mechanism. It is
|
||||
strongly RECOMMENDED that the documentation for any
|
||||
access control mechanism which is used to control access
|
||||
to and visibility of MIB instrumentation specify the
|
||||
precise conditions that contribute to this value."
|
||||
::= { snmp 5 }
|
||||
|
||||
snmpInASNParseErrs OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of ASN.1 or BER errors encountered by
|
||||
the SNMP entity when decoding received SNMP messages."
|
||||
::= { snmp 6 }
|
||||
|
||||
snmpEnableAuthenTraps OBJECT-TYPE
|
||||
SYNTAX INTEGER { enabled(1), disabled(2) }
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Indicates whether the SNMP entity is permitted to
|
||||
generate authenticationFailure traps. The value of this
|
||||
object overrides any configuration information; as such,
|
||||
it provides a means whereby all authenticationFailure
|
||||
traps may be disabled.
|
||||
|
||||
Note that it is strongly recommended that this object
|
||||
be stored in non-volatile memory so that it remains
|
||||
constant across re-initializations of the network
|
||||
management system."
|
||||
::= { snmp 30 }
|
||||
|
||||
snmpSilentDrops OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of Confirmed Class PDUs (such as
|
||||
GetRequest-PDUs, GetNextRequest-PDUs,
|
||||
GetBulkRequest-PDUs, SetRequest-PDUs, and
|
||||
InformRequest-PDUs) delivered to the SNMP entity which
|
||||
were silently dropped because the size of a reply
|
||||
containing an alternate Response Class PDU (such as a
|
||||
Response-PDU) with an empty variable-bindings field
|
||||
was greater than either a local constraint or the
|
||||
maximum message size associated with the originator of
|
||||
the request."
|
||||
::= { snmp 31 }
|
||||
|
||||
snmpProxyDrops OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of Confirmed Class PDUs
|
||||
(such as GetRequest-PDUs, GetNextRequest-PDUs,
|
||||
GetBulkRequest-PDUs, SetRequest-PDUs, and
|
||||
InformRequest-PDUs) delivered to the SNMP entity which
|
||||
were silently dropped because the transmission of
|
||||
the (possibly translated) message to a proxy target
|
||||
failed in a manner (other than a time-out) such that
|
||||
no Response Class PDU (such as a Response-PDU) could
|
||||
be returned."
|
||||
::= { snmp 32 }
|
||||
|
||||
-- information for notifications
|
||||
--
|
||||
-- a collection of objects which allow the SNMP entity, when
|
||||
-- supporting a notification originator application,
|
||||
-- to be configured to generate SNMPv2-Trap-PDUs.
|
||||
|
||||
snmpTrap OBJECT IDENTIFIER ::= { snmpMIBObjects 4 }
|
||||
|
||||
snmpTrapOID OBJECT-TYPE
|
||||
SYNTAX OBJECT IDENTIFIER
|
||||
MAX-ACCESS accessible-for-notify
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The authoritative identification of the notification
|
||||
currently being sent. This variable occurs as
|
||||
the second varbind in every SNMPv2-Trap-PDU and
|
||||
InformRequest-PDU."
|
||||
::= { snmpTrap 1 }
|
||||
|
||||
-- ::= { snmpTrap 2 } this OID is obsolete
|
||||
|
||||
snmpTrapEnterprise OBJECT-TYPE
|
||||
SYNTAX OBJECT IDENTIFIER
|
||||
MAX-ACCESS accessible-for-notify
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The authoritative identification of the enterprise
|
||||
associated with the trap currently being sent. When an
|
||||
SNMP proxy agent is mapping an RFC1157 Trap-PDU
|
||||
into a SNMPv2-Trap-PDU, this variable occurs as the
|
||||
last varbind."
|
||||
::= { snmpTrap 3 }
|
||||
|
||||
-- ::= { snmpTrap 4 } this OID is obsolete
|
||||
|
||||
-- well-known traps
|
||||
|
||||
snmpTraps OBJECT IDENTIFIER ::= { snmpMIBObjects 5 }
|
||||
|
||||
coldStart NOTIFICATION-TYPE
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A coldStart trap signifies that the SNMP entity,
|
||||
supporting a notification originator application, is
|
||||
reinitializing itself and that its configuration may
|
||||
have been altered."
|
||||
::= { snmpTraps 1 }
|
||||
|
||||
warmStart NOTIFICATION-TYPE
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A warmStart trap signifies that the SNMP entity,
|
||||
supporting a notification originator application,
|
||||
is reinitializing itself such that its configuration
|
||||
is unaltered."
|
||||
::= { snmpTraps 2 }
|
||||
|
||||
-- Note the linkDown NOTIFICATION-TYPE ::= { snmpTraps 3 }
|
||||
-- and the linkUp NOTIFICATION-TYPE ::= { snmpTraps 4 }
|
||||
-- are defined in RFC 2863 [RFC2863]
|
||||
|
||||
authenticationFailure NOTIFICATION-TYPE
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An authenticationFailure trap signifies that the SNMP
|
||||
entity has received a protocol message that is not
|
||||
properly authenticated. While all implementations
|
||||
of SNMP entities MAY be capable of generating this
|
||||
trap, the snmpEnableAuthenTraps object indicates
|
||||
whether this trap will be generated."
|
||||
::= { snmpTraps 5 }
|
||||
|
||||
-- Note the egpNeighborLoss notification is defined
|
||||
-- as { snmpTraps 6 } in RFC 1213
|
||||
|
||||
-- the set group
|
||||
--
|
||||
-- a collection of objects which allow several cooperating
|
||||
-- command generator applications to coordinate their use of the
|
||||
-- set operation.
|
||||
|
||||
snmpSet OBJECT IDENTIFIER ::= { snmpMIBObjects 6 }
|
||||
|
||||
snmpSetSerialNo OBJECT-TYPE
|
||||
SYNTAX TestAndIncr
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An advisory lock used to allow several cooperating
|
||||
command generator applications to coordinate their
|
||||
use of the SNMP set operation.
|
||||
|
||||
This object is used for coarse-grain coordination.
|
||||
To achieve fine-grain coordination, one or more similar
|
||||
objects might be defined within each MIB group, as
|
||||
appropriate."
|
||||
::= { snmpSet 1 }
|
||||
|
||||
-- conformance information
|
||||
|
||||
snmpMIBConformance
|
||||
OBJECT IDENTIFIER ::= { snmpMIB 2 }
|
||||
|
||||
snmpMIBCompliances
|
||||
OBJECT IDENTIFIER ::= { snmpMIBConformance 1 }
|
||||
snmpMIBGroups OBJECT IDENTIFIER ::= { snmpMIBConformance 2 }
|
||||
|
||||
-- compliance statements
|
||||
-- ::= { snmpMIBCompliances 1 } this OID is obsolete
|
||||
snmpBasicCompliance MODULE-COMPLIANCE
|
||||
STATUS deprecated
|
||||
DESCRIPTION
|
||||
"The compliance statement for SNMPv2 entities which
|
||||
implement the SNMPv2 MIB.
|
||||
|
||||
This compliance statement is replaced by
|
||||
snmpBasicComplianceRev2."
|
||||
MODULE -- this module
|
||||
MANDATORY-GROUPS { snmpGroup, snmpSetGroup, systemGroup,
|
||||
snmpBasicNotificationsGroup }
|
||||
|
||||
GROUP snmpCommunityGroup
|
||||
DESCRIPTION
|
||||
"This group is mandatory for SNMPv2 entities which
|
||||
support community-based authentication."
|
||||
|
||||
::= { snmpMIBCompliances 2 }
|
||||
|
||||
snmpBasicComplianceRev2 MODULE-COMPLIANCE
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The compliance statement for SNMP entities which
|
||||
implement this MIB module."
|
||||
MODULE -- this module
|
||||
MANDATORY-GROUPS { snmpGroup, snmpSetGroup, systemGroup,
|
||||
snmpBasicNotificationsGroup }
|
||||
|
||||
GROUP snmpCommunityGroup
|
||||
DESCRIPTION
|
||||
"This group is mandatory for SNMP entities which
|
||||
support community-based authentication."
|
||||
|
||||
GROUP snmpWarmStartNotificationGroup
|
||||
DESCRIPTION
|
||||
"This group is mandatory for an SNMP entity which
|
||||
supports command responder applications, and is
|
||||
able to reinitialize itself such that its
|
||||
configuration is unaltered."
|
||||
|
||||
::= { snmpMIBCompliances 3 }
|
||||
|
||||
-- units of conformance
|
||||
|
||||
-- ::= { snmpMIBGroups 1 } this OID is obsolete
|
||||
-- ::= { snmpMIBGroups 2 } this OID is obsolete
|
||||
-- ::= { snmpMIBGroups 3 } this OID is obsolete
|
||||
-- ::= { snmpMIBGroups 4 } this OID is obsolete
|
||||
|
||||
snmpGroup OBJECT-GROUP
|
||||
OBJECTS { snmpInPkts,
|
||||
snmpInBadVersions,
|
||||
snmpInASNParseErrs,
|
||||
snmpSilentDrops,
|
||||
snmpProxyDrops,
|
||||
snmpEnableAuthenTraps }
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A collection of objects providing basic instrumentation
|
||||
and control of an SNMP entity."
|
||||
::= { snmpMIBGroups 8 }
|
||||
|
||||
snmpCommunityGroup OBJECT-GROUP
|
||||
OBJECTS { snmpInBadCommunityNames,
|
||||
snmpInBadCommunityUses }
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A collection of objects providing basic instrumentation
|
||||
of a SNMP entity which supports community-based
|
||||
authentication."
|
||||
::= { snmpMIBGroups 9 }
|
||||
|
||||
snmpSetGroup OBJECT-GROUP
|
||||
OBJECTS { snmpSetSerialNo }
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A collection of objects which allow several cooperating
|
||||
command generator applications to coordinate their
|
||||
use of the set operation."
|
||||
::= { snmpMIBGroups 5 }
|
||||
|
||||
systemGroup OBJECT-GROUP
|
||||
OBJECTS { sysDescr, sysObjectID, sysUpTime,
|
||||
sysContact, sysName, sysLocation,
|
||||
sysServices,
|
||||
sysORLastChange, sysORID,
|
||||
sysORUpTime, sysORDescr }
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The system group defines objects which are common to all
|
||||
managed systems."
|
||||
::= { snmpMIBGroups 6 }
|
||||
|
||||
snmpBasicNotificationsGroup NOTIFICATION-GROUP
|
||||
NOTIFICATIONS { coldStart, authenticationFailure }
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The basic notifications implemented by an SNMP entity
|
||||
supporting command responder applications."
|
||||
::= { snmpMIBGroups 7 }
|
||||
|
||||
snmpWarmStartNotificationGroup NOTIFICATION-GROUP
|
||||
NOTIFICATIONS { warmStart }
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An additional notification for an SNMP entity supporting
|
||||
command responder applications, if it is able to reinitialize
|
||||
itself such that its configuration is unaltered."
|
||||
::= { snmpMIBGroups 11 }
|
||||
|
||||
snmpNotificationGroup OBJECT-GROUP
|
||||
OBJECTS { snmpTrapOID, snmpTrapEnterprise }
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"These objects are required for entities
|
||||
which support notification originator applications."
|
||||
::= { snmpMIBGroups 12 }
|
||||
|
||||
-- definitions in RFC 1213 made obsolete by the inclusion of a
|
||||
-- subset of the snmp group in this MIB
|
||||
|
||||
snmpOutPkts OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP Messages which were
|
||||
passed from the SNMP protocol entity to the
|
||||
transport service."
|
||||
::= { snmp 2 }
|
||||
|
||||
-- { snmp 7 } is not used
|
||||
|
||||
snmpInTooBigs OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP PDUs which were
|
||||
delivered to the SNMP protocol entity and for
|
||||
which the value of the error-status field was
|
||||
`tooBig'."
|
||||
::= { snmp 8 }
|
||||
|
||||
snmpInNoSuchNames OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP PDUs which were
|
||||
delivered to the SNMP protocol entity and for
|
||||
which the value of the error-status field was
|
||||
`noSuchName'."
|
||||
::= { snmp 9 }
|
||||
|
||||
snmpInBadValues OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP PDUs which were
|
||||
delivered to the SNMP protocol entity and for
|
||||
which the value of the error-status field was
|
||||
`badValue'."
|
||||
::= { snmp 10 }
|
||||
|
||||
snmpInReadOnlys OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number valid SNMP PDUs which were delivered
|
||||
to the SNMP protocol entity and for which the value
|
||||
of the error-status field was `readOnly'. It should
|
||||
be noted that it is a protocol error to generate an
|
||||
SNMP PDU which contains the value `readOnly' in the
|
||||
error-status field, as such this object is provided
|
||||
as a means of detecting incorrect implementations of
|
||||
the SNMP."
|
||||
::= { snmp 11 }
|
||||
|
||||
snmpInGenErrs OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP PDUs which were delivered
|
||||
to the SNMP protocol entity and for which the value
|
||||
of the error-status field was `genErr'."
|
||||
::= { snmp 12 }
|
||||
|
||||
snmpInTotalReqVars OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of MIB objects which have been
|
||||
retrieved successfully by the SNMP protocol entity
|
||||
as the result of receiving valid SNMP Get-Request
|
||||
and Get-Next PDUs."
|
||||
::= { snmp 13 }
|
||||
|
||||
snmpInTotalSetVars OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of MIB objects which have been
|
||||
altered successfully by the SNMP protocol entity as
|
||||
the result of receiving valid SNMP Set-Request PDUs."
|
||||
::= { snmp 14 }
|
||||
|
||||
snmpInGetRequests OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP Get-Request PDUs which
|
||||
have been accepted and processed by the SNMP
|
||||
protocol entity."
|
||||
::= { snmp 15 }
|
||||
|
||||
snmpInGetNexts OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP Get-Next PDUs which have been
|
||||
accepted and processed by the SNMP protocol entity."
|
||||
::= { snmp 16 }
|
||||
|
||||
snmpInSetRequests OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP Set-Request PDUs which
|
||||
have been accepted and processed by the SNMP protocol
|
||||
entity."
|
||||
::= { snmp 17 }
|
||||
|
||||
snmpInGetResponses OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP Get-Response PDUs which
|
||||
have been accepted and processed by the SNMP protocol
|
||||
entity."
|
||||
::= { snmp 18 }
|
||||
|
||||
snmpInTraps OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP Trap PDUs which have been
|
||||
accepted and processed by the SNMP protocol entity."
|
||||
::= { snmp 19 }
|
||||
|
||||
snmpOutTooBigs OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP PDUs which were generated
|
||||
by the SNMP protocol entity and for which the value
|
||||
of the error-status field was `tooBig.'"
|
||||
::= { snmp 20 }
|
||||
|
||||
snmpOutNoSuchNames OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP PDUs which were generated
|
||||
by the SNMP protocol entity and for which the value
|
||||
of the error-status was `noSuchName'."
|
||||
::= { snmp 21 }
|
||||
|
||||
snmpOutBadValues OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP PDUs which were generated
|
||||
by the SNMP protocol entity and for which the value
|
||||
of the error-status field was `badValue'."
|
||||
::= { snmp 22 }
|
||||
|
||||
-- { snmp 23 } is not used
|
||||
|
||||
snmpOutGenErrs OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP PDUs which were generated
|
||||
by the SNMP protocol entity and for which the value
|
||||
of the error-status field was `genErr'."
|
||||
::= { snmp 24 }
|
||||
|
||||
snmpOutGetRequests OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP Get-Request PDUs which
|
||||
have been generated by the SNMP protocol entity."
|
||||
::= { snmp 25 }
|
||||
|
||||
snmpOutGetNexts OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP Get-Next PDUs which have
|
||||
been generated by the SNMP protocol entity."
|
||||
::= { snmp 26 }
|
||||
|
||||
snmpOutSetRequests OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP Set-Request PDUs which
|
||||
have been generated by the SNMP protocol entity."
|
||||
::= { snmp 27 }
|
||||
|
||||
snmpOutGetResponses OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP Get-Response PDUs which
|
||||
have been generated by the SNMP protocol entity."
|
||||
::= { snmp 28 }
|
||||
|
||||
snmpOutTraps OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"The total number of SNMP Trap PDUs which have
|
||||
been generated by the SNMP protocol entity."
|
||||
::= { snmp 29 }
|
||||
|
||||
snmpObsoleteGroup OBJECT-GROUP
|
||||
OBJECTS { snmpOutPkts, snmpInTooBigs, snmpInNoSuchNames,
|
||||
snmpInBadValues, snmpInReadOnlys, snmpInGenErrs,
|
||||
snmpInTotalReqVars, snmpInTotalSetVars,
|
||||
snmpInGetRequests, snmpInGetNexts, snmpInSetRequests,
|
||||
snmpInGetResponses, snmpInTraps, snmpOutTooBigs,
|
||||
snmpOutNoSuchNames, snmpOutBadValues,
|
||||
snmpOutGenErrs, snmpOutGetRequests, snmpOutGetNexts,
|
||||
snmpOutSetRequests, snmpOutGetResponses, snmpOutTraps
|
||||
}
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"A collection of objects from RFC 1213 made obsolete
|
||||
by this MIB module."
|
||||
::= { snmpMIBGroups 10 }
|
||||
|
||||
END
|
||||
344
src/mibs/SNMPv2-SMI.txt
Normal file
344
src/mibs/SNMPv2-SMI.txt
Normal file
@@ -0,0 +1,344 @@
|
||||
SNMPv2-SMI DEFINITIONS ::= BEGIN
|
||||
|
||||
-- the path to the root
|
||||
|
||||
org OBJECT IDENTIFIER ::= { iso 3 } -- "iso" = 1
|
||||
dod OBJECT IDENTIFIER ::= { org 6 }
|
||||
internet OBJECT IDENTIFIER ::= { dod 1 }
|
||||
|
||||
directory OBJECT IDENTIFIER ::= { internet 1 }
|
||||
|
||||
mgmt OBJECT IDENTIFIER ::= { internet 2 }
|
||||
mib-2 OBJECT IDENTIFIER ::= { mgmt 1 }
|
||||
transmission OBJECT IDENTIFIER ::= { mib-2 10 }
|
||||
|
||||
experimental OBJECT IDENTIFIER ::= { internet 3 }
|
||||
|
||||
private OBJECT IDENTIFIER ::= { internet 4 }
|
||||
enterprises OBJECT IDENTIFIER ::= { private 1 }
|
||||
|
||||
security OBJECT IDENTIFIER ::= { internet 5 }
|
||||
|
||||
snmpV2 OBJECT IDENTIFIER ::= { internet 6 }
|
||||
|
||||
-- transport domains
|
||||
snmpDomains OBJECT IDENTIFIER ::= { snmpV2 1 }
|
||||
|
||||
-- transport proxies
|
||||
snmpProxys OBJECT IDENTIFIER ::= { snmpV2 2 }
|
||||
|
||||
-- module identities
|
||||
snmpModules OBJECT IDENTIFIER ::= { snmpV2 3 }
|
||||
|
||||
-- Extended UTCTime, to allow dates with four-digit years
|
||||
-- (Note that this definition of ExtUTCTime is not to be IMPORTed
|
||||
-- by MIB modules.)
|
||||
ExtUTCTime ::= OCTET STRING(SIZE(11 | 13))
|
||||
-- format is YYMMDDHHMMZ or YYYYMMDDHHMMZ
|
||||
|
||||
-- where: YY - last two digits of year (only years
|
||||
-- between 1900-1999)
|
||||
-- YYYY - last four digits of the year (any year)
|
||||
-- MM - month (01 through 12)
|
||||
-- DD - day of month (01 through 31)
|
||||
-- HH - hours (00 through 23)
|
||||
-- MM - minutes (00 through 59)
|
||||
-- Z - denotes GMT (the ASCII character Z)
|
||||
--
|
||||
-- For example, "9502192015Z" and "199502192015Z" represent
|
||||
-- 8:15pm GMT on 19 February 1995. Years after 1999 must use
|
||||
-- the four digit year format. Years 1900-1999 may use the
|
||||
-- two or four digit format.
|
||||
|
||||
-- definitions for information modules
|
||||
|
||||
MODULE-IDENTITY MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"LAST-UPDATED" value(Update ExtUTCTime)
|
||||
"ORGANIZATION" Text
|
||||
"CONTACT-INFO" Text
|
||||
"DESCRIPTION" Text
|
||||
RevisionPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
RevisionPart ::=
|
||||
Revisions
|
||||
| empty
|
||||
Revisions ::=
|
||||
Revision
|
||||
| Revisions Revision
|
||||
Revision ::=
|
||||
"REVISION" value(Update ExtUTCTime)
|
||||
"DESCRIPTION" Text
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
OBJECT-IDENTITY MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
|
||||
ReferPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE OBJECT IDENTIFIER)
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
-- names of objects
|
||||
-- (Note that these definitions of ObjectName and NotificationName
|
||||
-- are not to be IMPORTed by MIB modules.)
|
||||
|
||||
ObjectName ::=
|
||||
OBJECT IDENTIFIER
|
||||
|
||||
NotificationName ::=
|
||||
OBJECT IDENTIFIER
|
||||
|
||||
-- syntax of objects
|
||||
|
||||
-- the "base types" defined here are:
|
||||
-- 3 built-in ASN.1 types: INTEGER, OCTET STRING, OBJECT IDENTIFIER
|
||||
-- 8 application-defined types: Integer32, IpAddress, Counter32,
|
||||
-- Gauge32, Unsigned32, TimeTicks, Opaque, and Counter64
|
||||
|
||||
ObjectSyntax ::=
|
||||
CHOICE {
|
||||
simple
|
||||
SimpleSyntax,
|
||||
-- note that SEQUENCEs for conceptual tables and
|
||||
-- rows are not mentioned here...
|
||||
|
||||
application-wide
|
||||
ApplicationSyntax
|
||||
}
|
||||
|
||||
-- built-in ASN.1 types
|
||||
|
||||
SimpleSyntax ::=
|
||||
CHOICE {
|
||||
-- INTEGERs with a more restrictive range
|
||||
-- may also be used
|
||||
integer-value -- includes Integer32
|
||||
INTEGER (-2147483648..2147483647),
|
||||
-- OCTET STRINGs with a more restrictive size
|
||||
-- may also be used
|
||||
string-value
|
||||
OCTET STRING (SIZE (0..65535)),
|
||||
objectID-value
|
||||
OBJECT IDENTIFIER
|
||||
}
|
||||
|
||||
-- indistinguishable from INTEGER, but never needs more than
|
||||
-- 32-bits for a two's complement representation
|
||||
Integer32 ::=
|
||||
INTEGER (-2147483648..2147483647)
|
||||
|
||||
-- application-wide types
|
||||
|
||||
ApplicationSyntax ::=
|
||||
CHOICE {
|
||||
ipAddress-value
|
||||
IpAddress,
|
||||
counter-value
|
||||
Counter32,
|
||||
timeticks-value
|
||||
TimeTicks,
|
||||
arbitrary-value
|
||||
Opaque,
|
||||
big-counter-value
|
||||
Counter64,
|
||||
unsigned-integer-value -- includes Gauge32
|
||||
Unsigned32
|
||||
}
|
||||
|
||||
-- in network-byte order
|
||||
|
||||
-- (this is a tagged type for historical reasons)
|
||||
IpAddress ::=
|
||||
[APPLICATION 0]
|
||||
IMPLICIT OCTET STRING (SIZE (4))
|
||||
|
||||
-- this wraps
|
||||
Counter32 ::=
|
||||
[APPLICATION 1]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
-- this doesn't wrap
|
||||
Gauge32 ::=
|
||||
[APPLICATION 2]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
-- an unsigned 32-bit quantity
|
||||
-- indistinguishable from Gauge32
|
||||
Unsigned32 ::=
|
||||
[APPLICATION 2]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
-- hundredths of seconds since an epoch
|
||||
TimeTicks ::=
|
||||
[APPLICATION 3]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
-- for backward-compatibility only
|
||||
Opaque ::=
|
||||
[APPLICATION 4]
|
||||
IMPLICIT OCTET STRING
|
||||
|
||||
-- for counters that wrap in less than one hour with only 32 bits
|
||||
Counter64 ::=
|
||||
[APPLICATION 6]
|
||||
IMPLICIT INTEGER (0..18446744073709551615)
|
||||
|
||||
-- definition for objects
|
||||
|
||||
OBJECT-TYPE MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
"SYNTAX" Syntax
|
||||
UnitsPart
|
||||
"MAX-ACCESS" Access
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
|
||||
IndexPart
|
||||
DefValPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE ObjectName)
|
||||
|
||||
Syntax ::= -- Must be one of the following:
|
||||
-- a base type (or its refinement),
|
||||
-- a textual convention (or its refinement), or
|
||||
-- a BITS pseudo-type
|
||||
type
|
||||
| "BITS" "{" NamedBits "}"
|
||||
|
||||
NamedBits ::= NamedBit
|
||||
| NamedBits "," NamedBit
|
||||
|
||||
NamedBit ::= identifier "(" number ")" -- number is nonnegative
|
||||
|
||||
UnitsPart ::=
|
||||
"UNITS" Text
|
||||
| empty
|
||||
|
||||
Access ::=
|
||||
"not-accessible"
|
||||
| "accessible-for-notify"
|
||||
| "read-only"
|
||||
| "read-write"
|
||||
| "read-create"
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
IndexPart ::=
|
||||
"INDEX" "{" IndexTypes "}"
|
||||
| "AUGMENTS" "{" Entry "}"
|
||||
| empty
|
||||
IndexTypes ::=
|
||||
IndexType
|
||||
| IndexTypes "," IndexType
|
||||
IndexType ::=
|
||||
"IMPLIED" Index
|
||||
| Index
|
||||
|
||||
Index ::=
|
||||
-- use the SYNTAX value of the
|
||||
-- correspondent OBJECT-TYPE invocation
|
||||
value(ObjectName)
|
||||
Entry ::=
|
||||
-- use the INDEX value of the
|
||||
-- correspondent OBJECT-TYPE invocation
|
||||
value(ObjectName)
|
||||
|
||||
DefValPart ::= "DEFVAL" "{" Defvalue "}"
|
||||
| empty
|
||||
|
||||
Defvalue ::= -- must be valid for the type specified in
|
||||
-- SYNTAX clause of same OBJECT-TYPE macro
|
||||
value(ObjectSyntax)
|
||||
| "{" BitsValue "}"
|
||||
|
||||
BitsValue ::= BitNames
|
||||
| empty
|
||||
|
||||
BitNames ::= BitName
|
||||
| BitNames "," BitName
|
||||
|
||||
BitName ::= identifier
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
-- definitions for notifications
|
||||
|
||||
NOTIFICATION-TYPE MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
ObjectsPart
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE NotificationName)
|
||||
|
||||
ObjectsPart ::=
|
||||
"OBJECTS" "{" Objects "}"
|
||||
| empty
|
||||
Objects ::=
|
||||
Object
|
||||
|
||||
| Objects "," Object
|
||||
Object ::=
|
||||
value(ObjectName)
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
-- a character string as defined in section 3.1.1
|
||||
Text ::= value(IA5String)
|
||||
END
|
||||
|
||||
-- definitions of administrative identifiers
|
||||
|
||||
zeroDotZero OBJECT-IDENTITY
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A value used for null identifiers."
|
||||
::= { 0 0 }
|
||||
|
||||
END
|
||||
772
src/mibs/SNMPv2-TC.txt
Normal file
772
src/mibs/SNMPv2-TC.txt
Normal file
@@ -0,0 +1,772 @@
|
||||
SNMPv2-TC DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
TimeTicks FROM SNMPv2-SMI;
|
||||
|
||||
-- definition of textual conventions
|
||||
|
||||
TEXTUAL-CONVENTION MACRO ::=
|
||||
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
DisplayPart
|
||||
"STATUS" Status
|
||||
"DESCRIPTION" Text
|
||||
ReferPart
|
||||
"SYNTAX" Syntax
|
||||
|
||||
VALUE NOTATION ::=
|
||||
value(VALUE Syntax) -- adapted ASN.1
|
||||
|
||||
DisplayPart ::=
|
||||
"DISPLAY-HINT" Text
|
||||
| empty
|
||||
|
||||
Status ::=
|
||||
"current"
|
||||
| "deprecated"
|
||||
| "obsolete"
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" Text
|
||||
| empty
|
||||
|
||||
-- a character string as defined in [2]
|
||||
Text ::= value(IA5String)
|
||||
|
||||
Syntax ::= -- Must be one of the following:
|
||||
-- a base type (or its refinement), or
|
||||
-- a BITS pseudo-type
|
||||
type
|
||||
| "BITS" "{" NamedBits "}"
|
||||
|
||||
NamedBits ::= NamedBit
|
||||
| NamedBits "," NamedBit
|
||||
|
||||
NamedBit ::= identifier "(" number ")" -- number is nonnegative
|
||||
|
||||
END
|
||||
|
||||
DisplayString ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "255a"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Represents textual information taken from the NVT ASCII
|
||||
|
||||
character set, as defined in pages 4, 10-11 of RFC 854.
|
||||
|
||||
To summarize RFC 854, the NVT ASCII repertoire specifies:
|
||||
|
||||
- the use of character codes 0-127 (decimal)
|
||||
|
||||
- the graphics characters (32-126) are interpreted as
|
||||
US ASCII
|
||||
|
||||
- NUL, LF, CR, BEL, BS, HT, VT and FF have the special
|
||||
meanings specified in RFC 854
|
||||
|
||||
- the other 25 codes have no standard interpretation
|
||||
|
||||
- the sequence 'CR LF' means newline
|
||||
|
||||
- the sequence 'CR NUL' means carriage-return
|
||||
|
||||
- an 'LF' not preceded by a 'CR' means moving to the
|
||||
same column on the next line.
|
||||
|
||||
- the sequence 'CR x' for any x other than LF or NUL is
|
||||
illegal. (Note that this also means that a string may
|
||||
end with either 'CR LF' or 'CR NUL', but not with CR.)
|
||||
|
||||
Any object defined using this syntax may not exceed 255
|
||||
characters in length."
|
||||
SYNTAX OCTET STRING (SIZE (0..255))
|
||||
|
||||
PhysAddress ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "1x:"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Represents media- or physical-level addresses."
|
||||
SYNTAX OCTET STRING
|
||||
|
||||
MacAddress ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "1x:"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Represents an 802 MAC address represented in the
|
||||
`canonical' order defined by IEEE 802.1a, i.e., as if it
|
||||
were transmitted least significant bit first, even though
|
||||
802.5 (in contrast to other 802.x protocols) requires MAC
|
||||
addresses to be transmitted most significant bit first."
|
||||
SYNTAX OCTET STRING (SIZE (6))
|
||||
|
||||
TruthValue ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Represents a boolean value."
|
||||
SYNTAX INTEGER { true(1), false(2) }
|
||||
|
||||
TestAndIncr ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Represents integer-valued information used for atomic
|
||||
operations. When the management protocol is used to specify
|
||||
that an object instance having this syntax is to be
|
||||
modified, the new value supplied via the management protocol
|
||||
must precisely match the value presently held by the
|
||||
instance. If not, the management protocol set operation
|
||||
fails with an error of `inconsistentValue'. Otherwise, if
|
||||
the current value is the maximum value of 2^31-1 (2147483647
|
||||
decimal), then the value held by the instance is wrapped to
|
||||
zero; otherwise, the value held by the instance is
|
||||
incremented by one. (Note that regardless of whether the
|
||||
management protocol set operation succeeds, the variable-
|
||||
binding in the request and response PDUs are identical.)
|
||||
|
||||
The value of the ACCESS clause for objects having this
|
||||
syntax is either `read-write' or `read-create'. When an
|
||||
instance of a columnar object having this syntax is created,
|
||||
any value may be supplied via the management protocol.
|
||||
|
||||
When the network management portion of the system is re-
|
||||
initialized, the value of every object instance having this
|
||||
syntax must either be incremented from its value prior to
|
||||
the re-initialization, or (if the value prior to the re-
|
||||
initialization is unknown) be set to a pseudo-randomly
|
||||
generated value."
|
||||
SYNTAX INTEGER (0..2147483647)
|
||||
|
||||
AutonomousType ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Represents an independently extensible type identification
|
||||
value. It may, for example, indicate a particular sub-tree
|
||||
with further MIB definitions, or define a particular type of
|
||||
protocol or hardware."
|
||||
SYNTAX OBJECT IDENTIFIER
|
||||
|
||||
InstancePointer ::= TEXTUAL-CONVENTION
|
||||
STATUS obsolete
|
||||
DESCRIPTION
|
||||
"A pointer to either a specific instance of a MIB object or
|
||||
a conceptual row of a MIB table in the managed device. In
|
||||
the latter case, by convention, it is the name of the
|
||||
particular instance of the first accessible columnar object
|
||||
in the conceptual row.
|
||||
|
||||
The two uses of this textual convention are replaced by
|
||||
VariablePointer and RowPointer, respectively."
|
||||
SYNTAX OBJECT IDENTIFIER
|
||||
|
||||
VariablePointer ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A pointer to a specific object instance. For example,
|
||||
sysContact.0 or ifInOctets.3."
|
||||
SYNTAX OBJECT IDENTIFIER
|
||||
|
||||
RowPointer ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Represents a pointer to a conceptual row. The value is the
|
||||
name of the instance of the first accessible columnar object
|
||||
in the conceptual row.
|
||||
|
||||
For example, ifIndex.3 would point to the 3rd row in the
|
||||
ifTable (note that if ifIndex were not-accessible, then
|
||||
ifDescr.3 would be used instead)."
|
||||
SYNTAX OBJECT IDENTIFIER
|
||||
|
||||
RowStatus ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The RowStatus textual convention is used to manage the
|
||||
creation and deletion of conceptual rows, and is used as the
|
||||
value of the SYNTAX clause for the status column of a
|
||||
conceptual row (as described in Section 7.7.1 of [2].)
|
||||
|
||||
The status column has six defined values:
|
||||
|
||||
- `active', which indicates that the conceptual row is
|
||||
available for use by the managed device;
|
||||
|
||||
- `notInService', which indicates that the conceptual
|
||||
row exists in the agent, but is unavailable for use by
|
||||
the managed device (see NOTE below); 'notInService' has
|
||||
no implication regarding the internal consistency of
|
||||
the row, availability of resources, or consistency with
|
||||
the current state of the managed device;
|
||||
|
||||
- `notReady', which indicates that the conceptual row
|
||||
exists in the agent, but is missing information
|
||||
necessary in order to be available for use by the
|
||||
managed device (i.e., one or more required columns in
|
||||
the conceptual row have not been instanciated);
|
||||
|
||||
- `createAndGo', which is supplied by a management
|
||||
station wishing to create a new instance of a
|
||||
conceptual row and to have its status automatically set
|
||||
to active, making it available for use by the managed
|
||||
device;
|
||||
|
||||
- `createAndWait', which is supplied by a management
|
||||
station wishing to create a new instance of a
|
||||
conceptual row (but not make it available for use by
|
||||
the managed device); and,
|
||||
- `destroy', which is supplied by a management station
|
||||
wishing to delete all of the instances associated with
|
||||
an existing conceptual row.
|
||||
|
||||
Whereas five of the six values (all except `notReady') may
|
||||
be specified in a management protocol set operation, only
|
||||
three values will be returned in response to a management
|
||||
protocol retrieval operation: `notReady', `notInService' or
|
||||
`active'. That is, when queried, an existing conceptual row
|
||||
has only three states: it is either available for use by
|
||||
the managed device (the status column has value `active');
|
||||
it is not available for use by the managed device, though
|
||||
the agent has sufficient information to attempt to make it
|
||||
so (the status column has value `notInService'); or, it is
|
||||
not available for use by the managed device, and an attempt
|
||||
to make it so would fail because the agent has insufficient
|
||||
information (the state column has value `notReady').
|
||||
|
||||
NOTE WELL
|
||||
|
||||
This textual convention may be used for a MIB table,
|
||||
irrespective of whether the values of that table's
|
||||
conceptual rows are able to be modified while it is
|
||||
active, or whether its conceptual rows must be taken
|
||||
out of service in order to be modified. That is, it is
|
||||
the responsibility of the DESCRIPTION clause of the
|
||||
status column to specify whether the status column must
|
||||
not be `active' in order for the value of some other
|
||||
column of the same conceptual row to be modified. If
|
||||
such a specification is made, affected columns may be
|
||||
changed by an SNMP set PDU if the RowStatus would not
|
||||
be equal to `active' either immediately before or after
|
||||
processing the PDU. In other words, if the PDU also
|
||||
contained a varbind that would change the RowStatus
|
||||
value, the column in question may be changed if the
|
||||
RowStatus was not equal to `active' as the PDU was
|
||||
received, or if the varbind sets the status to a value
|
||||
other than 'active'.
|
||||
|
||||
Also note that whenever any elements of a row exist, the
|
||||
RowStatus column must also exist.
|
||||
|
||||
To summarize the effect of having a conceptual row with a
|
||||
status column having a SYNTAX clause value of RowStatus,
|
||||
consider the following state diagram:
|
||||
|
||||
STATE
|
||||
+--------------+-----------+-------------+-------------
|
||||
| A | B | C | D
|
||||
| |status col.|status column|
|
||||
|status column | is | is |status column
|
||||
ACTION |does not exist| notReady | notInService| is active
|
||||
--------------+--------------+-----------+-------------+-------------
|
||||
set status |noError ->D|inconsist- |inconsistent-|inconsistent-
|
||||
column to | or | entValue| Value| Value
|
||||
createAndGo |inconsistent- | | |
|
||||
| Value| | |
|
||||
--------------+--------------+-----------+-------------+-------------
|
||||
set status |noError see 1|inconsist- |inconsistent-|inconsistent-
|
||||
column to | or | entValue| Value| Value
|
||||
createAndWait |wrongValue | | |
|
||||
--------------+--------------+-----------+-------------+-------------
|
||||
set status |inconsistent- |inconsist- |noError |noError
|
||||
column to | Value| entValue| |
|
||||
active | | | |
|
||||
| | or | |
|
||||
| | | |
|
||||
| |see 2 ->D|see 8 ->D| ->D
|
||||
--------------+--------------+-----------+-------------+-------------
|
||||
set status |inconsistent- |inconsist- |noError |noError ->C
|
||||
column to | Value| entValue| |
|
||||
notInService | | | |
|
||||
| | or | | or
|
||||
| | | |
|
||||
| |see 3 ->C| ->C|see 6
|
||||
--------------+--------------+-----------+-------------+-------------
|
||||
set status |noError |noError |noError |noError ->A
|
||||
column to | | | | or
|
||||
destroy | ->A| ->A| ->A|see 7
|
||||
--------------+--------------+-----------+-------------+-------------
|
||||
set any other |see 4 |noError |noError |see 5
|
||||
column to some| | | |
|
||||
value | | see 1| ->C| ->D
|
||||
--------------+--------------+-----------+-------------+-------------
|
||||
|
||||
(1) goto B or C, depending on information available to the
|
||||
agent.
|
||||
|
||||
(2) if other variable bindings included in the same PDU,
|
||||
provide values for all columns which are missing but
|
||||
required, and all columns have acceptable values, then
|
||||
return noError and goto D.
|
||||
|
||||
(3) if other variable bindings included in the same PDU,
|
||||
provide legal values for all columns which are missing but
|
||||
required, then return noError and goto C.
|
||||
|
||||
(4) at the discretion of the agent, the return value may be
|
||||
either:
|
||||
|
||||
inconsistentName: because the agent does not choose to
|
||||
create such an instance when the corresponding
|
||||
RowStatus instance does not exist, or
|
||||
|
||||
inconsistentValue: if the supplied value is
|
||||
inconsistent with the state of some other MIB object's
|
||||
value, or
|
||||
|
||||
noError: because the agent chooses to create the
|
||||
instance.
|
||||
|
||||
If noError is returned, then the instance of the status
|
||||
column must also be created, and the new state is B or C,
|
||||
depending on the information available to the agent. If
|
||||
inconsistentName or inconsistentValue is returned, the row
|
||||
remains in state A.
|
||||
|
||||
(5) depending on the MIB definition for the column/table,
|
||||
either noError or inconsistentValue may be returned.
|
||||
|
||||
(6) the return value can indicate one of the following
|
||||
errors:
|
||||
|
||||
wrongValue: because the agent does not support
|
||||
notInService (e.g., an agent which does not support
|
||||
createAndWait), or
|
||||
|
||||
inconsistentValue: because the agent is unable to take
|
||||
the row out of service at this time, perhaps because it
|
||||
is in use and cannot be de-activated.
|
||||
|
||||
(7) the return value can indicate the following error:
|
||||
|
||||
inconsistentValue: because the agent is unable to
|
||||
remove the row at this time, perhaps because it is in
|
||||
use and cannot be de-activated.
|
||||
|
||||
(8) the transition to D can fail, e.g., if the values of the
|
||||
conceptual row are inconsistent, then the error code would
|
||||
be inconsistentValue.
|
||||
|
||||
NOTE: Other processing of (this and other varbinds of) the
|
||||
set request may result in a response other than noError
|
||||
being returned, e.g., wrongValue, noCreation, etc.
|
||||
|
||||
Conceptual Row Creation
|
||||
|
||||
There are four potential interactions when creating a
|
||||
conceptual row: selecting an instance-identifier which is
|
||||
not in use; creating the conceptual row; initializing any
|
||||
objects for which the agent does not supply a default; and,
|
||||
making the conceptual row available for use by the managed
|
||||
device.
|
||||
|
||||
Interaction 1: Selecting an Instance-Identifier
|
||||
|
||||
The algorithm used to select an instance-identifier varies
|
||||
for each conceptual row. In some cases, the instance-
|
||||
identifier is semantically significant, e.g., the
|
||||
destination address of a route, and a management station
|
||||
selects the instance-identifier according to the semantics.
|
||||
|
||||
In other cases, the instance-identifier is used solely to
|
||||
distinguish conceptual rows, and a management station
|
||||
without specific knowledge of the conceptual row might
|
||||
examine the instances present in order to determine an
|
||||
unused instance-identifier. (This approach may be used, but
|
||||
it is often highly sub-optimal; however, it is also a
|
||||
questionable practice for a naive management station to
|
||||
attempt conceptual row creation.)
|
||||
|
||||
Alternately, the MIB module which defines the conceptual row
|
||||
might provide one or more objects which provide assistance
|
||||
in determining an unused instance-identifier. For example,
|
||||
if the conceptual row is indexed by an integer-value, then
|
||||
an object having an integer-valued SYNTAX clause might be
|
||||
defined for such a purpose, allowing a management station to
|
||||
issue a management protocol retrieval operation. In order
|
||||
to avoid unnecessary collisions between competing management
|
||||
stations, `adjacent' retrievals of this object should be
|
||||
different.
|
||||
|
||||
Finally, the management station could select a pseudo-random
|
||||
number to use as the index. In the event that this index
|
||||
|
||||
was already in use and an inconsistentValue was returned in
|
||||
response to the management protocol set operation, the
|
||||
management station should simply select a new pseudo-random
|
||||
number and retry the operation.
|
||||
|
||||
A MIB designer should choose between the two latter
|
||||
algorithms based on the size of the table (and therefore the
|
||||
efficiency of each algorithm). For tables in which a large
|
||||
number of entries are expected, it is recommended that a MIB
|
||||
object be defined that returns an acceptable index for
|
||||
creation. For tables with small numbers of entries, it is
|
||||
recommended that the latter pseudo-random index mechanism be
|
||||
used.
|
||||
|
||||
Interaction 2: Creating the Conceptual Row
|
||||
|
||||
Once an unused instance-identifier has been selected, the
|
||||
management station determines if it wishes to create and
|
||||
activate the conceptual row in one transaction or in a
|
||||
negotiated set of interactions.
|
||||
|
||||
Interaction 2a: Creating and Activating the Conceptual Row
|
||||
|
||||
The management station must first determine the column
|
||||
requirements, i.e., it must determine those columns for
|
||||
which it must or must not provide values. Depending on the
|
||||
complexity of the table and the management station's
|
||||
knowledge of the agent's capabilities, this determination
|
||||
can be made locally by the management station. Alternately,
|
||||
the management station issues a management protocol get
|
||||
operation to examine all columns in the conceptual row that
|
||||
it wishes to create. In response, for each column, there
|
||||
are three possible outcomes:
|
||||
|
||||
- a value is returned, indicating that some other
|
||||
management station has already created this conceptual
|
||||
row. We return to interaction 1.
|
||||
|
||||
- the exception `noSuchInstance' is returned,
|
||||
indicating that the agent implements the object-type
|
||||
associated with this column, and that this column in at
|
||||
least one conceptual row would be accessible in the MIB
|
||||
view used by the retrieval were it to exist. For those
|
||||
columns to which the agent provides read-create access,
|
||||
the `noSuchInstance' exception tells the management
|
||||
station that it should supply a value for this column
|
||||
when the conceptual row is to be created.
|
||||
|
||||
- the exception `noSuchObject' is returned, indicating
|
||||
that the agent does not implement the object-type
|
||||
associated with this column or that there is no
|
||||
conceptual row for which this column would be
|
||||
accessible in the MIB view used by the retrieval. As
|
||||
such, the management station can not issue any
|
||||
management protocol set operations to create an
|
||||
instance of this column.
|
||||
|
||||
Once the column requirements have been determined, a
|
||||
management protocol set operation is accordingly issued.
|
||||
This operation also sets the new instance of the status
|
||||
column to `createAndGo'.
|
||||
|
||||
When the agent processes the set operation, it verifies that
|
||||
it has sufficient information to make the conceptual row
|
||||
available for use by the managed device. The information
|
||||
available to the agent is provided by two sources: the
|
||||
management protocol set operation which creates the
|
||||
conceptual row, and, implementation-specific defaults
|
||||
supplied by the agent (note that an agent must provide
|
||||
implementation-specific defaults for at least those objects
|
||||
which it implements as read-only). If there is sufficient
|
||||
information available, then the conceptual row is created, a
|
||||
`noError' response is returned, the status column is set to
|
||||
`active', and no further interactions are necessary (i.e.,
|
||||
interactions 3 and 4 are skipped). If there is insufficient
|
||||
information, then the conceptual row is not created, and the
|
||||
set operation fails with an error of `inconsistentValue'.
|
||||
On this error, the management station can issue a management
|
||||
protocol retrieval operation to determine if this was
|
||||
because it failed to specify a value for a required column,
|
||||
or, because the selected instance of the status column
|
||||
already existed. In the latter case, we return to
|
||||
interaction 1. In the former case, the management station
|
||||
can re-issue the set operation with the additional
|
||||
information, or begin interaction 2 again using
|
||||
`createAndWait' in order to negotiate creation of the
|
||||
conceptual row.
|
||||
|
||||
NOTE WELL
|
||||
|
||||
Regardless of the method used to determine the column
|
||||
requirements, it is possible that the management
|
||||
station might deem a column necessary when, in fact,
|
||||
the agent will not allow that particular columnar
|
||||
instance to be created or written. In this case, the
|
||||
management protocol set operation will fail with an
|
||||
error such as `noCreation' or `notWritable'. In this
|
||||
case, the management station decides whether it needs
|
||||
to be able to set a value for that particular columnar
|
||||
instance. If not, the management station re-issues the
|
||||
management protocol set operation, but without setting
|
||||
a value for that particular columnar instance;
|
||||
otherwise, the management station aborts the row
|
||||
creation algorithm.
|
||||
|
||||
Interaction 2b: Negotiating the Creation of the Conceptual
|
||||
Row
|
||||
|
||||
The management station issues a management protocol set
|
||||
operation which sets the desired instance of the status
|
||||
column to `createAndWait'. If the agent is unwilling to
|
||||
process a request of this sort, the set operation fails with
|
||||
an error of `wrongValue'. (As a consequence, such an agent
|
||||
must be prepared to accept a single management protocol set
|
||||
operation, i.e., interaction 2a above, containing all of the
|
||||
columns indicated by its column requirements.) Otherwise,
|
||||
the conceptual row is created, a `noError' response is
|
||||
returned, and the status column is immediately set to either
|
||||
`notInService' or `notReady', depending on whether it has
|
||||
sufficient information to (attempt to) make the conceptual
|
||||
row available for use by the managed device. If there is
|
||||
sufficient information available, then the status column is
|
||||
set to `notInService'; otherwise, if there is insufficient
|
||||
information, then the status column is set to `notReady'.
|
||||
Regardless, we proceed to interaction 3.
|
||||
|
||||
Interaction 3: Initializing non-defaulted Objects
|
||||
|
||||
The management station must now determine the column
|
||||
requirements. It issues a management protocol get operation
|
||||
to examine all columns in the created conceptual row. In
|
||||
the response, for each column, there are three possible
|
||||
outcomes:
|
||||
|
||||
- a value is returned, indicating that the agent
|
||||
implements the object-type associated with this column
|
||||
and had sufficient information to provide a value. For
|
||||
those columns to which the agent provides read-create
|
||||
access (and for which the agent allows their values to
|
||||
be changed after their creation), a value return tells
|
||||
the management station that it may issue additional
|
||||
management protocol set operations, if it desires, in
|
||||
order to change the value associated with this column.
|
||||
|
||||
- the exception `noSuchInstance' is returned,
|
||||
indicating that the agent implements the object-type
|
||||
associated with this column, and that this column in at
|
||||
least one conceptual row would be accessible in the MIB
|
||||
view used by the retrieval were it to exist. However,
|
||||
the agent does not have sufficient information to
|
||||
provide a value, and until a value is provided, the
|
||||
conceptual row may not be made available for use by the
|
||||
managed device. For those columns to which the agent
|
||||
provides read-create access, the `noSuchInstance'
|
||||
exception tells the management station that it must
|
||||
issue additional management protocol set operations, in
|
||||
order to provide a value associated with this column.
|
||||
|
||||
- the exception `noSuchObject' is returned, indicating
|
||||
that the agent does not implement the object-type
|
||||
associated with this column or that there is no
|
||||
conceptual row for which this column would be
|
||||
accessible in the MIB view used by the retrieval. As
|
||||
such, the management station can not issue any
|
||||
management protocol set operations to create an
|
||||
instance of this column.
|
||||
|
||||
If the value associated with the status column is
|
||||
`notReady', then the management station must first deal with
|
||||
all `noSuchInstance' columns, if any. Having done so, the
|
||||
value of the status column becomes `notInService', and we
|
||||
proceed to interaction 4.
|
||||
|
||||
Interaction 4: Making the Conceptual Row Available
|
||||
|
||||
Once the management station is satisfied with the values
|
||||
associated with the columns of the conceptual row, it issues
|
||||
a management protocol set operation to set the status column
|
||||
to `active'. If the agent has sufficient information to
|
||||
make the conceptual row available for use by the managed
|
||||
device, the management protocol set operation succeeds (a
|
||||
`noError' response is returned). Otherwise, the management
|
||||
protocol set operation fails with an error of
|
||||
`inconsistentValue'.
|
||||
|
||||
NOTE WELL
|
||||
|
||||
A conceptual row having a status column with value
|
||||
`notInService' or `notReady' is unavailable to the
|
||||
managed device. As such, it is possible for the
|
||||
managed device to create its own instances during the
|
||||
time between the management protocol set operation
|
||||
which sets the status column to `createAndWait' and the
|
||||
management protocol set operation which sets the status
|
||||
column to `active'. In this case, when the management
|
||||
protocol set operation is issued to set the status
|
||||
column to `active', the values held in the agent
|
||||
supersede those used by the managed device.
|
||||
|
||||
If the management station is prevented from setting the
|
||||
status column to `active' (e.g., due to management station
|
||||
or network failure) the conceptual row will be left in the
|
||||
`notInService' or `notReady' state, consuming resources
|
||||
indefinitely. The agent must detect conceptual rows that
|
||||
have been in either state for an abnormally long period of
|
||||
time and remove them. It is the responsibility of the
|
||||
DESCRIPTION clause of the status column to indicate what an
|
||||
abnormally long period of time would be. This period of
|
||||
time should be long enough to allow for human response time
|
||||
(including `think time') between the creation of the
|
||||
conceptual row and the setting of the status to `active'.
|
||||
In the absence of such information in the DESCRIPTION
|
||||
clause, it is suggested that this period be approximately 5
|
||||
minutes in length. This removal action applies not only to
|
||||
newly-created rows, but also to previously active rows which
|
||||
are set to, and left in, the notInService state for a
|
||||
prolonged period exceeding that which is considered normal
|
||||
for such a conceptual row.
|
||||
|
||||
Conceptual Row Suspension
|
||||
|
||||
When a conceptual row is `active', the management station
|
||||
may issue a management protocol set operation which sets the
|
||||
instance of the status column to `notInService'. If the
|
||||
agent is unwilling to do so, the set operation fails with an
|
||||
error of `wrongValue' or `inconsistentValue'. Otherwise,
|
||||
the conceptual row is taken out of service, and a `noError'
|
||||
response is returned. It is the responsibility of the
|
||||
DESCRIPTION clause of the status column to indicate under
|
||||
what circumstances the status column should be taken out of
|
||||
service (e.g., in order for the value of some other column
|
||||
of the same conceptual row to be modified).
|
||||
|
||||
Conceptual Row Deletion
|
||||
|
||||
For deletion of conceptual rows, a management protocol set
|
||||
operation is issued which sets the instance of the status
|
||||
column to `destroy'. This request may be made regardless of
|
||||
the current value of the status column (e.g., it is possible
|
||||
to delete conceptual rows which are either `notReady',
|
||||
`notInService' or `active'.) If the operation succeeds,
|
||||
then all instances associated with the conceptual row are
|
||||
immediately removed."
|
||||
SYNTAX INTEGER {
|
||||
-- the following two values are states:
|
||||
-- these values may be read or written
|
||||
active(1),
|
||||
notInService(2),
|
||||
-- the following value is a state:
|
||||
-- this value may be read, but not written
|
||||
notReady(3),
|
||||
-- the following three values are
|
||||
-- actions: these values may be written,
|
||||
-- but are never read
|
||||
createAndGo(4),
|
||||
createAndWait(5),
|
||||
destroy(6)
|
||||
}
|
||||
|
||||
TimeStamp ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The value of the sysUpTime object at which a specific
|
||||
occurrence happened. The specific occurrence must be
|
||||
|
||||
defined in the description of any object defined using this
|
||||
type.
|
||||
|
||||
If sysUpTime is reset to zero as a result of a re-
|
||||
initialization of the network management (sub)system, then
|
||||
the values of all TimeStamp objects are also reset.
|
||||
However, after approximately 497 days without a re-
|
||||
initialization, the sysUpTime object will reach 2^^32-1 and
|
||||
then increment around to zero; in this case, existing values
|
||||
of TimeStamp objects do not change. This can lead to
|
||||
ambiguities in the value of TimeStamp objects."
|
||||
SYNTAX TimeTicks
|
||||
|
||||
TimeInterval ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A period of time, measured in units of 0.01 seconds."
|
||||
SYNTAX INTEGER (0..2147483647)
|
||||
|
||||
DateAndTime ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "2d-1d-1d,1d:1d:1d.1d,1a1d:1d"
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A date-time specification.
|
||||
|
||||
field octets contents range
|
||||
----- ------ -------- -----
|
||||
1 1-2 year* 0..65536
|
||||
2 3 month 1..12
|
||||
3 4 day 1..31
|
||||
4 5 hour 0..23
|
||||
5 6 minutes 0..59
|
||||
6 7 seconds 0..60
|
||||
(use 60 for leap-second)
|
||||
7 8 deci-seconds 0..9
|
||||
8 9 direction from UTC '+' / '-'
|
||||
9 10 hours from UTC* 0..13
|
||||
10 11 minutes from UTC 0..59
|
||||
|
||||
* Notes:
|
||||
- the value of year is in network-byte order
|
||||
- daylight saving time in New Zealand is +13
|
||||
|
||||
For example, Tuesday May 26, 1992 at 1:30:15 PM EDT would be
|
||||
displayed as:
|
||||
|
||||
1992-5-26,13:30:15.0,-4:0
|
||||
|
||||
Note that if only local time is known, then timezone
|
||||
information (fields 8-10) is not present."
|
||||
SYNTAX OCTET STRING (SIZE (8 | 11))
|
||||
|
||||
StorageType ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Describes the memory realization of a conceptual row. A
|
||||
row which is volatile(2) is lost upon reboot. A row which
|
||||
is either nonVolatile(3), permanent(4) or readOnly(5), is
|
||||
backed up by stable storage. A row which is permanent(4)
|
||||
can be changed but not deleted. A row which is readOnly(5)
|
||||
cannot be changed nor deleted.
|
||||
|
||||
If the value of an object with this syntax is either
|
||||
permanent(4) or readOnly(5), it cannot be written.
|
||||
Conversely, if the value is either other(1), volatile(2) or
|
||||
nonVolatile(3), it cannot be modified to be permanent(4) or
|
||||
readOnly(5). (All illegal modifications result in a
|
||||
'wrongValue' error.)
|
||||
|
||||
Every usage of this textual convention is required to
|
||||
specify the columnar objects which a permanent(4) row must
|
||||
at a minimum allow to be writable."
|
||||
SYNTAX INTEGER {
|
||||
other(1), -- eh?
|
||||
volatile(2), -- e.g., in RAM
|
||||
nonVolatile(3), -- e.g., in NVRAM
|
||||
permanent(4), -- e.g., partially in ROM
|
||||
readOnly(5) -- e.g., completely in ROM
|
||||
}
|
||||
|
||||
TDomain ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Denotes a kind of transport service.
|
||||
|
||||
Some possible values, such as snmpUDPDomain, are defined in
|
||||
the SNMPv2-TM MIB module. Other possible values are defined
|
||||
in other MIB modules."
|
||||
REFERENCE "The SNMPv2-TM MIB module is defined in RFC 1906."
|
||||
SYNTAX OBJECT IDENTIFIER
|
||||
|
||||
TAddress ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Denotes a transport service address.
|
||||
|
||||
A TAddress value is always interpreted within the context of a
|
||||
TDomain value. Thus, each definition of a TDomain value must
|
||||
be accompanied by a definition of a textual convention for use
|
||||
with that TDomain. Some possible textual conventions, such as
|
||||
SnmpUDPAddress for snmpUDPDomain, are defined in the SNMPv2-TM
|
||||
MIB module. Other possible textual conventions are defined in
|
||||
other MIB modules."
|
||||
REFERENCE "The SNMPv2-TM MIB module is defined in RFC 1906."
|
||||
SYNTAX OCTET STRING (SIZE (1..255))
|
||||
|
||||
END
|
||||
2301
src/mibs/TOKEN-RING-RMON-MIB
Normal file
2301
src/mibs/TOKEN-RING-RMON-MIB
Normal file
File diff suppressed because it is too large
Load Diff
29
src/mibs/dptech-oid.mib
Normal file
29
src/mibs/dptech-oid.mib
Normal file
@@ -0,0 +1,29 @@
|
||||
DPTECH-OID-MIB DEFINITIONS ::= BEGIN
|
||||
IMPORTS
|
||||
enterprises
|
||||
FROM RFC1155-SMI;
|
||||
|
||||
dptech MODULE-IDENTITY
|
||||
LAST-UPDATED "1101140000Z"
|
||||
ORGANIZATION " dpOid Working"
|
||||
CONTACT-INFO
|
||||
"
|
||||
This MIB will maintain DPtech products .
|
||||
"
|
||||
DESCRIPTION
|
||||
" The MIB module for dpDevice entities . "
|
||||
REVISION "1101140000Z"
|
||||
DESCRIPTION
|
||||
" The initial revision of this MIB module was published as dp dev ."
|
||||
::= { enterprises 31648 }
|
||||
|
||||
dpProductId OBJECT IDENTIFIER ::= { dptech 1 }
|
||||
dpEntityVendorTypeOID OBJECT IDENTIFIER ::= { dptech 2 }
|
||||
dpSystem OBJECT IDENTIFIER ::= { dptech 3 }
|
||||
dpNetwork OBJECT IDENTIFIER ::= { dptech 4 }
|
||||
dpPacketFilter OBJECT IDENTIFIER ::= { dptech 5 }
|
||||
dpDevice OBJECT IDENTIFIER ::= { dptech 6 }
|
||||
dpLoginManagent OBJECT IDENTIFIER ::= { dptech 7 }
|
||||
dpRcpManage OBJECT IDENTIFIER ::= { dptech 8 }
|
||||
|
||||
END
|
||||
153
src/mibs/iana/dptech-device.mib
Normal file
153
src/mibs/iana/dptech-device.mib
Normal file
@@ -0,0 +1,153 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2011 by DPtech Technologies. All rights reserved.
|
||||
--
|
||||
--Description: DPtech Dev MIB
|
||||
--
|
||||
-- Reference: DPtech Enterprise MIB
|
||||
-- Version: V1.00
|
||||
-- History:
|
||||
-- V1.00 2011-01-13 created by zhanghailong
|
||||
-- ============================================================================
|
||||
DPTECH-DEV-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
dpDevice
|
||||
FROM DPTECH-OID-MIB
|
||||
OBJECT-GROUP, MODULE-COMPLIANCE, NOTIFICATION-GROUP
|
||||
FROM SNMPv2-CONF
|
||||
Integer32, OBJECT-TYPE, MODULE-IDENTITY, NOTIFICATION-TYPE, TimeTicks
|
||||
FROM SNMPv2-SMI
|
||||
RowPointer, DateAndTime, DisplayString, RowStatus
|
||||
FROM SNMPv2-TC
|
||||
SnmpTagList, SnmpTagValue
|
||||
FROM SNMP-TARGET-MIB;
|
||||
|
||||
dpSlotTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF DpSlotEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION "A list of slot entries.
|
||||
The number of entries is given by the value of slotNumber.
|
||||
This table contains additional objects for the slot table."
|
||||
::= { dpDevice 1 }
|
||||
|
||||
dpSlotEntry OBJECT-TYPE
|
||||
SYNTAX DpSlotEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An entry containing additional management information
|
||||
applicable to a particular slot."
|
||||
INDEX { dpSlotIndex }
|
||||
::= {dpSlotTable 1}
|
||||
|
||||
DpSlotEntry ::=
|
||||
SEQUENCE {
|
||||
dpSlotIndex INTEGER ,
|
||||
dpSlotType INTEGER,
|
||||
dpSlotDesc DisplayString,
|
||||
dpSlotPortNum INTEGER,
|
||||
dpSlotStatus INTEGER,
|
||||
dpSlotIsMain INTEGER,
|
||||
dpSlotRunTimes DisplayString
|
||||
}
|
||||
|
||||
dpSlotIndex OBJECT-TYPE
|
||||
SYNTAX INTEGER {slotindexAbsent(0)}
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
A value which indicates the index of the slot.
|
||||
"
|
||||
::= { dpSlotEntry 1 }
|
||||
|
||||
dpSlotType OBJECT-TYPE
|
||||
SYNTAX INTEGER {boardUnkown(0),boardMain(1),boardSpare(2),boardNf(3),
|
||||
boardPoise(4),boardFw(5),boardUtm(6),
|
||||
boardIps(7),boardUag(8),boardIniface(9),
|
||||
boardBlock(10),boardPopm(11),boardAopm(12),
|
||||
boardAbsent(13),swBoardMain(31),swBoard8fep(32),
|
||||
swBoard8fet(33),swBoard8fel(34),swBoard6fel(35),
|
||||
swBoard6fes(36),swBoard4gep(37),swBoard2t8p(38),
|
||||
swBoard8t2p(39),swBoard8p2sc(40),swBoard2gep(41)}
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
A value which indicates the type of the slot.
|
||||
"
|
||||
::= { dpSlotEntry 2 }
|
||||
|
||||
dpSlotDesc OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
A character string which indicates the boardtype of the slot.
|
||||
"
|
||||
::= { dpSlotEntry 3 }
|
||||
|
||||
dpSlotPortNum OBJECT-TYPE
|
||||
SYNTAX INTEGER {slotPortNumAbsent(0)}
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
A value which indicates the portnum of the slot.
|
||||
"
|
||||
::= { dpSlotEntry 4 }
|
||||
|
||||
dpSlotStatus OBJECT-TYPE
|
||||
SYNTAX INTEGER { normal(0),abnormal(1),offline(2)}
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
A value which indicates the num of the slot.
|
||||
"
|
||||
::= { dpSlotEntry 5 }
|
||||
|
||||
dpSlotIsMain OBJECT-TYPE
|
||||
SYNTAX INTEGER { master(0),slave(1)}
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
A value which indicates the slot is main.
|
||||
"
|
||||
::= { dpSlotEntry 6 }
|
||||
|
||||
dpSlotRunTimes OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
A character string which indicates the run time of the slot.
|
||||
"
|
||||
::= { dpSlotEntry 7 }
|
||||
|
||||
--dpSlotTraps
|
||||
|
||||
dpSlotTraps OBJECT IDENTIFIER ::= { dpDevice 2 }
|
||||
|
||||
|
||||
dpBoardInserted NOTIFICATION-TYPE
|
||||
OBJECTS {dpSlotIndex ,dpSlotType}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
dpBoardInsert is inserted.
|
||||
"
|
||||
::= { dpSlotTraps 1 }
|
||||
|
||||
dpBoardRemoved NOTIFICATION-TYPE
|
||||
OBJECTS {dpSlotIndex}
|
||||
STATUS current
|
||||
DESCRIPTION "dpBoardRemove is removed."
|
||||
::= { dpSlotTraps 2 }
|
||||
|
||||
END
|
||||
|
||||
131
src/mibs/iana/dptech-login.mib
Normal file
131
src/mibs/iana/dptech-login.mib
Normal file
@@ -0,0 +1,131 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2011 by DPtech Technologies. All rights reserved.
|
||||
--
|
||||
-- Description: DPtech Login Managent MIB
|
||||
--
|
||||
-- Reference: DPtech Enterprise MIB
|
||||
-- Version: V1.00
|
||||
-- History:
|
||||
-- V1.00 2011-06-17 created by lifeipeng
|
||||
-- ============================================================================
|
||||
DPTECH-LOGIN-MANAGENT-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
dpLoginManagent
|
||||
FROM DPTECH-OID-MIB
|
||||
OBJECT-GROUP, MODULE-COMPLIANCE, NOTIFICATION-GROUP
|
||||
FROM SNMPv2-CONF
|
||||
Integer32, OBJECT-TYPE, MODULE-IDENTITY, NOTIFICATION-TYPE, TimeTicks, IpAddress
|
||||
FROM SNMPv2-SMI
|
||||
RowPointer, DateAndTime, DisplayString, RowStatus
|
||||
FROM SNMPv2-TC
|
||||
SnmpTagList, SnmpTagValue
|
||||
FROM SNMP-TARGET-MIB;
|
||||
|
||||
--dpLoginTable
|
||||
|
||||
dpLoginTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF DpLoginEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A list of login managent entries."
|
||||
::= { dpLoginManagent 1 }
|
||||
|
||||
dpLoginEntry OBJECT-TYPE
|
||||
SYNTAX DpLoginEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION " "
|
||||
INDEX { dpLoginIndex }
|
||||
::= {dpLoginTable 1}
|
||||
|
||||
DpLoginEntry ::=
|
||||
SEQUENCE {
|
||||
dpLoginIndex INTEGER ,
|
||||
dpLoginName DisplayString,
|
||||
dpLoginIP IpAddress,
|
||||
dpLoginType DisplayString,
|
||||
dpOperateModule DisplayString,
|
||||
dpOperate DisplayString,
|
||||
dpOperateResult INTEGER
|
||||
}
|
||||
|
||||
dpLoginIndex OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpLoginEntry 1 }
|
||||
|
||||
dpLoginName OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpLoginEntry 2 }
|
||||
|
||||
dpLoginIP OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpLoginEntry 3 }
|
||||
|
||||
dpLoginType OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpLoginEntry 4 }
|
||||
|
||||
dpOperateModule OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpLoginEntry 5 }
|
||||
|
||||
dpOperate OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpLoginEntry 6 }
|
||||
|
||||
dpOperateResult OBJECT-TYPE
|
||||
SYNTAX INTEGER {Success(0),Fail(1) }
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpLoginEntry 7 }
|
||||
|
||||
|
||||
--dpLoginManagentTraps
|
||||
|
||||
dpLoginManagentTraps OBJECT IDENTIFIER ::= { dpLoginManagent 2 }
|
||||
|
||||
|
||||
dpSubmit NOTIFICATION-TYPE
|
||||
OBJECTS {dpLoginIP ,dpLoginName, dpOperateModule}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpLoginManagentTraps 1 }
|
||||
|
||||
dpSysLog NOTIFICATION-TYPE
|
||||
OBJECTS {dpLoginIP, dpLoginName, dpLoginType, dpOperateResult, dpOperate}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpLoginManagentTraps 2 }
|
||||
|
||||
END
|
||||
|
||||
249
src/mibs/iana/dptech-network.mib
Normal file
249
src/mibs/iana/dptech-network.mib
Normal file
@@ -0,0 +1,249 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2010 by DPtech Technologies. All rights reserved.
|
||||
--
|
||||
-- Description: DPtech Network MIB
|
||||
--
|
||||
-- Reference: DPtech Enterprise MIB
|
||||
-- Version: V1.00
|
||||
-- History:
|
||||
-- V1.00 2010-03-19 created by zhaoy
|
||||
-- ============================================================================
|
||||
DPTECH-NETWORK-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
dpNetwork
|
||||
FROM DPTECH-OID-MIB
|
||||
OBJECT-GROUP, MODULE-COMPLIANCE, NOTIFICATION-GROUP
|
||||
FROM SNMPv2-CONF
|
||||
Integer32, OBJECT-TYPE, MODULE-IDENTITY, NOTIFICATION-TYPE, TimeTicks,Counter32
|
||||
FROM SNMPv2-SMI
|
||||
RowPointer, DateAndTime, DisplayString, RowStatus, PhysAddress
|
||||
FROM SNMPv2-TC
|
||||
SnmpTagList, SnmpTagValue
|
||||
FROM SNMP-TARGET-MIB
|
||||
IpAddress
|
||||
FROM RFC1155-SMI
|
||||
ifEntry
|
||||
FROM IF-MIB;
|
||||
|
||||
|
||||
--
|
||||
-- Node definitions
|
||||
--
|
||||
|
||||
dpNetConfig OBJECT IDENTIFIER ::= { dpNetwork 1 }
|
||||
dpWanAddr OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The WAN interface's ip address."
|
||||
::= { dpNetConfig 1 }
|
||||
|
||||
dpWanNetMask OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION "The WAN interface's netmask."
|
||||
::= { dpNetConfig 2 }
|
||||
|
||||
dpPrimaryDns OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION "The primary dns information."
|
||||
::= { dpNetConfig 3 }
|
||||
|
||||
dpSecondaryDns OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION "The secondary dns information(not supported, currently)."
|
||||
::= { dpNetConfig 4 }
|
||||
|
||||
-- The dpIfTable
|
||||
dpIfTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF DpIfEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A list of interface entries. The number of entries
|
||||
is given by the value of ifNumber. This table
|
||||
contains additional objects for the interface table."
|
||||
::= { dpNetwork 2 }
|
||||
|
||||
dpIfEntry OBJECT-TYPE
|
||||
SYNTAX DpIfEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An entry containing additional management information
|
||||
applicable to a particular interface."
|
||||
AUGMENTS { ifEntry }
|
||||
::= {dpIfTable 1}
|
||||
|
||||
DpIfEntry ::=
|
||||
SEQUENCE {
|
||||
dpIfType INTEGER,
|
||||
dpIfRxPower INTEGER,
|
||||
dpIfTxPower INTEGER,
|
||||
dpIfRxBps Counter32,
|
||||
dpIfTxBps Counter32,
|
||||
dpIfProtocol INTEGER
|
||||
}
|
||||
|
||||
dpIfType OBJECT-TYPE
|
||||
SYNTAX INTEGER {
|
||||
Normal-interface(0),
|
||||
WAN-interface(1),
|
||||
LAN-interface(2),
|
||||
Management-interface(3) }
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION "A value which indicates the type of the interface."
|
||||
::= { dpIfEntry 1 }
|
||||
|
||||
dpIfRxPower OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION "A value which indicates the rx_power of the interface."
|
||||
::= { dpIfEntry 2 }
|
||||
|
||||
dpIfTxPower OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION "A value which indicates the tx_power of the interface."
|
||||
::= { dpIfEntry 3 }
|
||||
|
||||
dpIfRxBps OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION "A value which indicates the input bps of the interface."
|
||||
::= { dpIfEntry 4 }
|
||||
|
||||
dpIfTxBps OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION "A value which indicates the output bps of the interface."
|
||||
::= { dpIfEntry 5 }
|
||||
|
||||
dpIfProtocol OBJECT-TYPE
|
||||
SYNTAX INTEGER {hdlc(0),ppp(1),eth(2) }
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION "A value which indicates the protocol type of the interface."
|
||||
::= { dpIfEntry 6 }
|
||||
|
||||
|
||||
-- The dpPrivateMacTable
|
||||
dpPrivateMacTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF DpPrivateMacEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The MAC Address table used for mapping from IP
|
||||
addresses to MAC addresses for private net."
|
||||
::= { dpNetwork 3 }
|
||||
|
||||
dpPrivateMacEntry OBJECT-TYPE
|
||||
SYNTAX DpPrivateMacEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Each entry contains one IpAddress to MAC address
|
||||
equivalence."
|
||||
INDEX { dpPrivateMacIfIndex,
|
||||
dpPrivateMacIPAddress }
|
||||
::= { dpPrivateMacTable 1 }
|
||||
|
||||
DpPrivateMacEntry ::= SEQUENCE {
|
||||
dpPrivateMacIfIndex INTEGER,
|
||||
dpPrivateMacAddress PhysAddress,
|
||||
dpPrivateMacIPAddress IpAddress
|
||||
}
|
||||
|
||||
dpPrivateMacIfIndex OBJECT-TYPE
|
||||
SYNTAX INTEGER (1..2147483647)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The interface on which this entry's equivalence is
|
||||
effective. The interface identified by a particular value
|
||||
of this index is the same interface as identified by the
|
||||
same value of RFC 1573's ifIndex."
|
||||
::= { dpPrivateMacEntry 1 }
|
||||
|
||||
dpPrivateMacAddress OBJECT-TYPE
|
||||
SYNTAX PhysAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The MAC address."
|
||||
::= { dpPrivateMacEntry 2 }
|
||||
|
||||
dpPrivateMacIPAddress OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The IpAddress corresponding to the MAC address."
|
||||
::= { dpPrivateMacEntry 3 }
|
||||
|
||||
-- the DPtech Trap table
|
||||
-- The DPtech Trap table contains this DPtech Trap information.
|
||||
|
||||
dpNetworkTraps OBJECT IDENTIFIER ::= { dpNetwork 4 }
|
||||
|
||||
|
||||
dpPosCRC NOTIFICATION-TYPE
|
||||
OBJECTS {ifIndex}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
CRC is not instable.
|
||||
"
|
||||
::= { dpNetworkTraps 1 }
|
||||
|
||||
dpPosScramble NOTIFICATION-TYPE
|
||||
OBJECTS {ifIndex}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
Scrambling is instable.
|
||||
"
|
||||
::= { dpNetworkTraps 2 }
|
||||
|
||||
dpPosJ0 NOTIFICATION-TYPE
|
||||
OBJECTS {ifIndex}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The j0 flag is instable.
|
||||
"
|
||||
::= { dpNetworkTraps 3 }
|
||||
|
||||
dpPosJ1 NOTIFICATION-TYPE
|
||||
OBJECTS {ifIndex}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The j1 flag is instable.
|
||||
"
|
||||
::= { dpNetworkTraps 4 }
|
||||
|
||||
dpPosC2 NOTIFICATION-TYPE
|
||||
OBJECTS {ifIndex}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The c2 flag is instable.
|
||||
"
|
||||
::= { dpNetworkTraps 5 }
|
||||
|
||||
|
||||
END
|
||||
|
||||
29
src/mibs/iana/dptech-oid.mib
Normal file
29
src/mibs/iana/dptech-oid.mib
Normal file
@@ -0,0 +1,29 @@
|
||||
DPTECH-OID-MIB DEFINITIONS ::= BEGIN
|
||||
IMPORTS
|
||||
enterprises
|
||||
FROM RFC1155-SMI;
|
||||
|
||||
dptech MODULE-IDENTITY
|
||||
LAST-UPDATED "1101140000Z"
|
||||
ORGANIZATION " dpOid Working"
|
||||
CONTACT-INFO
|
||||
"
|
||||
This MIB will maintain DPtech products .
|
||||
"
|
||||
DESCRIPTION
|
||||
" The MIB module for dpDevice entities . "
|
||||
REVISION "1101140000Z"
|
||||
DESCRIPTION
|
||||
" The initial revision of this MIB module was published as dp dev ."
|
||||
::= { enterprises 31648 }
|
||||
|
||||
dpProductId OBJECT IDENTIFIER ::= { dptech 1 }
|
||||
dpEntityVendorTypeOID OBJECT IDENTIFIER ::= { dptech 2 }
|
||||
dpSystem OBJECT IDENTIFIER ::= { dptech 3 }
|
||||
dpNetwork OBJECT IDENTIFIER ::= { dptech 4 }
|
||||
dpPacketFilter OBJECT IDENTIFIER ::= { dptech 5 }
|
||||
dpDevice OBJECT IDENTIFIER ::= { dptech 6 }
|
||||
dpLoginManagent OBJECT IDENTIFIER ::= { dptech 7 }
|
||||
dpRcpManage OBJECT IDENTIFIER ::= { dptech 8 }
|
||||
|
||||
END
|
||||
86
src/mibs/iana/dptech-packetfilter.mib
Normal file
86
src/mibs/iana/dptech-packetfilter.mib
Normal file
@@ -0,0 +1,86 @@
|
||||
DPTECH-PACKETFILTER-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
dpPacketFilter
|
||||
FROM DPTECH-OID-MIB
|
||||
OBJECT-GROUP, MODULE-COMPLIANCE, NOTIFICATION-GROUP
|
||||
FROM SNMPv2-CONF
|
||||
Integer32, OBJECT-TYPE, MODULE-IDENTITY, NOTIFICATION-TYPE, TimeTicks, IpAddress
|
||||
FROM SNMPv2-SMI
|
||||
RowPointer, DateAndTime, DisplayString, RowStatus
|
||||
FROM SNMPv2-TC
|
||||
SnmpTagList, SnmpTagValue
|
||||
FROM SNMP-TARGET-MIB;
|
||||
|
||||
--dpPacketFilterMib OBJECT IDENTIFIER ::= { dpPacketFilter 1 }
|
||||
|
||||
dpPacketProtocol OBJECT-TYPE
|
||||
SYNTAX DisplayString(SIZE(0..64))
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION "The protocol of the packet."
|
||||
::= { dpPacketFilter 1 }
|
||||
|
||||
dpSrcIp OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION "The soure ip of this packet. "
|
||||
::= { dpPacketFilter 2 }
|
||||
|
||||
dpDstIp OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION " The destination ip of this packet."
|
||||
::= { dpPacketFilter 3 }
|
||||
|
||||
dpSrcPortOrType OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..65535)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION " The soure port or type of this packet(According to different protocol)."
|
||||
::= { dpPacketFilter 4 }
|
||||
|
||||
dpDstPortOrCode OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..65535)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION " The destination port or code of this packet(According to different protocol). "
|
||||
::= { dpPacketFilter 5 }
|
||||
|
||||
dpPacketInifname OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION "The ifname where the packet is from."
|
||||
::= { dpPacketFilter 6 }
|
||||
|
||||
dpPacketOutifname OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION "The ifname where the packet is going to."
|
||||
::= { dpPacketFilter 7 }
|
||||
|
||||
|
||||
dpPacketFilterTraps OBJECT IDENTIFIER ::= { dpPacketFilter 8 }
|
||||
|
||||
dpPacketFilterDrop NOTIFICATION-TYPE
|
||||
OBJECTS {dpPacketProtocol, dpSrcIp, dpDstIp, dpSrcPortOrType, dpDstPortOrCode}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The packet is passed.
|
||||
"
|
||||
::= { dpPacketFilterTraps 1}
|
||||
|
||||
dpPacketFilterPass NOTIFICATION-TYPE
|
||||
OBJECTS {dpPacketProtocol,dpSrcIp,dpDstIp, dpSrcPortOrType, dpDstPortOrCode, dpPacketInifname, dpPacketOutifname}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The packet is denied.
|
||||
"
|
||||
::= { dpPacketFilterTraps 2}
|
||||
END
|
||||
52
src/mibs/iana/dptech-product-id.mib
Normal file
52
src/mibs/iana/dptech-product-id.mib
Normal file
@@ -0,0 +1,52 @@
|
||||
-- ============================================================================
|
||||
-- Copyright (C) 2010 by DPtech Technologies. All rights reserved.
|
||||
--
|
||||
-- Description: DPtech Product OID MIB
|
||||
--
|
||||
-- Reference: DPTECH-OID-MIB
|
||||
-- Version: V1.00
|
||||
-- History:
|
||||
-- V1.00 2010-02-21 created by zhaoy
|
||||
-- ============================================================================
|
||||
DPTECH-PRODUCT-ID-MIB DEFINITIONS ::= BEGIN
|
||||
IMPORTS
|
||||
dpProductId
|
||||
FROM DPTECH-OID-MIB;
|
||||
|
||||
dp-IPS2000-GA-EI OBJECT IDENTIFIER ::= { dpProductId 10101 }
|
||||
|
||||
dp-IPS2000-GE-N OBJECT IDENTIFIER ::= { dpProductId 10102 }
|
||||
|
||||
dp-IPS2000-TGM-N OBJECT IDENTIFIER ::= { dpProductId 10103 }
|
||||
|
||||
dp-IPS2000-GA-N OBJECT IDENTIFIER ::= { dpProductId 10104 }
|
||||
|
||||
dp-IPS2000-ME-N OBJECT IDENTIFIER ::= { dpProductId 10105 }
|
||||
|
||||
dp-IPS2000-GM-N OBJECT IDENTIFIER ::= { dpProductId 10106 }
|
||||
|
||||
dp-IPS2000-GS-N OBJECT IDENTIFIER ::= { dpProductId 10107 }
|
||||
|
||||
dp-IPS2000-MA-N OBJECT IDENTIFIER ::= { dpProductId 10108 }
|
||||
|
||||
dp-UAG3000-MA OBJECT IDENTIFIER ::= { dpProductId 10201 }
|
||||
|
||||
dp-UAG3000-MS OBJECT IDENTIFIER ::= { dpProductId 10202 }
|
||||
|
||||
dp-UAG3000-GA OBJECT IDENTIFIER ::= { dpProductId 10203 }
|
||||
|
||||
dp-UAG3000-MC OBJECT IDENTIFIER ::= { dpProductId 10204 }
|
||||
|
||||
dp-UAG3000-MM OBJECT IDENTIFIER ::= { dpProductId 10205 }
|
||||
|
||||
--dp-UAG3000-MS OBJECT IDENTIFIER ::= { dpProductId 10206 }
|
||||
|
||||
dp-UAG3000-GE OBJECT IDENTIFIER ::= { dpProductId 10207 }
|
||||
|
||||
dp-FW1000-GE-N OBJECT IDENTIFIER ::= { dpProductId 10301 }
|
||||
|
||||
dp-FW1000-GS-N OBJECT IDENTIFIER ::= { dpProductId 10302 }
|
||||
|
||||
dp-FW1000-MA-N OBJECT IDENTIFIER ::= { dpProductId 10303 }
|
||||
|
||||
END
|
||||
313
src/mibs/iana/dptech-rcp.mib
Normal file
313
src/mibs/iana/dptech-rcp.mib
Normal file
@@ -0,0 +1,313 @@
|
||||
DPTECH-RCP-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
dpRcpManage
|
||||
FROM DPTECH-OID-MIB
|
||||
Integer32, OBJECT-TYPE, MODULE-IDENTITY, NOTIFICATION-TYPE, TimeTicks
|
||||
FROM SNMPv2-SMI
|
||||
OBJECT-GROUP, MODULE-COMPLIANCE, NOTIFICATION-GROUP
|
||||
FROM SNMPv2-CONF
|
||||
RowPointer, DateAndTime, DisplayString, RowStatus
|
||||
FROM SNMPv2-TC
|
||||
SnmpTagList, SnmpTagValue
|
||||
FROM SNMP-TARGET-MIB
|
||||
IpAddress
|
||||
FROM RFC1155-SMI
|
||||
PhysAddress
|
||||
FROM SNMPv2-TC
|
||||
ifEntry
|
||||
FROM IF-MIB;
|
||||
|
||||
--
|
||||
-- Node definitions
|
||||
--
|
||||
--dpRcpManage
|
||||
|
||||
--dpRcpManageMib OBJECT IDENTIFIER ::= { dpRcpManage 1 }
|
||||
|
||||
dpRcpTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF DpRcpEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A list of rcp managent entries."
|
||||
::= { dpRcpManage 1 }
|
||||
|
||||
dpRcpEntry OBJECT-TYPE
|
||||
SYNTAX DpRcpEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION " "
|
||||
INDEX { dpRcpUserIndex }
|
||||
::= {dpRcpTable 1}
|
||||
|
||||
DpRcpEntry ::=
|
||||
SEQUENCE {
|
||||
dpRcpUserIndex INTEGER ,
|
||||
dpRcpUserName DisplayString,
|
||||
dpUserActiveTime DisplayString,
|
||||
dpUserPutRuleSum INTEGER
|
||||
}
|
||||
|
||||
dpRcpUserIndex OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpRcpEntry 1 }
|
||||
|
||||
dpRcpUserName OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpRcpEntry 2 }
|
||||
|
||||
dpUserActiveTime OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpRcpEntry 3 }
|
||||
|
||||
dpUserPutRuleSum OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpRcpEntry 4 }
|
||||
|
||||
--dpAclParam
|
||||
--dpAclParam OBJECT IDENTIFIER ::= { dpRcpManage 2 }
|
||||
|
||||
dpAclParamTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF DpAclParamEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A list of rcp managent entries."
|
||||
::= { dpRcpManage 2 }
|
||||
|
||||
|
||||
dpAclParamEntry OBJECT-TYPE
|
||||
SYNTAX DpAclParamEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
" "
|
||||
::= {dpAclParamTable 1}
|
||||
|
||||
DpAclParamEntry ::=
|
||||
SEQUENCE {
|
||||
dpAclRuleSort DisplayString,
|
||||
dpAclMaxRuleNum INTEGER,
|
||||
dpAclUsedRuleNum INTEGER,
|
||||
dpAclAbleRuleNum INTEGER
|
||||
}
|
||||
|
||||
dpAclRuleSort OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpAclParamEntry 1 }
|
||||
|
||||
dpAclMaxRuleNum OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpAclParamEntry 2 }
|
||||
|
||||
dpAclUsedRuleNum OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpAclParamEntry 3 }
|
||||
|
||||
dpAclAbleRuleNum OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpAclParamEntry 4 }
|
||||
|
||||
--dpPortGroupStat
|
||||
--dpPortGroupStat OBJECT IDENTIFIER ::= { dpRcpManage 3 }
|
||||
|
||||
dpPortGroupStatTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF DpPortGroupStatEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A list of rcp managent entries."
|
||||
::= { dpRcpManage 3 }
|
||||
|
||||
|
||||
dpPortGroupStatEntry OBJECT-TYPE
|
||||
SYNTAX DpPortGroupStatEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
" "
|
||||
::= {dpPortGroupStatTable 1}
|
||||
|
||||
DpPortGroupStatEntry ::=
|
||||
SEQUENCE {
|
||||
dpPortGroupId INTEGER,
|
||||
dpPortGroupDesc DisplayString,
|
||||
dpAgedTime INTEGER,
|
||||
dpRuleNum INTEGER,
|
||||
dpTcamRuleCap INTEGER,
|
||||
dpTcamRuleNum INTEGER,
|
||||
dpHitSum INTEGER
|
||||
}
|
||||
|
||||
dpPortGroupId OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpPortGroupStatEntry 1 }
|
||||
|
||||
dpPortGroupDesc OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpPortGroupStatEntry 2 }
|
||||
|
||||
dpAgedTime OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpPortGroupStatEntry 3 }
|
||||
|
||||
dpRuleNum OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpPortGroupStatEntry 4 }
|
||||
|
||||
dpTcamRuleCap OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpPortGroupStatEntry 5 }
|
||||
|
||||
dpTcamRuleNum OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpPortGroupStatEntry 6 }
|
||||
|
||||
dpHitSum OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpPortGroupStatEntry 7 }
|
||||
|
||||
--dpTrustIpAddr
|
||||
--dpTrustIpAddr OBJECT IDENTIFIER ::= { dpRcpManage 4 }
|
||||
|
||||
dpTrustIpAddrTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF DpTrustIpAddrEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A list of rcp managent entries."
|
||||
::= { dpRcpManage 4 }
|
||||
|
||||
dpTrustIpAddrEntry OBJECT-TYPE
|
||||
SYNTAX DpTrustIpAddrEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION " "
|
||||
INDEX { dpTrustIpIndex }
|
||||
::= {dpTrustIpAddrTable 1}
|
||||
|
||||
DpTrustIpAddrEntry ::=
|
||||
SEQUENCE {
|
||||
dpTrustIpIndex INTEGER,
|
||||
dpTrustIpAddr IpAddress
|
||||
}
|
||||
|
||||
dpTrustIpIndex OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpTrustIpAddrEntry 1 }
|
||||
|
||||
dpTrustIpAddr OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpTrustIpAddrEntry 2 }
|
||||
|
||||
--dpRcpState
|
||||
--dpRcpState OBJECT IDENTIFIER ::= { dpRcpManage 5 }
|
||||
|
||||
dpRcpStateTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF DpRcpStateEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A list of rcp state entries."
|
||||
::= { dpRcpManage 5 }
|
||||
|
||||
dpRcpStateEntry OBJECT-TYPE
|
||||
SYNTAX DpRcpStateEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
" "
|
||||
::= {dpRcpStateTable 1}
|
||||
|
||||
DpRcpStateEntry ::=
|
||||
SEQUENCE {
|
||||
dpRcpCurState DisplayString,
|
||||
dpCurSessionNum INTEGER
|
||||
}
|
||||
|
||||
dpRcpCurState OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpRcpStateEntry 1 }
|
||||
|
||||
dpCurSessionNum OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpRcpStateEntry 2 }
|
||||
|
||||
END
|
||||
666
src/mibs/iana/dptech-system.mib
Normal file
666
src/mibs/iana/dptech-system.mib
Normal file
@@ -0,0 +1,666 @@
|
||||
DPTECH-SYSTEM-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
dpSystem
|
||||
FROM DPTECH-OID-MIB
|
||||
dpSlotEntry
|
||||
FROM DPTECH-DEV-MIB
|
||||
OBJECT-GROUP, MODULE-COMPLIANCE, NOTIFICATION-GROUP
|
||||
FROM SNMPv2-CONF
|
||||
Integer32, OBJECT-TYPE, MODULE-IDENTITY, NOTIFICATION-TYPE, TimeTicks, Gauge32
|
||||
FROM SNMPv2-SMI
|
||||
RowPointer, DateAndTime, DisplayString, RowStatus, PhysAddress
|
||||
FROM SNMPv2-TC
|
||||
SnmpTagList, SnmpTagValue
|
||||
FROM SNMP-TARGET-MIB
|
||||
ipAdEntAddr, ipAdEntIfIndex, ipAdEntNetMask
|
||||
FROM IP-MIB
|
||||
IpAddress
|
||||
FROM RFC1155-SMI
|
||||
entPhysicalIndex
|
||||
FROM ENTITY-MIB;
|
||||
|
||||
dpMacAddr OBJECT-TYPE
|
||||
SYNTAX PhysAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The mac address of manager.
|
||||
"
|
||||
::= { dpSystem 1 }
|
||||
|
||||
dpHardwareVersion OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The hardware version of PCB.
|
||||
"
|
||||
::= { dpSystem 2 }
|
||||
|
||||
dpSoftwareVersion OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The software version.
|
||||
"
|
||||
::= { dpSystem 3 }
|
||||
|
||||
dpSoftwareManufacture OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The software manufacturer.
|
||||
"
|
||||
::= { dpSystem 4 }
|
||||
|
||||
dpCpuRatioThreshold OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..100)
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The threshold of the usage of CPU. When dpCpuRatio is over than
|
||||
dpCpuThreshold, syslog will be reported.
|
||||
"
|
||||
::= { dpSystem 5 }
|
||||
|
||||
dpCpuTemperatureThresholdLow OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..100)
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The low threshold of CPU temprature. When dpCpuTemperature is
|
||||
less than dpCpuTemperatureThresholdLow, syslog will be reported.
|
||||
"
|
||||
::= { dpSystem 6 }
|
||||
|
||||
dpCpuTemperatureThresholdHigh OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..100)
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The high threshold of CPU temprature. When dpCpuTemperature is
|
||||
greater than dpCpuTemperatureThresholdHigh, syslog will be
|
||||
reported.
|
||||
"
|
||||
::= { dpSystem 7 }
|
||||
|
||||
dpMainBoardTemperatureThresholdLow OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..100)
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The low threshold of MainBoard temprature. When dpMainboardTemperature is
|
||||
less than dpMainBoardTemperatureThresholdLow, syslog will be reported.
|
||||
"
|
||||
::= { dpSystem 8 }
|
||||
|
||||
dpMainBoardTemperatureThresholdHigh OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..100)
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The high threshold of MainBoard temprature. When dpMainboardTemperature is
|
||||
greater than dpMainBoardTemperatureThresholdHigh, syslog will be
|
||||
reported.
|
||||
"
|
||||
::= { dpSystem 9 }
|
||||
|
||||
dpMemSize OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The size of memory in mega bytes.
|
||||
"
|
||||
::= { dpSystem 10 }
|
||||
|
||||
dpMemRatioThreshold OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..100)
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The threshold of the usage of memory. When dpMemRatio is over than
|
||||
dpMemRatioThreshold, syslog will be reported.
|
||||
"
|
||||
::= { dpSystem 11 }
|
||||
|
||||
dpDiskSize OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The size of disk in giga bytes.
|
||||
"
|
||||
::= { dpSystem 12 }
|
||||
|
||||
dpStorageSize OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The size of storage device in giga bytes.
|
||||
"
|
||||
::= { dpSystem 13 }
|
||||
|
||||
|
||||
dpDevSerial OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The serial number of device.
|
||||
"
|
||||
::= { dpSystem 14 }
|
||||
|
||||
dpSysTime OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
Current system time.
|
||||
"
|
||||
::= { dpSystem 24 }
|
||||
|
||||
|
||||
dpSystemStatus OBJECT IDENTIFIER ::= { dpSystem 15 }
|
||||
|
||||
|
||||
dpCpuRatio OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..100)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The average, over the last a few minutes, of the percentage
|
||||
of time that this processor was not idle.
|
||||
Implementations may approximate this one minute
|
||||
smoothing period if necessary.
|
||||
"
|
||||
::= { dpSystemStatus 1 }
|
||||
|
||||
dpCpuRatioPeak OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..100)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The threshold of the usage of CPU. When dpCpuRatio is over than
|
||||
dpCpuThreshold, syslog will be reported.
|
||||
"
|
||||
::= { dpSystemStatus 2 }
|
||||
|
||||
dpCpuRatioAverage OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..100)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpSystemStatus 3 }
|
||||
|
||||
dpCpuTemperature OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The temprature of CPU.
|
||||
"
|
||||
::= { dpSystemStatus 4 }
|
||||
|
||||
dpMemRatio OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..100)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The average, over the last a few minutes, of the percentage
|
||||
of memory was not used.
|
||||
Implementations may approximate this one minute
|
||||
smoothing period if necessary.
|
||||
"
|
||||
::= { dpSystemStatus 5 }
|
||||
|
||||
dpMemRatioPeak OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..100)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpSystemStatus 6 }
|
||||
|
||||
dpMemRatioAverage OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..100)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
""
|
||||
::= { dpSystemStatus 7 }
|
||||
|
||||
dpMainboardTemperature OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The temprature of mainboard
|
||||
"
|
||||
::= { dpSystemStatus 8 }
|
||||
|
||||
dpSession OBJECT-TYPE
|
||||
SYNTAX Gauge32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The product session
|
||||
"
|
||||
::= { dpSystemStatus 9 }
|
||||
|
||||
dpCpuRatio30s OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..100)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The average, over the last 30s, of the percentage
|
||||
of cpu useage ratio that this processor was not idle.
|
||||
Implementations may approximate this half minute
|
||||
smoothing period if necessary.
|
||||
"
|
||||
::= { dpSystemStatus 10 }
|
||||
|
||||
dpCpuRatio5min OBJECT-TYPE
|
||||
SYNTAX Integer32 (0..100)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The average, over the last 5min, of the percentage
|
||||
of cpu useage ratio that this processor was not idle.
|
||||
Implementations may approximate this five minute
|
||||
smoothing period if necessary.
|
||||
"
|
||||
::= { dpSystemStatus 11 }
|
||||
|
||||
|
||||
|
||||
-- the DPtech Trap table
|
||||
|
||||
-- The DPtech Trap table contains this DPtech Trap information.
|
||||
|
||||
dpSystemTraps OBJECT IDENTIFIER ::= { dpSystem 16 }
|
||||
|
||||
|
||||
dpCpuTemperatureHigh NOTIFICATION-TYPE
|
||||
OBJECTS {dpCpuTemperature,dpCpuTemperatureThresholdLow, dpCpuTemperatureThresholdHigh}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The Cpu Temperature is High.
|
||||
"
|
||||
::= { dpSystemTraps 1 }
|
||||
|
||||
dpCpuTemperatureHighClear NOTIFICATION-TYPE
|
||||
OBJECTS {dpCpuTemperature,dpCpuTemperatureThresholdLow, dpCpuTemperatureThresholdHigh}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The Cpu Trap(dpCpuTemperatureHigh) is Clear.
|
||||
"
|
||||
::= { dpSystemTraps 2 }
|
||||
|
||||
dpMainBoardTemperatureHigh NOTIFICATION-TYPE
|
||||
OBJECTS {dpMainboardTemperature,dpMainBoardTemperatureThresholdLow,dpMainBoardTemperatureThresholdHigh}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The Main Board Temperature is High.
|
||||
"
|
||||
::= { dpSystemTraps 3 }
|
||||
|
||||
dpMainBoardTemperatureHighClear NOTIFICATION-TYPE
|
||||
OBJECTS {dpMainboardTemperature,dpMainBoardTemperatureThresholdLow,dpMainBoardTemperatureThresholdHigh}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The Main Board Trap(dpMainBoardTemperatureHigh) is Clear.
|
||||
"
|
||||
::= { dpSystemTraps 4 }
|
||||
|
||||
dpCpuRatioHigh NOTIFICATION-TYPE
|
||||
OBJECTS {dpCpuRatio,dpCpuRatioThreshold}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The Cpu Ratio is High.
|
||||
"
|
||||
::= { dpSystemTraps 5 }
|
||||
|
||||
deCpuRatioHighClear NOTIFICATION-TYPE
|
||||
OBJECTS {dpCpuRatio,dpCpuRatioThreshold}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The Cpu Trap(dpCpuRatioHigh) is Clear.
|
||||
"
|
||||
::= { dpSystemTraps 6 }
|
||||
|
||||
dpMemRatioHigh NOTIFICATION-TYPE
|
||||
OBJECTS {dpMemRatio,dpMemRatioThreshold}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The Memory Ratio is High.
|
||||
"
|
||||
::= { dpSystemTraps 7 }
|
||||
|
||||
dpMemRatioHighClear NOTIFICATION-TYPE
|
||||
OBJECTS {dpMemRatio,dpMemRatioThreshold}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The Memory Trap(dpMemRatioHigh) is Clear.
|
||||
"
|
||||
::= { dpSystemTraps 8 }
|
||||
|
||||
dpWanIpAddrChange NOTIFICATION-TYPE
|
||||
OBJECTS {ipAdEntAddr, ipAdEntIfIndex, ipAdEntNetMask}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The IP address of the WAN interface have modified.
|
||||
"
|
||||
::= { dpSystemTraps 9 }
|
||||
|
||||
dpFanAbnormal NOTIFICATION-TYPE
|
||||
OBJECTS {entPhysicalIndex}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The Fan does not work well.
|
||||
"
|
||||
::= { dpSystemTraps 10 }
|
||||
dpPowerAbnormal NOTIFICATION-TYPE
|
||||
OBJECTS {entPhysicalIndex}
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The Power does not work well.
|
||||
"
|
||||
::= { dpSystemTraps 11 }
|
||||
|
||||
dpRemoteMangement OBJECT IDENTIFIER ::= { dpSystem 17 }
|
||||
|
||||
dpSnmp OBJECT IDENTIFIER ::= { dpRemoteMangement 1 }
|
||||
|
||||
dpSnmpAgentVersion OBJECT-TYPE
|
||||
SYNTAX INTEGER { v1(1),v2c(2),v3(3),all(4)}
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The SnmpAgent version.
|
||||
"
|
||||
::= { dpSnmp 1 }
|
||||
|
||||
|
||||
dpSnmpTrustHostTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF DpSnmpTrustHostEntry
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
A table containing trust-host information.
|
||||
"
|
||||
::= { dpSnmp 2 }
|
||||
|
||||
dpSnmpTrustHostEntry OBJECT-TYPE
|
||||
SYNTAX DpSnmpTrustHostEntry
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
Information about a particular trust host.
|
||||
"
|
||||
INDEX{dpSnmpTrustHostAddr}
|
||||
::= { dpSnmpTrustHostTable 1 }
|
||||
|
||||
DpSnmpTrustHostEntry ::=
|
||||
SEQUENCE {
|
||||
dpSnmpTrustHostAddr IpAddress,
|
||||
dpSnmpTrustHostNetMask IpAddress
|
||||
}
|
||||
|
||||
|
||||
dpSnmpTrustHostAddr OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The ip address of trust host.
|
||||
"
|
||||
::= { dpSnmpTrustHostEntry 1 }
|
||||
|
||||
dpSnmpTrustHostNetMask OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The netmask of trust host.
|
||||
"
|
||||
::= { dpSnmpTrustHostEntry 2 }
|
||||
|
||||
dpWeb OBJECT IDENTIFIER ::= { dpRemoteMangement 2 }
|
||||
|
||||
-- dpWebTrustHost OBJECT IDENTIFIER ::= { dpWeb 1 }
|
||||
dpWebTrustHostTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF DpWebTrustHostEntry
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
A table containing trust-host information.
|
||||
"
|
||||
::= { dpWeb 2 }
|
||||
|
||||
dpWebTrustHostEntry OBJECT-TYPE
|
||||
SYNTAX DpWebTrustHostEntry
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
Information about a particular trust host.
|
||||
"
|
||||
INDEX{dpWebTrustHostAddr}
|
||||
::= { dpWebTrustHostTable 1 }
|
||||
|
||||
DpWebTrustHostEntry ::=
|
||||
SEQUENCE {
|
||||
dpWebTrustHostAddr IpAddress,
|
||||
dpWebTrustHostNetMask IpAddress
|
||||
}
|
||||
dpWebTrustHostAddr OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The ip address of trust host.
|
||||
"
|
||||
::= { dpWebTrustHostEntry 1 }
|
||||
|
||||
dpWebTrustHostNetMask OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The netmask of trust host.
|
||||
"
|
||||
::= { dpWebTrustHostEntry 2 }
|
||||
|
||||
|
||||
dpSystemReboot OBJECT-TYPE
|
||||
SYNTAX INTEGER { reboot(1), none(2)}
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The system reboot.
|
||||
"
|
||||
::= { dpSystem 18 }
|
||||
|
||||
-- The dpBoardStatus
|
||||
|
||||
dpBoardStatusTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF DpBoardStatusEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A list of board entries. The number of entries
|
||||
is given by the value of board number. This table
|
||||
contains additional objects for the board status table."
|
||||
::= { dpSystem 19 }
|
||||
|
||||
dpBoardStatusEntry OBJECT-TYPE
|
||||
SYNTAX DpBoardStatusEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An entry containing additional management information
|
||||
applicable to a particular board."
|
||||
AUGMENTS { dpSlotEntry }
|
||||
::= {dpBoardStatusTable 1}
|
||||
|
||||
DpBoardStatusEntry ::=
|
||||
SEQUENCE {
|
||||
dpBoardTemperature INTEGER
|
||||
}
|
||||
|
||||
dpBoardTemperature OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The temperature of the board.
|
||||
"
|
||||
::= { dpBoardStatusEntry 1 }
|
||||
|
||||
-- The dpSystemPower
|
||||
|
||||
dpSystemPowerTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF DpSystemPowerEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A list of power entries. The number of entries
|
||||
is given by the value of power number. This table
|
||||
contains additional objects for the power status table."
|
||||
::= { dpSystem 20 }
|
||||
|
||||
dpSystemPowerEntry OBJECT-TYPE
|
||||
SYNTAX DpSystemPowerEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An entry containing additional management information
|
||||
applicable to a particular power."
|
||||
|
||||
::= {dpSystemPowerTable 1}
|
||||
|
||||
DpSystemPowerEntry ::=
|
||||
SEQUENCE {
|
||||
dpSystemPowerNo INTEGER,
|
||||
dpSystemPowerStat DisplayString
|
||||
}
|
||||
|
||||
dpSystemPowerNo OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The No of power.
|
||||
"
|
||||
::= { dpSystemPowerEntry 1 }
|
||||
|
||||
dpSystemPowerStat OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The status of power.
|
||||
"
|
||||
::= { dpSystemPowerEntry 2 }
|
||||
|
||||
-- The dpSystemFan
|
||||
|
||||
dpSystemFanTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF DpSystemFanEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A list of fan entries. The number of entries
|
||||
is given by the value of fan number. This table
|
||||
contains additional objects for the fan status table."
|
||||
::= { dpSystem 21 }
|
||||
|
||||
dpSystemFanEntry OBJECT-TYPE
|
||||
SYNTAX DpSystemFanEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"An entry containing additional management information
|
||||
applicable to a particular fan."
|
||||
|
||||
::= {dpSystemFanTable 1}
|
||||
|
||||
DpSystemFanEntry ::=
|
||||
SEQUENCE {
|
||||
dpSystemFanNo INTEGER,
|
||||
dpSystemFanStat DisplayString
|
||||
}
|
||||
|
||||
dpSystemFanNo OBJECT-TYPE
|
||||
SYNTAX INTEGER
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The No of fan.
|
||||
"
|
||||
::= { dpSystemFanEntry 1 }
|
||||
|
||||
dpSystemFanStat OBJECT-TYPE
|
||||
SYNTAX DisplayString
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"
|
||||
The status of fan.
|
||||
"
|
||||
::= { dpSystemFanEntry 2 }
|
||||
|
||||
END
|
||||
129
src/mibs/rfc1155.smi
Normal file
129
src/mibs/rfc1155.smi
Normal file
@@ -0,0 +1,129 @@
|
||||
RFC1155-SMI DEFINITIONS ::= BEGIN
|
||||
|
||||
EXPORTS -- EVERYTHING
|
||||
internet, directory, mgmt,
|
||||
experimental, private, enterprises,
|
||||
OBJECT-TYPE, ObjectName, ObjectSyntax, SimpleSyntax,
|
||||
ApplicationSyntax, NetworkAddress, IpAddress,
|
||||
Counter, Gauge, TimeTicks, Opaque;
|
||||
|
||||
-- the path to the root
|
||||
|
||||
internet OBJECT IDENTIFIER ::= { iso org(3) dod(6) 1 }
|
||||
|
||||
directory OBJECT IDENTIFIER ::= { internet 1 }
|
||||
|
||||
mgmt OBJECT IDENTIFIER ::= { internet 2 }
|
||||
|
||||
experimental OBJECT IDENTIFIER ::= { internet 3 }
|
||||
|
||||
private OBJECT IDENTIFIER ::= { internet 4 }
|
||||
enterprises OBJECT IDENTIFIER ::= { private 1 }
|
||||
|
||||
|
||||
-- definition of object types
|
||||
|
||||
OBJECT-TYPE MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::= "SYNTAX" type (TYPE ObjectSyntax)
|
||||
"ACCESS" Access
|
||||
"STATUS" Status
|
||||
VALUE NOTATION ::= value (VALUE ObjectName)
|
||||
|
||||
Access ::= "read-only"
|
||||
| "read-write"
|
||||
| "write-only"
|
||||
| "not-accessible"
|
||||
Status ::= "mandatory"
|
||||
| "optional"
|
||||
| "obsolete"
|
||||
END
|
||||
|
||||
-- names of objects in the MIB
|
||||
|
||||
ObjectName ::=
|
||||
OBJECT IDENTIFIER
|
||||
|
||||
-- syntax of objects in the MIB
|
||||
|
||||
ObjectSyntax ::=
|
||||
CHOICE {
|
||||
simple
|
||||
SimpleSyntax,
|
||||
|
||||
-- note that simple SEQUENCEs are not directly
|
||||
-- mentioned here to keep things simple (i.e.,
|
||||
-- prevent mis-use). However, application-wide
|
||||
-- types which are IMPLICITly encoded simple
|
||||
-- SEQUENCEs may appear in the following CHOICE
|
||||
|
||||
application-wide
|
||||
ApplicationSyntax
|
||||
}
|
||||
|
||||
SimpleSyntax ::=
|
||||
CHOICE {
|
||||
number
|
||||
INTEGER,
|
||||
|
||||
string
|
||||
OCTET STRING,
|
||||
|
||||
object
|
||||
OBJECT IDENTIFIER,
|
||||
|
||||
empty
|
||||
NULL
|
||||
}
|
||||
|
||||
ApplicationSyntax ::=
|
||||
CHOICE {
|
||||
address
|
||||
NetworkAddress,
|
||||
|
||||
counter
|
||||
Counter,
|
||||
|
||||
gauge
|
||||
Gauge,
|
||||
|
||||
ticks
|
||||
TimeTicks,
|
||||
|
||||
arbitrary
|
||||
Opaque
|
||||
|
||||
-- other application-wide types, as they are
|
||||
-- defined, will be added here
|
||||
}
|
||||
|
||||
|
||||
-- application-wide types
|
||||
|
||||
NetworkAddress ::=
|
||||
CHOICE {
|
||||
internet
|
||||
IpAddress
|
||||
}
|
||||
|
||||
IpAddress ::=
|
||||
[APPLICATION 0] -- in network-byte order
|
||||
IMPLICIT OCTET STRING (SIZE (4))
|
||||
|
||||
Counter ::=
|
||||
[APPLICATION 1]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
Gauge ::=
|
||||
[APPLICATION 2]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
TimeTicks ::=
|
||||
[APPLICATION 3]
|
||||
IMPLICIT INTEGER (0..4294967295)
|
||||
|
||||
Opaque ::=
|
||||
[APPLICATION 4] -- arbitrary ASN.1 value,
|
||||
IMPLICIT OCTET STRING -- "double-wrapped"
|
||||
|
||||
END
|
||||
52
src/mibs/rfc1212.smi
Normal file
52
src/mibs/rfc1212.smi
Normal file
@@ -0,0 +1,52 @@
|
||||
RFC-1212 DEFINITIONS ::= BEGIN
|
||||
OBJECT-TYPE MACRO ::=
|
||||
BEGIN
|
||||
TYPE NOTATION ::=
|
||||
-- must conform to
|
||||
-- RFC1155's ObjectSyntax
|
||||
"SYNTAX" type(ObjectSyntax)
|
||||
"ACCESS" Access
|
||||
"STATUS" Status
|
||||
DescrPart
|
||||
ReferPart
|
||||
IndexPart
|
||||
DefValPart
|
||||
VALUE NOTATION ::= value (VALUE ObjectName)
|
||||
|
||||
Access ::= "read-only"
|
||||
| "read-write"
|
||||
| "write-only"
|
||||
| "not-accessible"
|
||||
Status ::= "mandatory"
|
||||
| "optional"
|
||||
| "obsolete"
|
||||
| "deprecated"
|
||||
|
||||
DescrPart ::=
|
||||
"DESCRIPTION" value (description DisplayString)
|
||||
| empty
|
||||
|
||||
ReferPart ::=
|
||||
"REFERENCE" value (reference DisplayString)
|
||||
| empty
|
||||
|
||||
IndexPart ::=
|
||||
"INDEX" "{" IndexTypes "}"
|
||||
| empty
|
||||
IndexTypes ::=
|
||||
IndexType | IndexTypes "," IndexType
|
||||
IndexType ::=
|
||||
-- if indexobject, use the SYNTAX
|
||||
-- value of the correspondent
|
||||
-- OBJECT-TYPE invocation
|
||||
value (indexobject ObjectName)
|
||||
-- otherwise use named SMI type
|
||||
-- must conform to IndexSyntax below
|
||||
| type (indextype)
|
||||
|
||||
DefValPart ::=
|
||||
"DEFVAL" "{" value (defvalue ObjectSyntax) "}"
|
||||
| empty
|
||||
|
||||
END
|
||||
END
|
||||
219
src/mibs/rfc1573a-IANAifType.mib
Normal file
219
src/mibs/rfc1573a-IANAifType.mib
Normal file
@@ -0,0 +1,219 @@
|
||||
IANAifType-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY,mib-2 FROM SNMPv2-SMI
|
||||
TEXTUAL-CONVENTION FROM SNMPv2-TC;
|
||||
|
||||
ianaifType MODULE-IDENTITY
|
||||
LAST-UPDATED "9906091123Z"
|
||||
ORGANIZATION "IANA"
|
||||
CONTACT-INFO
|
||||
"Internet Assigned Numbers Authority
|
||||
|
||||
Postal: USC/Information Sciences Institute
|
||||
4676 Admiralty Way, Marina del Rey, CA 90292
|
||||
|
||||
Tel: +1 310 822 1511
|
||||
E-Mail: iana@iana.org"
|
||||
DESCRIPTION
|
||||
"The MIB module which defines the IANAifType textual
|
||||
convention, and thus the enumerated values of the
|
||||
ifType object defined in MIB-II's ifTable."
|
||||
REVISION "9602211123Z"
|
||||
DESCRIPTION
|
||||
"Updated to include new name assignments up to cnr(85).
|
||||
This is the first version available via the WWW."
|
||||
::= { mib-2 30 }
|
||||
|
||||
|
||||
IANAifType ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"This data type is used as the syntax of the ifType
|
||||
object in the (updated) definition of MIB-II's
|
||||
ifTable.
|
||||
|
||||
The definition of this textual convention with the
|
||||
addition of newly assigned values is published
|
||||
periodically by the IANA, in either the Assigned
|
||||
Numbers RFC, or some derivative of it specific to
|
||||
Internet Network Management number assignments. (The
|
||||
latest arrangements can be obtained by contacting the
|
||||
IANA.)
|
||||
|
||||
Requests for new values should be made to IANA via
|
||||
email (iana@iana.org).
|
||||
|
||||
The relationship between the assignment of ifType
|
||||
values and of OIDs to particular media-specific MIBs
|
||||
is solely the purview of IANA and is subject to change
|
||||
without notice. Quite often, a media-specific MIB's
|
||||
OID-subtree assignment within MIB-II's 'transmission'
|
||||
subtree will be the same as its ifType value.
|
||||
However, in some circumstances this will not be the
|
||||
case, and implementors must not pre-assume any
|
||||
specific relationship between ifType values and
|
||||
transmission subtree OIDs."
|
||||
SYNTAX INTEGER {
|
||||
other(1), -- none of the following
|
||||
regular1822(2),
|
||||
hdh1822(3),
|
||||
ddnX25(4),
|
||||
rfc877x25(5),
|
||||
ethernetCsmacd(6),
|
||||
iso88023Csmacd(7),
|
||||
iso88024TokenBus(8),
|
||||
iso88025TokenRing(9),
|
||||
iso88026Man(10),
|
||||
starLan(11),
|
||||
proteon10Mbit(12),
|
||||
proteon80Mbit(13),
|
||||
hyperchannel(14),
|
||||
fddi(15),
|
||||
lapb(16),
|
||||
sdlc(17),
|
||||
ds1(18), -- DS1-MIB
|
||||
e1(19), -- Obsolete see DS1-MIB
|
||||
basicISDN(20),
|
||||
primaryISDN(21),
|
||||
propPointToPointSerial(22), -- proprietary serial
|
||||
ppp(23),
|
||||
softwareLoopback(24),
|
||||
eon(25), -- CLNP over IP
|
||||
ethernet3Mbit(26),
|
||||
nsip(27), -- XNS over IP
|
||||
slip(28), -- generic SLIP
|
||||
ultra(29), -- ULTRA technologies
|
||||
ds3(30), -- DS3-MIB
|
||||
sip(31), -- SMDS, coffee
|
||||
frameRelay(32), -- DTE only.
|
||||
rs232(33),
|
||||
para(34), -- parallel-port
|
||||
arcnet(35), -- arcnet
|
||||
arcnetPlus(36), -- arcnet plus
|
||||
atm(37), -- ATM cells
|
||||
miox25(38),
|
||||
sonet(39), -- SONET or SDH
|
||||
x25ple(40),
|
||||
iso88022llc(41),
|
||||
localTalk(42),
|
||||
smdsDxi(43),
|
||||
frameRelayService(44), -- FRNETSERV-MIB
|
||||
v35(45),
|
||||
hssi(46),
|
||||
hippi(47),
|
||||
modem(48), -- Generic modem
|
||||
aal5(49), -- AAL5 over ATM
|
||||
sonetPath(50),
|
||||
sonetVT(51),
|
||||
smdsIcip(52), -- SMDS InterCarrier Interface
|
||||
propVirtual(53), -- proprietary virtual/internal
|
||||
propMultiplexor(54),-- proprietary multiplexing
|
||||
ieee80212(55), -- 100BaseVG
|
||||
fibreChannel(56), -- Fibre Channel
|
||||
hippiInterface(57), -- HIPPI interfaces
|
||||
frameRelayInterconnect(58), -- Obsolete use either
|
||||
-- frameRelay(32) or
|
||||
-- frameRelayService(44).
|
||||
aflane8023(59), -- ATM Emulated LAN for 802.3
|
||||
aflane8025(60), -- ATM Emulated LAN for 802.5
|
||||
cctEmul(61), -- ATM Emulated circuit
|
||||
fastEther(62), -- Fast Ethernet (100BaseT)
|
||||
isdn(63), -- ISDN and X.25
|
||||
v11(64), -- CCITT V.11/X.21
|
||||
v36(65), -- CCITT V.36
|
||||
g703at64k(66), -- CCITT G703 at 64Kbps
|
||||
g703at2mb(67), -- Obsolete see DS1-MIB
|
||||
qllc(68), -- SNA QLLC
|
||||
fastEtherFX(69), -- Fast Ethernet (100BaseFX)
|
||||
channel(70), -- channel
|
||||
ieee80211(71), -- radio spread spectrum
|
||||
ibm370parChan(72), -- IBM System 360/370 OEMI Channel
|
||||
escon(73), -- IBM Enterprise Systems Connection
|
||||
dlsw(74), -- Data Link Switching
|
||||
isdns(75), -- ISDN S/T interface
|
||||
isdnu(76), -- ISDN U interface
|
||||
lapd(77), -- Link Access Protocol D
|
||||
ipSwitch(78), -- IP Switching Objects
|
||||
rsrb(79), -- Remote Source Route Bridging
|
||||
atmLogical(80), -- ATM Logical Port
|
||||
ds0(81), -- Digital Signal Level 0
|
||||
ds0Bundle(82), -- group of ds0s on the same ds1
|
||||
bsc(83), -- Bisynchronous Protocol
|
||||
async(84), -- Asynchronous Protocol
|
||||
cnr(85), -- Combat Net Radio
|
||||
iso88025Dtr(86), -- ISO 802.5r DTR
|
||||
eplrs(87), -- Ext Pos Loc Report Sys
|
||||
arap(88), -- Appletalk Remote Access Protocol
|
||||
propCnls(89), -- Proprietary Connectionless Protocol
|
||||
hostPad(90), -- CCITT-ITU X.29 PAD Protocol
|
||||
termPad(91), -- CCITT-ITU X.3 PAD Facility
|
||||
frameRelayMPI(92), -- Multiproto Interconnect over FR
|
||||
x213(93), -- CCITT-ITU X213
|
||||
adsl(94), -- Asymmetric Digital Subscriber Loop
|
||||
radsl(95), -- Rate-Adapt. Digital Subscriber Loop
|
||||
sdsl(96), -- Symmetric Digital Subscriber Loop
|
||||
vdsl(97), -- Very H-Speed Digital Subscrib. Loop
|
||||
iso88025CRFPInt(98), -- ISO 802.5 CRFP
|
||||
myrinet(99), -- Myricom Myrinet
|
||||
voiceEM(100), -- voice recEive and transMit
|
||||
voiceFXO(101), -- voice Foreign Exchange Office
|
||||
voiceFXS(102), -- voice Foreign Exchange Station
|
||||
voiceEncap(103), -- voice encapsulation
|
||||
voiceOverIp(104), -- voice over IP encapsulation
|
||||
atmDxi(105), -- ATM DXI
|
||||
atmFuni(106), -- ATM FUNI
|
||||
atmIma (107), -- ATM IMA
|
||||
pppMultilinkBundle(108), -- PPP Multilink Bundle
|
||||
ipOverCdlc (109), -- IBM ipOverCdlc
|
||||
ipOverClaw (110), -- IBM Common Link Access to Workstn
|
||||
stackToStack (111), -- IBM stackToStack
|
||||
virtualIpAddress (112), -- IBM VIPA
|
||||
mpc (113), -- IBM multi-protocol channel support
|
||||
ipOverAtm (114), -- IBM ipOverAtm
|
||||
iso88025Fiber (115), -- ISO 802.5j Fiber Token Ring
|
||||
tdlc (116), -- IBM twinaxial data link control
|
||||
gigabitEthernet (117), -- Gigabit Ethernet
|
||||
hdlc (118), -- HDLC
|
||||
lapf (119), -- LAP F
|
||||
v37 (120), -- V.37
|
||||
x25mlp (121), -- Multi-Link Protocol
|
||||
x25huntGroup (122), -- X25 Hunt Group
|
||||
trasnpHdlc (123), -- Transp HDLC
|
||||
interleave (124), -- Interleave channel
|
||||
fast (125), -- Fast channel
|
||||
ip (126), -- IP (for APPN HPR in IP networks)
|
||||
docsCableMaclayer (127), -- CATV Mac Layer
|
||||
docsCableDownstream (128), -- CATV Downstream interface
|
||||
docsCableUpstream (129), -- CATV Upstream interface
|
||||
a12MppSwitch (130), -- Avalon Parallel Processor
|
||||
tunnel (131), -- Encapsulation interface
|
||||
coffee (132), -- coffee pot
|
||||
ces (133), -- Circuit Emulation Service
|
||||
atmSubInterface (134), -- ATM Sub Interface
|
||||
l2vlan (135), -- Layer 2 Virtual LAN using 802.1Q
|
||||
l3ipvlan (136), -- Layer 3 Virtual LAN using IP
|
||||
l3ipxvlan (137), -- Layer 3 Virtual LAN using IPX
|
||||
digitalPowerline (138), -- IP over Power Lines
|
||||
mediaMailOverIp (139), -- Multimedia Mail over IP
|
||||
dtm (140), -- Dynamic syncronous Transfer Mode
|
||||
dcn (141), -- Data Communications Network
|
||||
ipForward (142), -- IP Forwarding Interface
|
||||
msdsl (143), -- Multi-rate Symmetric DSL
|
||||
ieee1394 (144), -- IEEE1394 High Performance Serial Bus
|
||||
if-gsn (145), -- HIPPI-6400
|
||||
dvbRccMacLayer (146), -- DVB-RCC MAC Layer
|
||||
dvbRccDownstream (147), -- DVB-RCC Downstream Channel
|
||||
dvbRccUpstream (148), -- DVB-RCC Upstream Channel
|
||||
atmVirtual (149), -- ATM Virtual Interface
|
||||
mplsTunnel (150), -- MPLS Tunnel Virtual Interface
|
||||
srp (151), -- Spatial Reuse Protocol
|
||||
voiceOverAtm (152), -- Voice Over ATM
|
||||
voiceOverFrameRelay (153), -- Voice Over Frame Relay
|
||||
idsl (154), -- Digital Subscriber Loop over ISDN
|
||||
compositeLink (155), -- Avici Composite Link Interface
|
||||
ss7SigLink (156), -- SS7 Signaling Link
|
||||
ieee8023adLag (161) -- IEEE 802.3ad Link Aggregate
|
||||
}
|
||||
|
||||
END
|
||||
331
src/mibs/rfc2012-tcp.mib
Normal file
331
src/mibs/rfc2012-tcp.mib
Normal file
@@ -0,0 +1,331 @@
|
||||
TCP-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY, OBJECT-TYPE, Integer32, Gauge32,
|
||||
Counter32, IpAddress, mib-2 FROM SNMPv2-SMI
|
||||
MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF;
|
||||
|
||||
tcpMIB MODULE-IDENTITY
|
||||
LAST-UPDATED "9411010000Z"
|
||||
ORGANIZATION "IETF SNMPv2 Working Group"
|
||||
CONTACT-INFO
|
||||
" Keith McCloghrie
|
||||
|
||||
Postal: Cisco Systems, Inc.
|
||||
170 West Tasman Drive
|
||||
San Jose, CA 95134-1706
|
||||
US
|
||||
|
||||
Phone: +1 408 526 5260
|
||||
Email: kzm@cisco.com"
|
||||
DESCRIPTION
|
||||
"The MIB module for managing TCP implementations."
|
||||
REVISION "9103310000Z"
|
||||
DESCRIPTION
|
||||
"The initial revision of this MIB module was part of MIB-
|
||||
II."
|
||||
::= { mib-2 49 }
|
||||
|
||||
-- the TCP group
|
||||
|
||||
tcp OBJECT IDENTIFIER ::= { mib-2 6 }
|
||||
|
||||
tcpRtoAlgorithm OBJECT-TYPE
|
||||
SYNTAX INTEGER {
|
||||
other(1), -- none of the following
|
||||
constant(2), -- a constant rto
|
||||
rsre(3), -- MIL-STD-1778, Appendix B
|
||||
vanj(4) -- Van Jacobson's algorithm [5]
|
||||
}
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The algorithm used to determine the timeout value used for
|
||||
retransmitting unacknowledged octets."
|
||||
::= { tcp 1 }
|
||||
|
||||
tcpRtoMin OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
UNITS "milliseconds"
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The minimum value permitted by a TCP implementation for the
|
||||
retransmission timeout, measured in milliseconds. More
|
||||
refined semantics for objects of this type depend upon the
|
||||
algorithm used to determine the retransmission timeout. In
|
||||
particular, when the timeout algorithm is rsre(3), an object
|
||||
of this type has the semantics of the LBOUND quantity
|
||||
described in RFC 793."
|
||||
::= { tcp 2 }
|
||||
|
||||
tcpRtoMax OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
UNITS "milliseconds"
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The maximum value permitted by a TCP implementation for the
|
||||
retransmission timeout, measured in milliseconds. More
|
||||
refined semantics for objects of this type depend upon the
|
||||
algorithm used to determine the retransmission timeout. In
|
||||
particular, when the timeout algorithm is rsre(3), an object
|
||||
of this type has the semantics of the UBOUND quantity
|
||||
described in RFC 793."
|
||||
::= { tcp 3 }
|
||||
|
||||
tcpMaxConn OBJECT-TYPE
|
||||
SYNTAX Integer32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The limit on the total number of TCP connections the entity
|
||||
can support. In entities where the maximum number of
|
||||
connections is dynamic, this object should contain the value
|
||||
-1."
|
||||
::= { tcp 4 }
|
||||
|
||||
tcpActiveOpens OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The number of times TCP connections have made a direct
|
||||
transition to the SYN-SENT state from the CLOSED state."
|
||||
::= { tcp 5 }
|
||||
|
||||
tcpPassiveOpens OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The number of times TCP connections have made a direct
|
||||
transition to the SYN-RCVD state from the LISTEN state."
|
||||
::= { tcp 6 }
|
||||
|
||||
tcpAttemptFails OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The number of times TCP connections have made a direct
|
||||
transition to the CLOSED state from either the SYN-SENT
|
||||
state or the SYN-RCVD state, plus the number of times TCP
|
||||
connections have made a direct transition to the LISTEN
|
||||
state from the SYN-RCVD state."
|
||||
::= { tcp 7 }
|
||||
|
||||
tcpEstabResets OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The number of times TCP connections have made a direct
|
||||
transition to the CLOSED state from either the ESTABLISHED
|
||||
state or the CLOSE-WAIT state."
|
||||
::= { tcp 8 }
|
||||
|
||||
tcpCurrEstab OBJECT-TYPE
|
||||
SYNTAX Gauge32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The number of TCP connections for which the current state
|
||||
is either ESTABLISHED or CLOSE- WAIT."
|
||||
::= { tcp 9 }
|
||||
|
||||
|
||||
tcpInSegs OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of segments received, including those
|
||||
received in error. This count includes segments received on
|
||||
currently established connections."
|
||||
::= { tcp 10 }
|
||||
|
||||
tcpOutSegs OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of segments sent, including those on
|
||||
current connections but excluding those containing only
|
||||
retransmitted octets."
|
||||
::= { tcp 11 }
|
||||
|
||||
tcpRetransSegs OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of segments retransmitted - that is, the
|
||||
number of TCP segments transmitted containing one or more
|
||||
previously transmitted octets."
|
||||
::= { tcp 12 }
|
||||
|
||||
|
||||
-- the TCP Connection table
|
||||
|
||||
-- The TCP connection table contains information about this
|
||||
-- entity's existing TCP connections.
|
||||
|
||||
tcpConnTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF TcpConnEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A table containing TCP connection-specific information."
|
||||
::= { tcp 13 }
|
||||
|
||||
tcpConnEntry OBJECT-TYPE
|
||||
SYNTAX TcpConnEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A conceptual row of the tcpConnTable containing information
|
||||
about a particular current TCP connection. Each row of this
|
||||
table is transient, in that it ceases to exist when (or soon
|
||||
after) the connection makes the transition to the CLOSED
|
||||
state."
|
||||
INDEX { tcpConnLocalAddress,
|
||||
tcpConnLocalPort,
|
||||
tcpConnRemAddress,
|
||||
tcpConnRemPort }
|
||||
::= { tcpConnTable 1 }
|
||||
|
||||
TcpConnEntry ::= SEQUENCE {
|
||||
tcpConnState INTEGER,
|
||||
tcpConnLocalAddress IpAddress,
|
||||
tcpConnLocalPort INTEGER,
|
||||
tcpConnRemAddress IpAddress,
|
||||
tcpConnRemPort INTEGER
|
||||
}
|
||||
|
||||
tcpConnState OBJECT-TYPE
|
||||
SYNTAX INTEGER {
|
||||
closed(1),
|
||||
listen(2),
|
||||
synSent(3),
|
||||
synReceived(4),
|
||||
established(5),
|
||||
finWait1(6),
|
||||
finWait2(7),
|
||||
closeWait(8),
|
||||
lastAck(9),
|
||||
closing(10),
|
||||
timeWait(11),
|
||||
deleteTCB(12)
|
||||
}
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The state of this TCP connection.
|
||||
|
||||
The only value which may be set by a management station is
|
||||
deleteTCB(12). Accordingly, it is appropriate for an agent
|
||||
to return a `badValue' response if a management station
|
||||
attempts to set this object to any other value.
|
||||
|
||||
If a management station sets this object to the value
|
||||
deleteTCB(12), then this has the effect of deleting the TCB
|
||||
(as defined in RFC 793) of the corresponding connection on
|
||||
the managed node, resulting in immediate termination of the
|
||||
connection.
|
||||
|
||||
As an implementation-specific option, a RST segment may be
|
||||
sent from the managed node to the other TCP endpoint (note
|
||||
however that RST segments are not sent reliably)."
|
||||
::= { tcpConnEntry 1 }
|
||||
|
||||
tcpConnLocalAddress OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The local IP address for this TCP connection. In the case
|
||||
of a connection in the listen state which is willing to
|
||||
accept connections for any IP interface associated with the
|
||||
node, the value 0.0.0.0 is used."
|
||||
::= { tcpConnEntry 2 }
|
||||
|
||||
tcpConnLocalPort OBJECT-TYPE
|
||||
SYNTAX INTEGER (0..65535)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The local port number for this TCP connection."
|
||||
::= { tcpConnEntry 3 }
|
||||
|
||||
tcpConnRemAddress OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The remote IP address for this TCP connection."
|
||||
::= { tcpConnEntry 4 }
|
||||
|
||||
tcpConnRemPort OBJECT-TYPE
|
||||
SYNTAX INTEGER (0..65535)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The remote port number for this TCP connection."
|
||||
::= { tcpConnEntry 5 }
|
||||
|
||||
tcpInErrs OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of segments received in error (e.g., bad
|
||||
TCP checksums)."
|
||||
::= { tcp 14 }
|
||||
|
||||
tcpOutRsts OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The number of TCP segments sent containing the RST flag."
|
||||
::= { tcp 15 }
|
||||
|
||||
-- conformance information
|
||||
|
||||
tcpMIBConformance OBJECT IDENTIFIER ::= { tcpMIB 2 }
|
||||
|
||||
tcpMIBCompliances OBJECT IDENTIFIER ::= { tcpMIBConformance 1 }
|
||||
tcpMIBGroups OBJECT IDENTIFIER ::= { tcpMIBConformance 2 }
|
||||
|
||||
|
||||
-- compliance statements
|
||||
|
||||
tcpMIBCompliance MODULE-COMPLIANCE
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The compliance statement for SNMPv2 entities which
|
||||
implement TCP."
|
||||
MODULE -- this module
|
||||
MANDATORY-GROUPS { tcpGroup
|
||||
}
|
||||
::= { tcpMIBCompliances 1 }
|
||||
|
||||
-- units of conformance
|
||||
|
||||
tcpGroup OBJECT-GROUP
|
||||
OBJECTS { tcpRtoAlgorithm, tcpRtoMin, tcpRtoMax,
|
||||
tcpMaxConn, tcpActiveOpens,
|
||||
tcpPassiveOpens, tcpAttemptFails,
|
||||
tcpEstabResets, tcpCurrEstab, tcpInSegs,
|
||||
tcpOutSegs, tcpRetransSegs, tcpConnState,
|
||||
tcpConnLocalAddress, tcpConnLocalPort,
|
||||
tcpConnRemAddress, tcpConnRemPort,
|
||||
tcpInErrs, tcpOutRsts }
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The tcp group of objects providing for management of TCP
|
||||
entities."
|
||||
::= { tcpMIBGroups 1 }
|
||||
|
||||
END
|
||||
147
src/mibs/rfc2013-udp.mib
Normal file
147
src/mibs/rfc2013-udp.mib
Normal file
@@ -0,0 +1,147 @@
|
||||
UDP-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY, OBJECT-TYPE, Counter32,
|
||||
IpAddress, mib-2 FROM SNMPv2-SMI
|
||||
MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF;
|
||||
|
||||
|
||||
udpMIB MODULE-IDENTITY
|
||||
LAST-UPDATED "9411010000Z"
|
||||
ORGANIZATION "IETF SNMPv2 Working Group"
|
||||
CONTACT-INFO
|
||||
" Keith McCloghrie
|
||||
|
||||
Postal: Cisco Systems, Inc.
|
||||
170 West Tasman Drive
|
||||
San Jose, CA 95134-1706
|
||||
US
|
||||
|
||||
Phone: +1 408 526 5260
|
||||
Email: kzm@cisco.com"
|
||||
DESCRIPTION
|
||||
"The MIB module for managing UDP implementations."
|
||||
REVISION "9103310000Z"
|
||||
DESCRIPTION
|
||||
"The initial revision of this MIB module was part of MIB-
|
||||
II."
|
||||
::= { mib-2 50 }
|
||||
|
||||
-- the UDP group
|
||||
|
||||
udp OBJECT IDENTIFIER ::= { mib-2 7 }
|
||||
|
||||
udpInDatagrams OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of UDP datagrams delivered to UDP users."
|
||||
::= { udp 1 }
|
||||
|
||||
udpNoPorts OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of received UDP datagrams for which there
|
||||
was no application at the destination port."
|
||||
::= { udp 2 }
|
||||
|
||||
udpInErrors OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The number of received UDP datagrams that could not be
|
||||
delivered for reasons other than the lack of an application
|
||||
at the destination port."
|
||||
::= { udp 3 }
|
||||
|
||||
udpOutDatagrams OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of UDP datagrams sent from this entity."
|
||||
::= { udp 4 }
|
||||
|
||||
-- the UDP Listener table
|
||||
|
||||
-- The UDP listener table contains information about this
|
||||
-- entity's UDP end-points on which a local application is
|
||||
-- currently accepting datagrams.
|
||||
|
||||
udpTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF UdpEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A table containing UDP listener information."
|
||||
::= { udp 5 }
|
||||
|
||||
udpEntry OBJECT-TYPE
|
||||
SYNTAX UdpEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Information about a particular current UDP listener."
|
||||
INDEX { udpLocalAddress, udpLocalPort }
|
||||
::= { udpTable 1 }
|
||||
|
||||
UdpEntry ::= SEQUENCE {
|
||||
udpLocalAddress IpAddress,
|
||||
udpLocalPort INTEGER
|
||||
}
|
||||
|
||||
udpLocalAddress OBJECT-TYPE
|
||||
SYNTAX IpAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The local IP address for this UDP listener. In the case of
|
||||
a UDP listener which is willing to accept datagrams for any
|
||||
IP interface associated with the node, the value 0.0.0.0 is
|
||||
used."
|
||||
::= { udpEntry 1 }
|
||||
|
||||
udpLocalPort OBJECT-TYPE
|
||||
SYNTAX INTEGER (0..65535)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The local port number for this UDP listener."
|
||||
::= { udpEntry 2 }
|
||||
|
||||
-- conformance information
|
||||
|
||||
udpMIBConformance OBJECT IDENTIFIER ::= { udpMIB 2 }
|
||||
|
||||
udpMIBCompliances OBJECT IDENTIFIER ::= { udpMIBConformance 1 }
|
||||
udpMIBGroups OBJECT IDENTIFIER ::= { udpMIBConformance 2 }
|
||||
|
||||
-- compliance statements
|
||||
|
||||
udpMIBCompliance MODULE-COMPLIANCE
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The compliance statement for SNMPv2 entities which
|
||||
implement UDP."
|
||||
MODULE -- this module
|
||||
MANDATORY-GROUPS { udpGroup
|
||||
}
|
||||
::= { udpMIBCompliances 1 }
|
||||
|
||||
-- units of conformance
|
||||
|
||||
udpGroup OBJECT-GROUP
|
||||
OBJECTS { udpInDatagrams, udpNoPorts,
|
||||
udpInErrors, udpOutDatagrams,
|
||||
udpLocalAddress, udpLocalPort }
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The udp group of objects providing for management of UDP
|
||||
entities."
|
||||
::= { udpMIBGroups 1 }
|
||||
|
||||
END
|
||||
493
src/mibs/rfc2571-snmp-framework.mib
Normal file
493
src/mibs/rfc2571-snmp-framework.mib
Normal file
@@ -0,0 +1,493 @@
|
||||
SNMP-FRAMEWORK-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY, OBJECT-TYPE,
|
||||
OBJECT-IDENTITY,
|
||||
snmpModules FROM SNMPv2-SMI
|
||||
TEXTUAL-CONVENTION FROM SNMPv2-TC
|
||||
MODULE-COMPLIANCE, OBJECT-GROUP FROM SNMPv2-CONF;
|
||||
|
||||
snmpFrameworkMIB MODULE-IDENTITY
|
||||
LAST-UPDATED "9901190000Z" -- 19 January 1999
|
||||
ORGANIZATION "SNMPv3 Working Group"
|
||||
CONTACT-INFO "WG-EMail: snmpv3@tis.com
|
||||
Subscribe: majordomo@tis.com
|
||||
In message body: subscribe snmpv3
|
||||
|
||||
Chair: Russ Mundy
|
||||
TIS Labs at Network Associates
|
||||
postal: 3060 Washington Rd
|
||||
Glenwood MD 21738
|
||||
USA
|
||||
EMail: mundy@tis.com
|
||||
phone: +1 301-854-6889
|
||||
|
||||
Co-editor Dave Harrington
|
||||
Cabletron Systems, Inc.
|
||||
postal: Post Office Box 5005
|
||||
Mail Stop: Durham
|
||||
35 Industrial Way
|
||||
Rochester, NH 03867-5005
|
||||
USA
|
||||
EMail: dbh@ctron.com
|
||||
phone: +1 603-337-7357
|
||||
|
||||
Co-editor Randy Presuhn
|
||||
BMC Software, Inc.
|
||||
postal: 965 Stewart Drive
|
||||
Sunnyvale, CA 94086
|
||||
USA
|
||||
EMail: randy_presuhn@bmc.com
|
||||
phone: +1 408-616-3100
|
||||
|
||||
Co-editor: Bert Wijnen
|
||||
IBM T.J. Watson Research
|
||||
postal: Schagen 33
|
||||
3461 GL Linschoten
|
||||
Netherlands
|
||||
EMail: wijnen@vnet.ibm.com
|
||||
phone: +31 348-432-794
|
||||
"
|
||||
DESCRIPTION "The SNMP Management Architecture MIB"
|
||||
-- Revision History
|
||||
|
||||
REVISION "9901190000Z" -- 19 January 1999
|
||||
DESCRIPTION "Updated editors' addresses, fixed typos.
|
||||
Published as RFC2571.
|
||||
"
|
||||
REVISION "9711200000Z" -- 20 November 1997
|
||||
DESCRIPTION "The initial version, published in RFC 2271.
|
||||
"
|
||||
::= { snmpModules 10 }
|
||||
|
||||
-- Textual Conventions used in the SNMP Management Architecture ===
|
||||
|
||||
SnmpEngineID ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION "An SNMP engine's administratively-unique identifier.
|
||||
Objects of this type are for identification, not for
|
||||
addressing, even though it is possible that an
|
||||
address may have been used in the generation of
|
||||
a specific value.
|
||||
|
||||
The value for this object may not be all zeros or
|
||||
all 'ff'H or the empty (zero length) string.
|
||||
|
||||
The initial value for this object may be configured
|
||||
via an operator console entry or via an algorithmic
|
||||
function. In the latter case, the following
|
||||
example algorithm is recommended.
|
||||
|
||||
In cases where there are multiple engines on the
|
||||
same system, the use of this algorithm is NOT
|
||||
appropriate, as it would result in all of those
|
||||
engines ending up with the same ID value.
|
||||
|
||||
1) The very first bit is used to indicate how the
|
||||
rest of the data is composed.
|
||||
|
||||
0 - as defined by enterprise using former methods
|
||||
that existed before SNMPv3. See item 2 below.
|
||||
|
||||
1 - as defined by this architecture, see item 3
|
||||
below.
|
||||
Note that this allows existing uses of the
|
||||
engineID (also known as AgentID [RFC1910]) to
|
||||
co-exist with any new uses.
|
||||
|
||||
2) The snmpEngineID has a length of 12 octets.
|
||||
|
||||
The first four octets are set to the binary
|
||||
equivalent of the agent's SNMP management
|
||||
private enterprise number as assigned by the
|
||||
Internet Assigned Numbers Authority (IANA).
|
||||
For example, if Acme Networks has been assigned
|
||||
{ enterprises 696 }, the first four octets would
|
||||
be assigned '000002b8'H.
|
||||
|
||||
The remaining eight octets are determined via
|
||||
one or more enterprise-specific methods. Such
|
||||
methods must be designed so as to maximize the
|
||||
possibility that the value of this object will
|
||||
be unique in the agent's administrative domain.
|
||||
For example, it may be the IP address of the SNMP
|
||||
entity, or the MAC address of one of the
|
||||
interfaces, with each address suitably padded
|
||||
with random octets. If multiple methods are
|
||||
defined, then it is recommended that the first
|
||||
octet indicate the method being used and the
|
||||
remaining octets be a function of the method.
|
||||
|
||||
3) The length of the octet strings varies.
|
||||
|
||||
The first four octets are set to the binary
|
||||
equivalent of the agent's SNMP management
|
||||
private enterprise number as assigned by the
|
||||
Internet Assigned Numbers Authority (IANA).
|
||||
For example, if Acme Networks has been assigned
|
||||
{ enterprises 696 }, the first four octets would
|
||||
be assigned '000002b8'H.
|
||||
|
||||
The very first bit is set to 1. For example, the
|
||||
above value for Acme Networks now changes to be
|
||||
'800002b8'H.
|
||||
|
||||
The fifth octet indicates how the rest (6th and
|
||||
following octets) are formatted. The values for
|
||||
the fifth octet are:
|
||||
|
||||
0 - reserved, unused.
|
||||
|
||||
1 - IPv4 address (4 octets)
|
||||
lowest non-special IP address
|
||||
|
||||
2 - IPv6 address (16 octets)
|
||||
lowest non-special IP address
|
||||
|
||||
3 - MAC address (6 octets)
|
||||
lowest IEEE MAC address, canonical
|
||||
order
|
||||
|
||||
4 - Text, administratively assigned
|
||||
Maximum remaining length 27
|
||||
|
||||
5 - Octets, administratively assigned
|
||||
Maximum remaining length 27
|
||||
|
||||
6-127 - reserved, unused
|
||||
|
||||
127-255 - as defined by the enterprise
|
||||
Maximum remaining length 27
|
||||
"
|
||||
SYNTAX OCTET STRING (SIZE(5..32))
|
||||
|
||||
SnmpSecurityModel ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION "An identifier that uniquely identifies a
|
||||
securityModel of the Security Subsystem within the
|
||||
SNMP Management Architecture.
|
||||
|
||||
The values for securityModel are allocated as
|
||||
follows:
|
||||
|
||||
- The zero value is reserved.
|
||||
- Values between 1 and 255, inclusive, are reserved
|
||||
for standards-track Security Models and are
|
||||
managed by the Internet Assigned Numbers Authority
|
||||
(IANA).
|
||||
- Values greater than 255 are allocated to
|
||||
enterprise-specific Security Models. An
|
||||
enterprise-specific securityModel value is defined
|
||||
to be:
|
||||
|
||||
enterpriseID * 256 + security model within
|
||||
enterprise
|
||||
|
||||
For example, the fourth Security Model defined by
|
||||
the enterprise whose enterpriseID is 1 would be
|
||||
260.
|
||||
|
||||
This scheme for allocation of securityModel
|
||||
values allows for a maximum of 255 standards-
|
||||
based Security Models, and for a maximum of
|
||||
255 Security Models per enterprise.
|
||||
|
||||
It is believed that the assignment of new
|
||||
securityModel values will be rare in practice
|
||||
because the larger the number of simultaneously
|
||||
utilized Security Models, the larger the
|
||||
chance that interoperability will suffer.
|
||||
Consequently, it is believed that such a range
|
||||
will be sufficient. In the unlikely event that
|
||||
the standards committee finds this number to be
|
||||
insufficient over time, an enterprise number
|
||||
can be allocated to obtain an additional 255
|
||||
possible values.
|
||||
|
||||
Note that the most significant bit must be zero;
|
||||
hence, there are 23 bits allocated for various
|
||||
organizations to design and define non-standard
|
||||
securityModels. This limits the ability to
|
||||
define new proprietary implementations of Security
|
||||
Models to the first 8,388,608 enterprises.
|
||||
|
||||
It is worthwhile to note that, in its encoded
|
||||
form, the securityModel value will normally
|
||||
require only a single byte since, in practice,
|
||||
the leftmost bits will be zero for most messages
|
||||
and sign extension is suppressed by the encoding
|
||||
rules.
|
||||
|
||||
As of this writing, there are several values
|
||||
of securityModel defined for use with SNMP or
|
||||
reserved for use with supporting MIB objects.
|
||||
They are as follows:
|
||||
|
||||
0 reserved for 'any'
|
||||
1 reserved for SNMPv1
|
||||
2 reserved for SNMPv2c
|
||||
3 User-Based Security Model (USM)
|
||||
"
|
||||
SYNTAX INTEGER(0 .. 2147483647)
|
||||
|
||||
SnmpMessageProcessingModel ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION "An identifier that uniquely identifies a Message
|
||||
Processing Model of the Message Processing
|
||||
Subsystem within a SNMP Management Architecture.
|
||||
The values for messageProcessingModel are
|
||||
allocated as follows:
|
||||
|
||||
- Values between 0 and 255, inclusive, are
|
||||
reserved for standards-track Message Processing
|
||||
Models and are managed by the Internet Assigned
|
||||
Numbers Authority (IANA).
|
||||
|
||||
- Values greater than 255 are allocated to
|
||||
enterprise-specific Message Processing Models.
|
||||
An enterprise messageProcessingModel value is
|
||||
defined to be:
|
||||
|
||||
enterpriseID * 256 +
|
||||
messageProcessingModel within enterprise
|
||||
|
||||
For example, the fourth Message Processing Model
|
||||
defined by the enterprise whose enterpriseID
|
||||
is 1 would be 260.
|
||||
|
||||
This scheme for allocating messageProcessingModel
|
||||
values allows for a maximum of 255 standards-
|
||||
based Message Processing Models, and for a
|
||||
maximum of 255 Message Processing Models per
|
||||
enterprise.
|
||||
|
||||
It is believed that the assignment of new
|
||||
messageProcessingModel values will be rare
|
||||
in practice because the larger the number of
|
||||
simultaneously utilized Message Processing Models,
|
||||
the larger the chance that interoperability
|
||||
will suffer. It is believed that such a range
|
||||
will be sufficient. In the unlikely event that
|
||||
the standards committee finds this number to be
|
||||
insufficient over time, an enterprise number
|
||||
can be allocated to obtain an additional 256
|
||||
possible values.
|
||||
|
||||
Note that the most significant bit must be zero;
|
||||
hence, there are 23 bits allocated for various
|
||||
organizations to design and define non-standard
|
||||
messageProcessingModels. This limits the ability
|
||||
to define new proprietary implementations of
|
||||
Message Processing Models to the first 8,388,608
|
||||
enterprises.
|
||||
|
||||
It is worthwhile to note that, in its encoded
|
||||
form, the messageProcessingModel value will
|
||||
normally require only a single byte since, in
|
||||
practice, the leftmost bits will be zero for
|
||||
most messages and sign extension is suppressed
|
||||
by the encoding rules.
|
||||
|
||||
As of this writing, there are several values of
|
||||
messageProcessingModel defined for use with SNMP.
|
||||
They are as follows:
|
||||
|
||||
0 reserved for SNMPv1
|
||||
1 reserved for SNMPv2c
|
||||
2 reserved for SNMPv2u and SNMPv2*
|
||||
3 reserved for SNMPv3
|
||||
"
|
||||
SYNTAX INTEGER(0 .. 2147483647)
|
||||
|
||||
SnmpSecurityLevel ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION "A Level of Security at which SNMP messages can be
|
||||
sent or with which operations are being processed;
|
||||
in particular, one of:
|
||||
|
||||
noAuthNoPriv - without authentication and
|
||||
without privacy,
|
||||
authNoPriv - with authentication but
|
||||
without privacy,
|
||||
authPriv - with authentication and
|
||||
with privacy.
|
||||
|
||||
These three values are ordered such that
|
||||
noAuthNoPriv is less than authNoPriv and
|
||||
authNoPriv is less than authPriv.
|
||||
"
|
||||
SYNTAX INTEGER { noAuthNoPriv(1),
|
||||
authNoPriv(2),
|
||||
authPriv(3)
|
||||
}
|
||||
|
||||
SnmpAdminString ::= TEXTUAL-CONVENTION
|
||||
DISPLAY-HINT "255a"
|
||||
STATUS current
|
||||
DESCRIPTION "An octet string containing administrative
|
||||
information, preferably in human-readable form.
|
||||
|
||||
To facilitate internationalization, this
|
||||
information is represented using the ISO/IEC
|
||||
IS 10646-1 character set, encoded as an octet
|
||||
string using the UTF-8 transformation format
|
||||
described in [RFC2279].
|
||||
|
||||
Since additional code points are added by
|
||||
amendments to the 10646 standard from time
|
||||
to time, implementations must be prepared to
|
||||
encounter any code point from 0x00000000 to
|
||||
0x7fffffff. Byte sequences that do not
|
||||
correspond to the valid UTF-8 encoding of a
|
||||
code point or are outside this range are
|
||||
prohibited.
|
||||
|
||||
The use of control codes should be avoided.
|
||||
|
||||
When it is necessary to represent a newline,
|
||||
the control code sequence CR LF should be used.
|
||||
|
||||
The use of leading or trailing white space should
|
||||
be avoided.
|
||||
|
||||
For code points not directly supported by user
|
||||
interface hardware or software, an alternative
|
||||
means of entry and display, such as hexadecimal,
|
||||
may be provided.
|
||||
|
||||
For information encoded in 7-bit US-ASCII,
|
||||
the UTF-8 encoding is identical to the
|
||||
US-ASCII encoding.
|
||||
|
||||
UTF-8 may require multiple bytes to represent a
|
||||
single character / code point; thus the length
|
||||
of this object in octets may be different from
|
||||
the number of characters encoded. Similarly,
|
||||
size constraints refer to the number of encoded
|
||||
octets, not the number of characters represented
|
||||
by an encoding.
|
||||
|
||||
Note that when this TC is used for an object that
|
||||
is used or envisioned to be used as an index, then
|
||||
a SIZE restriction MUST be specified so that the
|
||||
number of sub-identifiers for any object instance
|
||||
does not exceed the limit of 128, as defined by
|
||||
[RFC1905].
|
||||
|
||||
Note that the size of an SnmpAdminString object is
|
||||
measured in octets, not characters.
|
||||
"
|
||||
SYNTAX OCTET STRING (SIZE (0..255))
|
||||
|
||||
-- Administrative assignments =======================================
|
||||
|
||||
snmpFrameworkAdmin
|
||||
OBJECT IDENTIFIER ::= { snmpFrameworkMIB 1 }
|
||||
snmpFrameworkMIBObjects
|
||||
OBJECT IDENTIFIER ::= { snmpFrameworkMIB 2 }
|
||||
snmpFrameworkMIBConformance
|
||||
OBJECT IDENTIFIER ::= { snmpFrameworkMIB 3 }
|
||||
|
||||
-- the snmpEngine Group ============================================
|
||||
|
||||
snmpEngine OBJECT IDENTIFIER ::= { snmpFrameworkMIBObjects 1 }
|
||||
|
||||
snmpEngineID OBJECT-TYPE
|
||||
SYNTAX SnmpEngineID
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION "An SNMP engine's administratively-unique identifier.
|
||||
"
|
||||
::= { snmpEngine 1 }
|
||||
|
||||
snmpEngineBoots OBJECT-TYPE
|
||||
SYNTAX INTEGER (1..2147483647)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION "The number of times that the SNMP engine has
|
||||
(re-)initialized itself since snmpEngineID
|
||||
was last configured.
|
||||
"
|
||||
::= { snmpEngine 2 }
|
||||
|
||||
snmpEngineTime OBJECT-TYPE
|
||||
SYNTAX INTEGER (0..2147483647)
|
||||
UNITS "seconds"
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION "The number of seconds since the value of
|
||||
the snmpEngineBoots object last changed.
|
||||
When incrementing this object's value would
|
||||
cause it to exceed its maximum,
|
||||
snmpEngineBoots is incremented as if a
|
||||
re-initialization had occurred, and this
|
||||
object's value consequently reverts to zero.
|
||||
"
|
||||
::= { snmpEngine 3 }
|
||||
|
||||
snmpEngineMaxMessageSize OBJECT-TYPE
|
||||
SYNTAX INTEGER (484..2147483647)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION "The maximum length in octets of an SNMP message
|
||||
which this SNMP engine can send or receive and
|
||||
process, determined as the minimum of the maximum
|
||||
message size values supported among all of the
|
||||
transports available to and supported by the engine.
|
||||
"
|
||||
::= { snmpEngine 4 }
|
||||
|
||||
|
||||
-- Registration Points for Authentication and Privacy Protocols ==
|
||||
|
||||
snmpAuthProtocols OBJECT-IDENTITY
|
||||
STATUS current
|
||||
DESCRIPTION "Registration point for standards-track
|
||||
authentication protocols used in SNMP Management
|
||||
Frameworks.
|
||||
"
|
||||
::= { snmpFrameworkAdmin 1 }
|
||||
|
||||
snmpPrivProtocols OBJECT-IDENTITY
|
||||
STATUS current
|
||||
DESCRIPTION "Registration point for standards-track privacy
|
||||
protocols used in SNMP Management Frameworks.
|
||||
"
|
||||
::= { snmpFrameworkAdmin 2 }
|
||||
|
||||
-- Conformance information ==========================================
|
||||
|
||||
snmpFrameworkMIBCompliances
|
||||
OBJECT IDENTIFIER ::= {snmpFrameworkMIBConformance 1}
|
||||
snmpFrameworkMIBGroups
|
||||
OBJECT IDENTIFIER ::= {snmpFrameworkMIBConformance 2}
|
||||
|
||||
-- compliance statements
|
||||
|
||||
snmpFrameworkMIBCompliance MODULE-COMPLIANCE
|
||||
STATUS current
|
||||
DESCRIPTION "The compliance statement for SNMP engines which
|
||||
implement the SNMP Management Framework MIB.
|
||||
"
|
||||
MODULE -- this module
|
||||
MANDATORY-GROUPS { snmpEngineGroup }
|
||||
|
||||
::= { snmpFrameworkMIBCompliances 1 }
|
||||
|
||||
-- units of conformance
|
||||
|
||||
snmpEngineGroup OBJECT-GROUP
|
||||
OBJECTS {
|
||||
snmpEngineID,
|
||||
snmpEngineBoots,
|
||||
snmpEngineTime,
|
||||
snmpEngineMaxMessageSize
|
||||
}
|
||||
STATUS current
|
||||
DESCRIPTION "A collection of objects for identifying and
|
||||
determining the configuration and current timeliness
|
||||
values of an SNMP engine.
|
||||
"
|
||||
::= { snmpFrameworkMIBGroups 1 }
|
||||
|
||||
END
|
||||
428
src/mibs/rfc2674-pbridge.mib
Normal file
428
src/mibs/rfc2674-pbridge.mib
Normal file
@@ -0,0 +1,428 @@
|
||||
P-BRIDGE-MIB DEFINITIONS ::= BEGIN
|
||||
|
||||
-- =============================================================
|
||||
-- MIB for IEEE 802.1p devices
|
||||
-- =============================================================
|
||||
|
||||
IMPORTS
|
||||
MODULE-IDENTITY, OBJECT-TYPE, Counter32, Counter64
|
||||
FROM SNMPv2-SMI
|
||||
TruthValue, TimeInterval, MacAddress, TEXTUAL-CONVENTION
|
||||
FROM SNMPv2-TC
|
||||
MODULE-COMPLIANCE, OBJECT-GROUP
|
||||
FROM SNMPv2-CONF
|
||||
dot1dBridge
|
||||
FROM BRIDGE-MIB
|
||||
ifEntry, ifIndex
|
||||
FROM IF-MIB
|
||||
;
|
||||
pBridgeMIB MODULE-IDENTITY
|
||||
LAST-UPDATED "9908250000Z"
|
||||
ORGANIZATION "IETF Bridge MIB Working Group"
|
||||
CONTACT-INFO
|
||||
" Les Bell
|
||||
Postal: 3Com Europe Ltd.
|
||||
3Com Centre, Boundary Way
|
||||
Hemel Hempstead, Herts. HP2 7YU
|
||||
UK
|
||||
Phone: +44 1442 438025
|
||||
Email: Les_Bell@3Com.com
|
||||
|
||||
Andrew Smith
|
||||
Postal: Extreme Networks
|
||||
3585 Monroe St.
|
||||
Santa Clara CA 95051
|
||||
USA
|
||||
Phone: +1 408 579 2821
|
||||
Email: andrew@extremenetworks.com
|
||||
|
||||
Paul Langille
|
||||
Postal: Newbridge Networks
|
||||
5 Corporate Drive
|
||||
Andover, MA 01810
|
||||
USA
|
||||
Phone: +1 978 691 4665
|
||||
Email: langille@newbridge.com
|
||||
|
||||
Anil Rijhsinghani
|
||||
Postal: Cabletron Systems
|
||||
50 Minuteman Road
|
||||
Andover, MA 01810
|
||||
USA
|
||||
Phone: +1 978 684 1295
|
||||
Email: anil@cabletron.com
|
||||
|
||||
Keith McCloghrie
|
||||
Postal: cisco Systems, Inc.
|
||||
170 West Tasman Drive
|
||||
San Jose, CA 95134-1706
|
||||
USA
|
||||
Phone: +1 408 526 5260
|
||||
Email: kzm@cisco.com"
|
||||
|
||||
DESCRIPTION
|
||||
"The Bridge MIB Extension module for managing Priority
|
||||
and Multicast Filtering, defined by IEEE 802.1D-1998."
|
||||
-- revision history
|
||||
|
||||
REVISION "9908250000Z"
|
||||
DESCRIPTION
|
||||
"Initial version, published as RFC 2674."
|
||||
|
||||
::= { dot1dBridge 6 }
|
||||
|
||||
pBridgeMIBObjects OBJECT IDENTIFIER ::= { pBridgeMIB 1 }
|
||||
|
||||
-- =============================================================
|
||||
-- Textual Conventions
|
||||
-- =============================================================
|
||||
|
||||
EnabledStatus ::= TEXTUAL-CONVENTION
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A simple status value for the object."
|
||||
SYNTAX INTEGER { enabled(1), disabled(2) }
|
||||
|
||||
-- =============================================================
|
||||
|
||||
-- =============================================================
|
||||
-- groups in the P-BRIDGE MIB
|
||||
-- =============================================================
|
||||
|
||||
dot1dExtBase OBJECT IDENTIFIER ::= { pBridgeMIBObjects 1 }
|
||||
dot1dPriority OBJECT IDENTIFIER ::= { pBridgeMIBObjects 2 }
|
||||
dot1dGarp OBJECT IDENTIFIER ::= { pBridgeMIBObjects 3 }
|
||||
dot1dGmrp OBJECT IDENTIFIER ::= { pBridgeMIBObjects 4 }
|
||||
|
||||
-- =============================================================
|
||||
|
||||
-- =============================================================
|
||||
-- the dot1dExtBase group
|
||||
-- =============================================================
|
||||
|
||||
dot1dDeviceCapabilities OBJECT-TYPE
|
||||
SYNTAX BITS {
|
||||
dot1dExtendedFilteringServices(0),
|
||||
-- can perform filtering of
|
||||
-- individual multicast addresses
|
||||
-- controlled by GMRP.
|
||||
dot1dTrafficClasses(1),
|
||||
-- can map user priority to
|
||||
-- multiple traffic classes.
|
||||
|
||||
|
||||
dot1qStaticEntryIndividualPort(2),
|
||||
-- dot1qStaticUnicastReceivePort &
|
||||
-- dot1qStaticMulticastReceivePort
|
||||
-- can represent non-zero entries.
|
||||
dot1qIVLCapable(3), -- Independent VLAN Learning.
|
||||
dot1qSVLCapable(4), -- Shared VLAN Learning.
|
||||
dot1qHybridCapable(5),
|
||||
-- both IVL & SVL simultaneously.
|
||||
dot1qConfigurablePvidTagging(6),
|
||||
-- whether the implementation
|
||||
-- supports the ability to
|
||||
-- override the default PVID
|
||||
-- setting and its egress status
|
||||
-- (VLAN-Tagged or Untagged) on
|
||||
-- each port.
|
||||
dot1dLocalVlanCapable(7)
|
||||
-- can support multiple local
|
||||
-- bridges, outside of the scope
|
||||
-- of 802.1Q defined VLANs.
|
||||
}
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Indicates the optional parts of IEEE 802.1D and 802.1Q
|
||||
that are implemented by this device and are manageable
|
||||
through this MIB. Capabilities that are allowed on a
|
||||
per-port basis are indicated in dot1dPortCapabilities."
|
||||
REFERENCE
|
||||
"ISO/IEC 15802-3 Section 5.2,
|
||||
IEEE 802.1Q/D11 Section 5.2, 12.10.1.1.3/b/2"
|
||||
::= { dot1dExtBase 1 }
|
||||
|
||||
dot1dTrafficClassesEnabled OBJECT-TYPE
|
||||
SYNTAX TruthValue
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The value true(1) indicates that Traffic Classes are
|
||||
enabled on this bridge. When false(2), the bridge
|
||||
operates with a single priority level for all traffic."
|
||||
DEFVAL { true }
|
||||
::= { dot1dExtBase 2 }
|
||||
|
||||
dot1dGmrpStatus OBJECT-TYPE
|
||||
SYNTAX EnabledStatus
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The administrative status requested by management for
|
||||
GMRP. The value enabled(1) indicates that GMRP should
|
||||
be enabled on this device, in all VLANs, on all ports
|
||||
for which it has not been specifically disabled. When
|
||||
disabled(2), GMRP is disabled, in all VLANs, on all
|
||||
ports and all GMRP packets will be forwarded
|
||||
transparently. This object affects both Applicant and
|
||||
Registrar state machines. A transition from disabled(2)
|
||||
to enabled(1) will cause a reset of all GMRP state
|
||||
machines on all ports."
|
||||
DEFVAL { enabled }
|
||||
::= { dot1dExtBase 3 }
|
||||
|
||||
-- =============================================================
|
||||
-- Port Capabilities Table
|
||||
-- =============================================================
|
||||
|
||||
dot1dPortCapabilitiesTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF Dot1dPortCapabilitiesEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A table that contains capabilities information about
|
||||
every port that is associated with this bridge."
|
||||
::= { dot1dExtBase 4 }
|
||||
|
||||
dot1dPortCapabilitiesEntry OBJECT-TYPE
|
||||
SYNTAX Dot1dPortCapabilitiesEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A set of capabilities information about this port
|
||||
indexed by dot1dBasePort."
|
||||
AUGMENTS { ifEntry }
|
||||
::= { dot1dPortCapabilitiesTable 1 }
|
||||
|
||||
Dot1dPortCapabilitiesEntry ::=
|
||||
SEQUENCE {
|
||||
dot1dPortCapabilities
|
||||
BITS
|
||||
}
|
||||
|
||||
dot1dPortCapabilities OBJECT-TYPE
|
||||
SYNTAX BITS {
|
||||
dot1qDot1qTagging(0), -- supports 802.1Q VLAN tagging of
|
||||
-- frames and GVRP.
|
||||
dot1qConfigurableAcceptableFrameTypes(1),
|
||||
-- allows modified values of
|
||||
|
||||
-- dot1qPortAcceptableFrameTypes.
|
||||
dot1qIngressFiltering(2)
|
||||
-- supports the discarding of any
|
||||
-- frame received on a Port whose
|
||||
-- VLAN classification does not
|
||||
-- include that Port in its Member
|
||||
-- set.
|
||||
}
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"Indicates the parts of IEEE 802.1D and 802.1Q that are
|
||||
optional on a per-port basis that are implemented by
|
||||
this device and are manageable through this MIB."
|
||||
REFERENCE
|
||||
"ISO/IEC 15802-3 Section 5.2,
|
||||
IEEE 802.1Q/D11 Section 5.2"
|
||||
::= { dot1dPortCapabilitiesEntry 1 }
|
||||
|
||||
-- =============================================================
|
||||
-- the dot1dPriority group
|
||||
-- =============================================================
|
||||
|
||||
-- =============================================================
|
||||
-- Port Priority Table
|
||||
-- =============================================================
|
||||
|
||||
dot1dPortPriorityTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF Dot1dPortPriorityEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A table that contains information about every port that
|
||||
is associated with this transparent bridge."
|
||||
::= { dot1dPriority 1 }
|
||||
|
||||
dot1dPortPriorityEntry OBJECT-TYPE
|
||||
SYNTAX Dot1dPortPriorityEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A list of Default User Priorities for each port of a
|
||||
transparent bridge. This is indexed by dot1dBasePort."
|
||||
AUGMENTS { ifEntry }
|
||||
::= { dot1dPortPriorityTable 1 }
|
||||
|
||||
Dot1dPortPriorityEntry ::=
|
||||
SEQUENCE {
|
||||
dot1dPortDefaultUserPriority
|
||||
INTEGER,
|
||||
dot1dPortNumTrafficClasses
|
||||
INTEGER
|
||||
}
|
||||
|
||||
dot1dPortDefaultUserPriority OBJECT-TYPE
|
||||
SYNTAX INTEGER (0..7)
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The default ingress User Priority for this port. This
|
||||
only has effect on media, such as Ethernet, that do not
|
||||
support native User Priority."
|
||||
DEFVAL {0}
|
||||
::= { dot1dPortPriorityEntry 1 }
|
||||
|
||||
dot1dPortNumTrafficClasses OBJECT-TYPE
|
||||
SYNTAX INTEGER (1..8)
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The number of egress traffic classes supported on this
|
||||
port. This object may optionally be read-only."
|
||||
::= { dot1dPortPriorityEntry 2 }
|
||||
|
||||
|
||||
|
||||
-- =============================================================
|
||||
-- the dot1dGarp group
|
||||
-- =============================================================
|
||||
|
||||
-- =============================================================
|
||||
-- The GARP Port Table
|
||||
-- =============================================================
|
||||
|
||||
|
||||
dot1dPortGarpTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF Dot1dPortGarpEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A table of GARP control information about every bridge
|
||||
port. This is indexed by dot1dBasePort."
|
||||
::= { dot1dGarp 1 }
|
||||
|
||||
dot1dPortGarpEntry OBJECT-TYPE
|
||||
SYNTAX Dot1dPortGarpEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"GARP control information for a bridge port."
|
||||
AUGMENTS { ifEntry }
|
||||
::= { dot1dPortGarpTable 1 }
|
||||
|
||||
Dot1dPortGarpEntry ::=
|
||||
SEQUENCE {
|
||||
dot1dPortGarpJoinTime
|
||||
TimeInterval,
|
||||
dot1dPortGarpLeaveTime
|
||||
TimeInterval,
|
||||
dot1dPortGarpLeaveAllTime
|
||||
TimeInterval
|
||||
}
|
||||
|
||||
dot1dPortGarpJoinTime OBJECT-TYPE
|
||||
SYNTAX TimeInterval
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The GARP Join time, in centiseconds."
|
||||
DEFVAL { 20 }
|
||||
::= { dot1dPortGarpEntry 1 }
|
||||
|
||||
dot1dPortGarpLeaveTime OBJECT-TYPE
|
||||
SYNTAX TimeInterval
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The GARP Leave time, in centiseconds."
|
||||
DEFVAL { 60 }
|
||||
::= { dot1dPortGarpEntry 2 }
|
||||
|
||||
dot1dPortGarpLeaveAllTime OBJECT-TYPE
|
||||
SYNTAX TimeInterval
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The GARP LeaveAll time, in centiseconds."
|
||||
DEFVAL { 1000 }
|
||||
::= { dot1dPortGarpEntry 3 }
|
||||
|
||||
-- =============================================================
|
||||
-- The GMRP Port Configuration and Status Table
|
||||
-- =============================================================
|
||||
|
||||
dot1dPortGmrpTable OBJECT-TYPE
|
||||
SYNTAX SEQUENCE OF Dot1dPortGmrpEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"A table of GMRP control and status information about
|
||||
every bridge port. Augments the dot1dBasePortTable."
|
||||
::= { dot1dGmrp 1 }
|
||||
|
||||
dot1dPortGmrpEntry OBJECT-TYPE
|
||||
SYNTAX Dot1dPortGmrpEntry
|
||||
MAX-ACCESS not-accessible
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"GMRP control and status information for a bridge port."
|
||||
AUGMENTS { ifEntry }
|
||||
::= { dot1dPortGmrpTable 1 }
|
||||
|
||||
Dot1dPortGmrpEntry ::=
|
||||
SEQUENCE {
|
||||
dot1dPortGmrpStatus
|
||||
EnabledStatus,
|
||||
dot1dPortGmrpFailedRegistrations
|
||||
Counter32,
|
||||
dot1dPortGmrpLastPduOrigin
|
||||
MacAddress
|
||||
}
|
||||
|
||||
dot1dPortGmrpStatus OBJECT-TYPE
|
||||
SYNTAX EnabledStatus
|
||||
MAX-ACCESS read-write
|
||||
STATUS current
|
||||
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
"The administrative state of GMRP operation on this port. The
|
||||
value enabled(1) indicates that GMRP is enabled on this port
|
||||
in all VLANs as long as dot1dGmrpStatus is also enabled(1).
|
||||
A value of disabled(2) indicates that GMRP is disabled on
|
||||
this port in all VLANs: any GMRP packets received will
|
||||
be silently discarded and no GMRP registrations will be
|
||||
propagated from other ports. Setting this to a value of
|
||||
enabled(1) will be stored by the agent but will only take
|
||||
effect on the GMRP protocol operation if dot1dGmrpStatus
|
||||
also indicates the value enabled(1). This object affects
|
||||
all GMRP Applicant and Registrar state machines on this
|
||||
port. A transition from disabled(2) to enabled(1) will
|
||||
cause a reset of all GMRP state machines on this port."
|
||||
DEFVAL { enabled }
|
||||
::= { dot1dPortGmrpEntry 1 }
|
||||
|
||||
dot1dPortGmrpFailedRegistrations OBJECT-TYPE
|
||||
SYNTAX Counter32
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The total number of failed GMRP registrations, for any
|
||||
reason, in all VLANs, on this port."
|
||||
::= { dot1dPortGmrpEntry 2 }
|
||||
|
||||
dot1dPortGmrpLastPduOrigin OBJECT-TYPE
|
||||
SYNTAX MacAddress
|
||||
MAX-ACCESS read-only
|
||||
STATUS current
|
||||
DESCRIPTION
|
||||
"The Source MAC Address of the last GMRP message
|
||||
received on this port."
|
||||
::= { dot1dPortGmrpEntry 3 }
|
||||
|
||||
|
||||
|
||||
END
|
||||
|
||||
1868
src/mibs/rfc2674-qbridge.mib
Normal file
1868
src/mibs/rfc2674-qbridge.mib
Normal file
File diff suppressed because it is too large
Load Diff
3980
src/mibs/rmon.mib
Normal file
3980
src/mibs/rmon.mib
Normal file
File diff suppressed because it is too large
Load Diff
44
src/nis/nms/bean/Backup.java
Normal file
44
src/nis/nms/bean/Backup.java
Normal file
@@ -0,0 +1,44 @@
|
||||
package nis.nms.bean;
|
||||
public class Backup{
|
||||
private String backup;
|
||||
private String backupTo;
|
||||
private String[] except;
|
||||
private String exceptTmpStr;
|
||||
private String isAbs;
|
||||
|
||||
public Backup() {
|
||||
|
||||
}
|
||||
|
||||
public String getBackup() {
|
||||
return backup;
|
||||
}
|
||||
public void setBackup(String backup) {
|
||||
this.backup = backup;
|
||||
}
|
||||
public String getBackupTo() {
|
||||
return backupTo;
|
||||
}
|
||||
public void setBackupTo(String backupTo) {
|
||||
this.backupTo = backupTo;
|
||||
}
|
||||
public String[] getExcept() {
|
||||
return except;
|
||||
}
|
||||
public void setExcept(String[] except) {
|
||||
this.except = except;
|
||||
}
|
||||
public String getIsAbs() {
|
||||
return isAbs;
|
||||
}
|
||||
public void setIsAbs(String isAbs) {
|
||||
this.isAbs = isAbs;
|
||||
}
|
||||
public String getExceptTmpStr() {
|
||||
return exceptTmpStr;
|
||||
}
|
||||
public void setExceptTmpStr(String exceptTmpStr) {
|
||||
this.exceptTmpStr = exceptTmpStr;
|
||||
}
|
||||
|
||||
}
|
||||
127
src/nis/nms/bean/ContactSetInfo.java
Normal file
127
src/nis/nms/bean/ContactSetInfo.java
Normal file
@@ -0,0 +1,127 @@
|
||||
package nis.nms.bean;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 客户端用到的监测设置信息实体
|
||||
*
|
||||
*/
|
||||
public class ContactSetInfo {
|
||||
|
||||
/**
|
||||
* 监测设置信息ID
|
||||
*/
|
||||
private Long missionId;
|
||||
private String missionName;
|
||||
private String nodeGroupName;
|
||||
private String nodeGroupsId;
|
||||
private String nodeIpsId;
|
||||
private String nodeIpsName;
|
||||
private Long missionType;
|
||||
private Long missionState;
|
||||
private Long isLoop;
|
||||
private Date startTime;
|
||||
private Date endTime;
|
||||
private Long viewLevel;
|
||||
private Long createUserId;
|
||||
private Long createUserGroupId;
|
||||
private Long systemId;
|
||||
private String contactUserIds;
|
||||
public Long getViewLevel() {
|
||||
return viewLevel;
|
||||
}
|
||||
public void setViewLevel(Long viewLevel) {
|
||||
this.viewLevel = viewLevel;
|
||||
}
|
||||
public Long getCreateUserId() {
|
||||
return createUserId;
|
||||
}
|
||||
public void setCreateUserId(Long createUserId) {
|
||||
this.createUserId = createUserId;
|
||||
}
|
||||
public Long getCreateUserGroupId() {
|
||||
return createUserGroupId;
|
||||
}
|
||||
public void setCreateUserGroupId(Long createUserGroupId) {
|
||||
this.createUserGroupId = createUserGroupId;
|
||||
}
|
||||
public Long getSystemId() {
|
||||
return systemId;
|
||||
}
|
||||
public void setSystemId(Long systemId) {
|
||||
this.systemId = systemId;
|
||||
}
|
||||
public String getContactUserIds() {
|
||||
return contactUserIds;
|
||||
}
|
||||
public void setContactUserIds(String contactUserIds) {
|
||||
this.contactUserIds = contactUserIds;
|
||||
}
|
||||
public Long getMissionId() {
|
||||
return missionId;
|
||||
}
|
||||
public void setMissionId(Long missionId) {
|
||||
this.missionId = missionId;
|
||||
}
|
||||
public String getMissionName() {
|
||||
return missionName;
|
||||
}
|
||||
public void setMissionName(String missionName) {
|
||||
this.missionName = missionName;
|
||||
}
|
||||
public String getNodeGroupName() {
|
||||
return nodeGroupName;
|
||||
}
|
||||
public void setNodeGroupName(String nodeGroupName) {
|
||||
this.nodeGroupName = nodeGroupName;
|
||||
}
|
||||
public Long getMissionType() {
|
||||
return missionType;
|
||||
}
|
||||
public void setMissionType(Long missionType) {
|
||||
this.missionType = missionType;
|
||||
}
|
||||
public Long getMissionState() {
|
||||
return missionState;
|
||||
}
|
||||
public void setMissionState(Long missionState) {
|
||||
this.missionState = missionState;
|
||||
}
|
||||
public Long getIsLoop() {
|
||||
return isLoop;
|
||||
}
|
||||
public void setIsLoop(Long isLoop) {
|
||||
this.isLoop = isLoop;
|
||||
}
|
||||
public Date getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
public void setStartTime(Date startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
public Date getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
public void setEndTime(Date endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
public String getNodeGroupsId() {
|
||||
return nodeGroupsId;
|
||||
}
|
||||
public void setNodeGroupsId(String nodeGroupsId) {
|
||||
this.nodeGroupsId = nodeGroupsId;
|
||||
}
|
||||
public String getNodeIpsId() {
|
||||
return nodeIpsId;
|
||||
}
|
||||
public void setNodeIpsId(String nodeIpsId) {
|
||||
this.nodeIpsId = nodeIpsId;
|
||||
}
|
||||
public String getNodeIpsName() {
|
||||
return nodeIpsName;
|
||||
}
|
||||
public void setNodeIpsName(String nodeIpsName) {
|
||||
this.nodeIpsName = nodeIpsName;
|
||||
}
|
||||
}
|
||||
66
src/nis/nms/bean/CoverUpdate.java
Normal file
66
src/nis/nms/bean/CoverUpdate.java
Normal file
@@ -0,0 +1,66 @@
|
||||
package nis.nms.bean;
|
||||
public class CoverUpdate{
|
||||
/**
|
||||
* 指定更新需要的文件
|
||||
*/
|
||||
private String source = null;
|
||||
/**
|
||||
* 指定文件覆盖目录
|
||||
*/
|
||||
private String cover = null;
|
||||
/**
|
||||
* 是否创建覆盖目录,暂时没用
|
||||
*/
|
||||
private String isCreateCover = null;
|
||||
/**
|
||||
* 删除的文件或目录,如果是相对路径,则相对需要更新的目录
|
||||
*/
|
||||
private String[] delete = null;
|
||||
/**
|
||||
* 如果更新源文件是个压缩包:Y 按绝对路径解压即在根目录下解压,N 按进入备份目录解压(这个属性只针对Linux有效,Windows下只按进入备份目录解压)
|
||||
*/
|
||||
private String deleteTmpStr;//删除文件临时字符串
|
||||
private String isAbs = null;//解压标识
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
public String getCover() {
|
||||
return cover;
|
||||
}
|
||||
public void setCover(String cover) {
|
||||
this.cover = cover;
|
||||
}
|
||||
public String getIsCreateCover() {
|
||||
return isCreateCover;
|
||||
}
|
||||
public void setIsCreateCover(String isCreateCover) {
|
||||
this.isCreateCover = isCreateCover;
|
||||
}
|
||||
public String[] getDelete() {
|
||||
return delete;
|
||||
}
|
||||
public void setDelete(String[] delete) {
|
||||
this.delete = delete;
|
||||
}
|
||||
public String getIsAbs() {
|
||||
return isAbs;
|
||||
}
|
||||
public void setIsAbs(String isAbs) {
|
||||
this.isAbs = isAbs;
|
||||
}
|
||||
|
||||
public String getDeleteTmpStr()
|
||||
{
|
||||
return deleteTmpStr;
|
||||
}
|
||||
|
||||
public void setDeleteTmpStr(String deleteTmpStr)
|
||||
{
|
||||
this.deleteTmpStr = deleteTmpStr;
|
||||
}
|
||||
|
||||
}
|
||||
293
src/nis/nms/bean/DeviceInfo.java
Normal file
293
src/nis/nms/bean/DeviceInfo.java
Normal file
@@ -0,0 +1,293 @@
|
||||
package nis.nms.bean;
|
||||
|
||||
import com.zhtelecom.common.snmp.mib.MibSystem;
|
||||
|
||||
public class DeviceInfo extends MibSystem implements Cloneable{
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 2180134682630033989L;
|
||||
|
||||
private Long id;
|
||||
private String parDeviceCode;
|
||||
private String deviceCode;
|
||||
private Long deviceWidth;
|
||||
private Long deviceHeight;
|
||||
private String deviceFill;
|
||||
private String deviceFillMini;
|
||||
|
||||
private String showIndex;
|
||||
private String parShowIndex;//父设备在祖父设备上的位置标号
|
||||
private Long showLevel;
|
||||
private Long figureX;
|
||||
private Long figureY;
|
||||
private Long isLink;
|
||||
|
||||
private Long isLeaf;
|
||||
|
||||
private String pid;
|
||||
|
||||
private Integer devNum;//多个设备叠加时,设备编号,从0-(maxDevNum-1)
|
||||
|
||||
private Integer devPostionNum;//每个设备的位置个数
|
||||
|
||||
|
||||
public String getPid()
|
||||
{
|
||||
return pid;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void setPid(String pid)
|
||||
{
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
|
||||
public String getShowIndex()
|
||||
{
|
||||
return showIndex;
|
||||
}
|
||||
|
||||
|
||||
public void setShowIndex(String showIndex)
|
||||
{
|
||||
this.showIndex = showIndex;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public String getParDeviceCode()
|
||||
{
|
||||
return parDeviceCode;
|
||||
}
|
||||
|
||||
public void setParDeviceCode(String parDeviceCode)
|
||||
{
|
||||
this.parDeviceCode = parDeviceCode;
|
||||
}
|
||||
|
||||
public String getDeviceCode()
|
||||
{
|
||||
return deviceCode;
|
||||
}
|
||||
|
||||
public void setDeviceCode(String deviceCode)
|
||||
{
|
||||
this.deviceCode = deviceCode;
|
||||
}
|
||||
|
||||
|
||||
public String getDeviceFill()
|
||||
{
|
||||
return deviceFill;
|
||||
}
|
||||
|
||||
public void setDeviceFill(String deviceFill)
|
||||
{
|
||||
this.deviceFill = deviceFill;
|
||||
}
|
||||
|
||||
|
||||
public String getDeviceFillMini()
|
||||
{
|
||||
return deviceFillMini;
|
||||
}
|
||||
|
||||
|
||||
public void setDeviceFillMini(String deviceFillMini)
|
||||
{
|
||||
this.deviceFillMini = deviceFillMini;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public String getParShowIndex()
|
||||
{
|
||||
return parShowIndex;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setParShowIndex(String parShowIndex)
|
||||
{
|
||||
this.parShowIndex = parShowIndex;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Long getDeviceWidth()
|
||||
{
|
||||
return deviceWidth;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setDeviceWidth(Long deviceWidth)
|
||||
{
|
||||
this.deviceWidth = deviceWidth;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Long getDeviceHeight()
|
||||
{
|
||||
return deviceHeight;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setDeviceHeight(Long deviceHeight)
|
||||
{
|
||||
this.deviceHeight = deviceHeight;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Long getShowLevel()
|
||||
{
|
||||
return showLevel;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setShowLevel(Long showLevel)
|
||||
{
|
||||
this.showLevel = showLevel;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Long getFigureX()
|
||||
{
|
||||
return figureX;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setFigureX(Long figureX)
|
||||
{
|
||||
this.figureX = figureX;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Long getFigureY()
|
||||
{
|
||||
return figureY;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setFigureY(Long figureY)
|
||||
{
|
||||
this.figureY = figureY;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Long getIsLink()
|
||||
{
|
||||
return isLink;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setIsLink(Long isLink)
|
||||
{
|
||||
this.isLink = isLink;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Long getIsLeaf()
|
||||
{
|
||||
return isLeaf;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setIsLeaf(Long isLeaf)
|
||||
{
|
||||
this.isLeaf = isLeaf;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public DeviceInfo clone() throws CloneNotSupportedException
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return (DeviceInfo)super.clone();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Integer getDevNum()
|
||||
{
|
||||
return devNum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setDevNum(Integer devNum)
|
||||
{
|
||||
this.devNum = devNum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public Integer getDevPostionNum()
|
||||
{
|
||||
return devPostionNum;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public void setDevPostionNum(Integer devPostionNum)
|
||||
{
|
||||
this.devPostionNum = devPostionNum;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
169
src/nis/nms/bean/DiSystem.java
Normal file
169
src/nis/nms/bean/DiSystem.java
Normal file
@@ -0,0 +1,169 @@
|
||||
package nis.nms.bean;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* DiSysteminfo entity.
|
||||
*
|
||||
* @author MyEclipse Persistence Tools
|
||||
*/
|
||||
|
||||
public class DiSystem implements java.io.Serializable {
|
||||
|
||||
// Fields
|
||||
|
||||
private String sysDescr;
|
||||
private String sysUpTime;
|
||||
private String sysName;
|
||||
private String sysLocation;
|
||||
|
||||
private String sysCpu;
|
||||
private String sysMemory;
|
||||
private String sysFan;//风扇
|
||||
|
||||
private String sysInSpeedSum;//系统输入速度总和
|
||||
private String sysOutSpeedSum;//系统输出速度总和
|
||||
|
||||
private String sysInPktsSpeedSum;//系统收包速率总和
|
||||
private String sysOutPktsSpeedSum;//系统发包速率总和
|
||||
|
||||
private String sysStatus;//系统状态,通过统计所有监测得出,所有监测都正常就正常,有一个异常则异常
|
||||
|
||||
public String getSysDescr()
|
||||
{
|
||||
return sysDescr;
|
||||
}
|
||||
|
||||
public void setSysDescr(String sysDescr)
|
||||
{
|
||||
this.sysDescr = sysDescr;
|
||||
}
|
||||
|
||||
public String getSysUpTime()
|
||||
{
|
||||
return sysUpTime;
|
||||
}
|
||||
|
||||
public void setSysUpTime(String sysUpTime)
|
||||
{
|
||||
this.sysUpTime = sysUpTime;
|
||||
}
|
||||
|
||||
public String getSysName()
|
||||
{
|
||||
return sysName;
|
||||
}
|
||||
|
||||
public void setSysName(String sysName)
|
||||
{
|
||||
this.sysName = sysName;
|
||||
}
|
||||
|
||||
public String getSysLocation()
|
||||
{
|
||||
return sysLocation;
|
||||
}
|
||||
|
||||
public void setSysLocation(String sysLocation)
|
||||
{
|
||||
this.sysLocation = sysLocation;
|
||||
}
|
||||
|
||||
|
||||
public String getSysCpu()
|
||||
{
|
||||
return sysCpu;
|
||||
}
|
||||
|
||||
|
||||
public void setSysCpu(String sysCpu)
|
||||
{
|
||||
this.sysCpu = sysCpu;
|
||||
}
|
||||
|
||||
|
||||
public String getSysMemory()
|
||||
{
|
||||
return sysMemory;
|
||||
}
|
||||
|
||||
|
||||
public void setSysMemory(String sysMemory)
|
||||
{
|
||||
this.sysMemory = sysMemory;
|
||||
}
|
||||
|
||||
|
||||
public String getSysFan()
|
||||
{
|
||||
return sysFan;
|
||||
}
|
||||
|
||||
|
||||
public void setSysFan(String sysFan)
|
||||
{
|
||||
this.sysFan = sysFan;
|
||||
}
|
||||
|
||||
|
||||
public String getSysInSpeedSum()
|
||||
{
|
||||
return sysInSpeedSum;
|
||||
}
|
||||
|
||||
|
||||
public void setSysInSpeedSum(String sysInSpeedSum)
|
||||
{
|
||||
this.sysInSpeedSum = sysInSpeedSum;
|
||||
}
|
||||
|
||||
|
||||
public String getSysOutSpeedSum()
|
||||
{
|
||||
return sysOutSpeedSum;
|
||||
}
|
||||
|
||||
|
||||
public void setSysOutSpeedSum(String sysOutSpeedSum)
|
||||
{
|
||||
this.sysOutSpeedSum = sysOutSpeedSum;
|
||||
}
|
||||
|
||||
|
||||
public String getSysInPktsSpeedSum()
|
||||
{
|
||||
return sysInPktsSpeedSum;
|
||||
}
|
||||
|
||||
|
||||
public void setSysInPktsSpeedSum(String sysInPktsSpeedSum)
|
||||
{
|
||||
this.sysInPktsSpeedSum = sysInPktsSpeedSum;
|
||||
}
|
||||
|
||||
|
||||
public String getSysOutPktsSpeedSum()
|
||||
{
|
||||
return sysOutPktsSpeedSum;
|
||||
}
|
||||
|
||||
|
||||
public void setSysOutPktsSpeedSum(String sysOutPktsSpeedSum)
|
||||
{
|
||||
this.sysOutPktsSpeedSum = sysOutPktsSpeedSum;
|
||||
}
|
||||
|
||||
|
||||
public String getSysStatus()
|
||||
{
|
||||
return sysStatus;
|
||||
}
|
||||
|
||||
|
||||
public void setSysStatus(String sysStatus)
|
||||
{
|
||||
this.sysStatus = sysStatus;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
186
src/nis/nms/bean/DiSysteminfo.java
Normal file
186
src/nis/nms/bean/DiSysteminfo.java
Normal file
@@ -0,0 +1,186 @@
|
||||
package nis.nms.bean;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* DiSysteminfo entity.
|
||||
*
|
||||
* @author MyEclipse Persistence Tools
|
||||
*/
|
||||
|
||||
public class DiSysteminfo implements java.io.Serializable {
|
||||
|
||||
// Fields
|
||||
|
||||
private Long detectionInfoId;
|
||||
private String hostName;
|
||||
private String operateSystem;
|
||||
private Long cpuCnt;
|
||||
private Long cpuMhz;
|
||||
private Double memorySize;
|
||||
private Double swapSize;
|
||||
private Double diskSize;
|
||||
private Long netCnt;
|
||||
private Date dataCheckTime;
|
||||
private Date dataArriveTime;
|
||||
private String dataCheckTimeStr;
|
||||
private String dataArriveTimeStr;
|
||||
private Long dataCheckTimeDigital;
|
||||
private Long dataArriveTimeDigital;
|
||||
|
||||
// Constructors
|
||||
|
||||
/** default constructor */
|
||||
public DiSysteminfo() {
|
||||
}
|
||||
|
||||
/** minimal constructor */
|
||||
public DiSysteminfo(Long detectionInfoId) {
|
||||
this.detectionInfoId = detectionInfoId;
|
||||
}
|
||||
|
||||
/** full constructor */
|
||||
public DiSysteminfo(Long detectionInfoId,
|
||||
String hostName, String operateSystem, Long cpuCnt, Long cpuMhz,
|
||||
Double memorySize, Double swapSize, Double diskSize, Long netCnt,
|
||||
Date dataCheckTime, Date dataArriveTime, Long dataCheckTimeDigital,
|
||||
Long dataArriveTimeDigital) {
|
||||
this.detectionInfoId = detectionInfoId;
|
||||
this.hostName = hostName;
|
||||
this.operateSystem = operateSystem;
|
||||
this.cpuCnt = cpuCnt;
|
||||
this.cpuMhz = cpuMhz;
|
||||
this.memorySize = memorySize;
|
||||
this.swapSize = swapSize;
|
||||
this.diskSize = diskSize;
|
||||
this.netCnt = netCnt;
|
||||
this.dataCheckTime = dataCheckTime;
|
||||
this.dataArriveTime = dataArriveTime;
|
||||
this.dataCheckTimeDigital = dataCheckTimeDigital;
|
||||
this.dataArriveTimeDigital = dataArriveTimeDigital;
|
||||
}
|
||||
|
||||
// Property accessors
|
||||
|
||||
public Long getDetectionInfoId() {
|
||||
return this.detectionInfoId;
|
||||
}
|
||||
|
||||
public void setDetectionInfoId(Long detectionInfoId) {
|
||||
this.detectionInfoId = detectionInfoId;
|
||||
}
|
||||
public String getHostName() {
|
||||
return this.hostName;
|
||||
}
|
||||
|
||||
public void setHostName(String hostName) {
|
||||
this.hostName = hostName;
|
||||
}
|
||||
|
||||
public String getOperateSystem() {
|
||||
return this.operateSystem;
|
||||
}
|
||||
|
||||
public void setOperateSystem(String operateSystem) {
|
||||
this.operateSystem = operateSystem;
|
||||
}
|
||||
|
||||
public Long getCpuCnt() {
|
||||
return this.cpuCnt;
|
||||
}
|
||||
|
||||
public void setCpuCnt(Long cpuCnt) {
|
||||
this.cpuCnt = cpuCnt;
|
||||
}
|
||||
|
||||
public Long getCpuMhz() {
|
||||
return this.cpuMhz;
|
||||
}
|
||||
|
||||
public void setCpuMhz(Long cpuMhz) {
|
||||
this.cpuMhz = cpuMhz;
|
||||
}
|
||||
|
||||
|
||||
public Double getMemorySize() {
|
||||
return memorySize;
|
||||
}
|
||||
|
||||
public void setMemorySize(Double memorySize) {
|
||||
this.memorySize = memorySize;
|
||||
}
|
||||
|
||||
public Double getSwapSize() {
|
||||
return swapSize;
|
||||
}
|
||||
|
||||
public void setSwapSize(Double swapSize) {
|
||||
this.swapSize = swapSize;
|
||||
}
|
||||
|
||||
public Double getDiskSize() {
|
||||
return diskSize;
|
||||
}
|
||||
|
||||
public void setDiskSize(Double diskSize) {
|
||||
this.diskSize = diskSize;
|
||||
}
|
||||
|
||||
public Long getNetCnt() {
|
||||
return this.netCnt;
|
||||
}
|
||||
|
||||
public void setNetCnt(Long netCnt) {
|
||||
this.netCnt = netCnt;
|
||||
}
|
||||
|
||||
public Date getDataCheckTime() {
|
||||
return this.dataCheckTime;
|
||||
}
|
||||
|
||||
public void setDataCheckTime(Date dataCheckTime) {
|
||||
this.dataCheckTime = dataCheckTime;
|
||||
}
|
||||
|
||||
public Date getDataArriveTime() {
|
||||
return this.dataArriveTime;
|
||||
}
|
||||
|
||||
public void setDataArriveTime(Date dataArriveTime) {
|
||||
this.dataArriveTime = dataArriveTime;
|
||||
}
|
||||
|
||||
public Long getDataCheckTimeDigital() {
|
||||
return this.dataCheckTimeDigital;
|
||||
}
|
||||
|
||||
public void setDataCheckTimeDigital(Long dataCheckTimeDigital) {
|
||||
this.dataCheckTimeDigital = dataCheckTimeDigital;
|
||||
}
|
||||
|
||||
public Long getDataArriveTimeDigital() {
|
||||
return this.dataArriveTimeDigital;
|
||||
}
|
||||
|
||||
public void setDataArriveTimeDigital(Long dataArriveTimeDigital) {
|
||||
this.dataArriveTimeDigital = dataArriveTimeDigital;
|
||||
}
|
||||
|
||||
public String getDataCheckTimeStr() {
|
||||
return dataCheckTimeStr;
|
||||
}
|
||||
|
||||
public void setDataCheckTimeStr(String dataCheckTimeStr) {
|
||||
this.dataCheckTimeStr = dataCheckTimeStr;
|
||||
}
|
||||
|
||||
public String getDataArriveTimeStr() {
|
||||
return dataArriveTimeStr;
|
||||
}
|
||||
|
||||
public void setDataArriveTimeStr(String dataArriveTimeStr) {
|
||||
this.dataArriveTimeStr = dataArriveTimeStr;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
64
src/nis/nms/bean/DiSysteminfoDisk.java
Normal file
64
src/nis/nms/bean/DiSysteminfoDisk.java
Normal file
@@ -0,0 +1,64 @@
|
||||
package nis.nms.bean;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* DiSysteminfoDisk entity.
|
||||
*
|
||||
* @author MyEclipse Persistence Tools
|
||||
*/
|
||||
|
||||
public class DiSysteminfoDisk implements java.io.Serializable {
|
||||
|
||||
// Fields
|
||||
private Long detectionInfoId;
|
||||
private String diskRang;
|
||||
private Double diskSize;
|
||||
private Date dataCheckTime;
|
||||
private Date dataArriveTime;
|
||||
private Long dataCheckTimeDigital;
|
||||
private Long dataArriveTimeDigital;
|
||||
public Long getDetectionInfoId() {
|
||||
return detectionInfoId;
|
||||
}
|
||||
public void setDetectionInfoId(Long detectionInfoId) {
|
||||
this.detectionInfoId = detectionInfoId;
|
||||
}
|
||||
public String getDiskRang() {
|
||||
return diskRang;
|
||||
}
|
||||
public void setDiskRang(String diskRang) {
|
||||
this.diskRang = diskRang;
|
||||
}
|
||||
public Double getDiskSize() {
|
||||
return diskSize;
|
||||
}
|
||||
public void setDiskSize(Double diskSize) {
|
||||
this.diskSize = diskSize;
|
||||
}
|
||||
public Date getDataCheckTime() {
|
||||
return dataCheckTime;
|
||||
}
|
||||
public void setDataCheckTime(Date dataCheckTime) {
|
||||
this.dataCheckTime = dataCheckTime;
|
||||
}
|
||||
public Date getDataArriveTime() {
|
||||
return dataArriveTime;
|
||||
}
|
||||
public void setDataArriveTime(Date dataArriveTime) {
|
||||
this.dataArriveTime = dataArriveTime;
|
||||
}
|
||||
public Long getDataCheckTimeDigital() {
|
||||
return dataCheckTimeDigital;
|
||||
}
|
||||
public void setDataCheckTimeDigital(Long dataCheckTimeDigital) {
|
||||
this.dataCheckTimeDigital = dataCheckTimeDigital;
|
||||
}
|
||||
public Long getDataArriveTimeDigital() {
|
||||
return dataArriveTimeDigital;
|
||||
}
|
||||
public void setDataArriveTimeDigital(Long dataArriveTimeDigital) {
|
||||
this.dataArriveTimeDigital = dataArriveTimeDigital;
|
||||
}
|
||||
|
||||
}
|
||||
100
src/nis/nms/bean/DiSysteminfoNet.java
Normal file
100
src/nis/nms/bean/DiSysteminfoNet.java
Normal file
@@ -0,0 +1,100 @@
|
||||
package nis.nms.bean;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* DiSysteminfoNet entity.
|
||||
*
|
||||
* @author MyEclipse Persistence Tools
|
||||
*/
|
||||
|
||||
public class DiSysteminfoNet implements java.io.Serializable {
|
||||
|
||||
// Fields
|
||||
|
||||
private Long detectionInfoId;
|
||||
private String netName;
|
||||
private String netState;
|
||||
private Long netSpeed;
|
||||
private String netIp;
|
||||
private String netSubmask;
|
||||
private String netGateway;
|
||||
private String netMac;
|
||||
private Date dataCheckTime;
|
||||
private Date dataArriveTime;
|
||||
private Long dataCheckTimeDigital;
|
||||
private Long dataArriveTimeDigital;
|
||||
public Long getDetectionInfoId() {
|
||||
return detectionInfoId;
|
||||
}
|
||||
public void setDetectionInfoId(Long detectionInfoId) {
|
||||
this.detectionInfoId = detectionInfoId;
|
||||
}
|
||||
public String getNetName() {
|
||||
return netName;
|
||||
}
|
||||
public void setNetName(String netName) {
|
||||
this.netName = netName;
|
||||
}
|
||||
public String getNetState() {
|
||||
return netState;
|
||||
}
|
||||
public void setNetState(String netState) {
|
||||
this.netState = netState;
|
||||
}
|
||||
public Long getNetSpeed() {
|
||||
return netSpeed;
|
||||
}
|
||||
public void setNetSpeed(Long netSpeed) {
|
||||
this.netSpeed = netSpeed;
|
||||
}
|
||||
public String getNetIp() {
|
||||
return netIp;
|
||||
}
|
||||
public void setNetIp(String netIp) {
|
||||
this.netIp = netIp;
|
||||
}
|
||||
public String getNetSubmask() {
|
||||
return netSubmask;
|
||||
}
|
||||
public void setNetSubmask(String netSubmask) {
|
||||
this.netSubmask = netSubmask;
|
||||
}
|
||||
public String getNetGateway() {
|
||||
return netGateway;
|
||||
}
|
||||
public void setNetGateway(String netGateway) {
|
||||
this.netGateway = netGateway;
|
||||
}
|
||||
public Date getDataCheckTime() {
|
||||
return dataCheckTime;
|
||||
}
|
||||
public void setDataCheckTime(Date dataCheckTime) {
|
||||
this.dataCheckTime = dataCheckTime;
|
||||
}
|
||||
public Date getDataArriveTime() {
|
||||
return dataArriveTime;
|
||||
}
|
||||
public void setDataArriveTime(Date dataArriveTime) {
|
||||
this.dataArriveTime = dataArriveTime;
|
||||
}
|
||||
public Long getDataCheckTimeDigital() {
|
||||
return dataCheckTimeDigital;
|
||||
}
|
||||
public void setDataCheckTimeDigital(Long dataCheckTimeDigital) {
|
||||
this.dataCheckTimeDigital = dataCheckTimeDigital;
|
||||
}
|
||||
public Long getDataArriveTimeDigital() {
|
||||
return dataArriveTimeDigital;
|
||||
}
|
||||
public void setDataArriveTimeDigital(Long dataArriveTimeDigital) {
|
||||
this.dataArriveTimeDigital = dataArriveTimeDigital;
|
||||
}
|
||||
public String getNetMac() {
|
||||
return netMac;
|
||||
}
|
||||
public void setNetMac(String netMac) {
|
||||
this.netMac = netMac;
|
||||
}
|
||||
|
||||
}
|
||||
98
src/nis/nms/bean/DxKeySensitiveInfo.java
Normal file
98
src/nis/nms/bean/DxKeySensitiveInfo.java
Normal file
@@ -0,0 +1,98 @@
|
||||
package nis.nms.bean;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class DxKeySensitiveInfo {
|
||||
private Long id;
|
||||
private String url;
|
||||
private String title;
|
||||
private String summary;
|
||||
private String boardName;
|
||||
private String interval;
|
||||
private Date publicTime;
|
||||
private String ip;
|
||||
private String shapShotPath;
|
||||
private Long shapShotOffset;
|
||||
private Long shspShotLen;
|
||||
|
||||
public DxKeySensitiveInfo(Long id,String url, String title, String boardName,
|
||||
Date publicTime, String ip, String shapShotPath,
|
||||
Long shapShotOffset, Long shspShotLen) {
|
||||
this.id = id;
|
||||
this.url = url;
|
||||
this.title = title;
|
||||
this.boardName = boardName;
|
||||
this.publicTime = publicTime;
|
||||
this.ip = ip;
|
||||
this.shapShotPath = shapShotPath;
|
||||
this.shapShotOffset = shapShotOffset;
|
||||
this.shspShotLen = shspShotLen;
|
||||
}
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
public String getSummary() {
|
||||
return summary;
|
||||
}
|
||||
public void setSummary(String summary) {
|
||||
this.summary = summary;
|
||||
}
|
||||
public String getInterval() {
|
||||
return interval;
|
||||
}
|
||||
public void setInterval(String interval) {
|
||||
this.interval = interval;
|
||||
}
|
||||
public Date getPublicTime() {
|
||||
return publicTime;
|
||||
}
|
||||
public void setPublicTime(Date publicTime) {
|
||||
this.publicTime = publicTime;
|
||||
}
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
public void setIp(String ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
public String getShapShotPath() {
|
||||
return shapShotPath;
|
||||
}
|
||||
public void setShapShotPath(String shapShotPath) {
|
||||
this.shapShotPath = shapShotPath;
|
||||
}
|
||||
public Long getShapShotOffset() {
|
||||
return shapShotOffset;
|
||||
}
|
||||
public void setShapShotOffset(Long shapShotOffset) {
|
||||
this.shapShotOffset = shapShotOffset;
|
||||
}
|
||||
public Long getShspShotLen() {
|
||||
return shspShotLen;
|
||||
}
|
||||
public void setShspShotLen(Long shspShotLen) {
|
||||
this.shspShotLen = shspShotLen;
|
||||
}
|
||||
public String getBoardName() {
|
||||
return boardName;
|
||||
}
|
||||
public void setBoardName(String boardName) {
|
||||
this.boardName = boardName;
|
||||
}
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
}
|
||||
100
src/nis/nms/bean/EmailInfo.java
Normal file
100
src/nis/nms/bean/EmailInfo.java
Normal file
@@ -0,0 +1,100 @@
|
||||
package nis.nms.bean;
|
||||
|
||||
|
||||
public class EmailInfo {
|
||||
private Long id; //接收地址
|
||||
private String toAddress; //接收地址
|
||||
private Integer actionType; //事件类型 值10监测恢复,11监测信息异常,13:监测结果超时,20主动告警恢复,21主动告警异常,31结果失败,32任务状态变更,40系统运行异常恢复,41系统运行异常
|
||||
private String actionDesc;
|
||||
private String actionIp; //事件地点
|
||||
private String actionDate; //事件时间
|
||||
private String content; //事件内容及结果
|
||||
private Integer sendFlag; //0未发送 1已发送
|
||||
private Integer sendLevel; //0紧急 1非紧急
|
||||
public EmailInfo (){
|
||||
|
||||
}
|
||||
|
||||
public EmailInfo (EmailInfo info){
|
||||
this.toAddress = info.getToAddress();
|
||||
this.actionType = info.getActionType();
|
||||
this.actionDesc = info.getActionDesc();
|
||||
this.actionIp = info.getActionIp();
|
||||
this.actionDate = info.getActionDate();
|
||||
this.content = info.getContent();
|
||||
this.sendFlag = info.getSendFlag();
|
||||
this.sendLevel = info.getSendLevel();
|
||||
}
|
||||
|
||||
public EmailInfo (Integer actionType,String actionDesc,String actionIp,String actionDate,String content,Integer sendFlag,Integer sendLevel){
|
||||
this.actionType = actionType;
|
||||
this.actionDesc = actionDesc;
|
||||
this.actionIp = actionIp;
|
||||
this.actionDate = actionDate;
|
||||
this.content = content;
|
||||
this.sendFlag = sendFlag;
|
||||
this.sendLevel = sendLevel;
|
||||
}
|
||||
|
||||
public String getToAddress() {
|
||||
return toAddress;
|
||||
}
|
||||
public void setToAddress(String toAddress) {
|
||||
this.toAddress = toAddress;
|
||||
}
|
||||
|
||||
public Integer getActionType() {
|
||||
return actionType;
|
||||
}
|
||||
public void setActionType(Integer actionType) {
|
||||
this.actionType = actionType;
|
||||
}
|
||||
public String getActionIp() {
|
||||
return actionIp;
|
||||
}
|
||||
public void setActionIp(String actionIp) {
|
||||
this.actionIp = actionIp;
|
||||
}
|
||||
public String getActionDate() {
|
||||
return actionDate;
|
||||
}
|
||||
public void setActionDate(String actionDate) {
|
||||
this.actionDate = actionDate;
|
||||
}
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
public Integer getSendFlag() {
|
||||
return sendFlag;
|
||||
}
|
||||
public void setSendFlag(Integer sendFlag) {
|
||||
this.sendFlag = sendFlag;
|
||||
}
|
||||
public String getActionDesc() {
|
||||
return actionDesc;
|
||||
}
|
||||
public void setActionDesc(String actionDesc) {
|
||||
this.actionDesc = actionDesc;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getSendLevel() {
|
||||
return sendLevel;
|
||||
}
|
||||
|
||||
public void setSendLevel(Integer sendLevel) {
|
||||
this.sendLevel = sendLevel;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
36
src/nis/nms/bean/EmailModel.java
Normal file
36
src/nis/nms/bean/EmailModel.java
Normal file
@@ -0,0 +1,36 @@
|
||||
package nis.nms.bean;
|
||||
|
||||
public class EmailModel {
|
||||
private String toAddress; //接收地址
|
||||
private String subjectDesc; //主题
|
||||
private String content; //邮件内容
|
||||
private Integer sendFlag; //0未发送 1已发送 2即时发送
|
||||
|
||||
|
||||
public String getToAddress() {
|
||||
return toAddress;
|
||||
}
|
||||
public void setToAddress(String toAddress) {
|
||||
this.toAddress = toAddress;
|
||||
}
|
||||
public String getSubjectDesc() {
|
||||
return subjectDesc;
|
||||
}
|
||||
public void setSubjectDesc(String subjectDesc) {
|
||||
this.subjectDesc = subjectDesc;
|
||||
}
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
public Integer getSendFlag() {
|
||||
return sendFlag;
|
||||
}
|
||||
public void setSendFlag(Integer sendFlag) {
|
||||
this.sendFlag = sendFlag;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user