Open outsmain opened 10 years ago
เปลี่ยนสีให้เป็นสีฟ้า เพื่อให้เป็น sub group ที่ไม่มี key และ value ครับ
เก็บใส่ array เสร็จแล้วครับ ไม่มี table ที่จะต้องเก็บครับ
ขอบคุณครับ
ผมมีคำถามดังนี้ครับ
ขอบคุณครับ
3.เปลี่ยน NE_LIST เป็น ATTRIB_LIST ทั้งหมดครับ ผมแก้ให้ใน issue แล้ว
Interface
ครั้งที่ 2 ครับ
แต่ NE_RUN_ATTRIB.PARRENT_GROUP_ID จะมาจาก ATTRIB_LIST.ID WHERE NAME = "Network Domains Associated" ถูกแล้วครับ ซึ่งไม่เกี่ยวกับว่า entry_id จะเป็นเท่าไร
ตรงอื่นคิดว่าได้หมดแล้วครับ แต่ยังติดตรงข้อ 1 ครับ คือผม
SELECT b.brand, b.model,b.sw_ver,a.* FROM NE_RUN_DATA a, NE_LIST b WHERE a.UPDATE_DATE BETWEEN '2013-06-06 00:00:00' AND '2013-06-06 23:00:00' AND b.ip_addr = a.IP_ADDR
ผมจะได้ NE_LIST.brand, NE_LIST.model,NE_LIST.sw_ver ออกมาเป็นงี้ครับ
brand | model | sw_ver |
ALU | NULL | NULL |
เสร็จแล้วผมเอาไปหาใน ATTRIB_TYPE ได้ผลออกมาดังนี้
ID | BRAND | MODEL | VERSION |
6 | ALU | ALL | ALL |
เสร็จแล้วผมจะต้องเอา ID, BRAND, MODEL, VERSION ของ table ATTRIB_TYPE ไปทำอะไรครับ
" เมื่อได้ brand, model, version แล้ว ต้องเอาไป query ATTRIB_LIST join กับ ATTRIB_TYPE สำหรับ ip_addr นั้นเพือเตรียมเก็บไว้หลังจาก parse แล้ว ว่ามีค่าใน ATTRIB_TYPE แล้วหรือไม่ ถ้ายังไม่มีก็ต้อง insert เพิ่มลงใน ATTRIB_TYPE โดยให้ type เป็น OTHER "
ATTRIB_TYPE ไม่ต้อง insert ไม่ใช่เหรอครับ
ขอบคุณครับ
ขอโทษครับ แก้ ATTRIB_TYPE เป็น ATTRIB_LIST ครับ
ค่า brand, model, ver ใช้สำหรับนำมาใช้ตอน query ATTRIB_LIST ทึ่ join กับ ATTRIB_TYPE เท่านั้นครับ
หมายความว่า เอา ATTRIB_LIST.ATTRIB_TYPE _ID JOIN ATTRIB_TYPE.ID ใช่มั้ยครับ
ถ้า query ออกมาเจอก็ผ่านไป แต่ถ้าไม่เจอก็ insert ลง ATTRIB_LIST โดยที่ ATTRIB_LIST.ATTRIB_TYPE_ID = ATTRIB_TYPE.ID และ ATTRIB_LIST.NAME = NE_LIST.NAME
หรือเปล่าครับ ขอบคุณครับ
Create a new controller to parse output of command "show router interface detail" using data from NE_RUN_DATA. It has parameters are
It uses this parameters to filter data from a field "NE_RUN_DATA.update_date" and use a field "NE_RUN_DATA.data" as a input for log parser.
Log Type
Interface
File Structures See sample data from "sample/show router interface detail.pdf". This file was separated into 4 parts (tags) are
ATTRIB_TYPE Mapping To mapping attribute type from "ATTRIB_TYPE" to join with "ATTRIB_LIST.attrib_type_id", it must be matched with the same brand, model or version (if specific), or match with "ALL"
ATTRIB_LIST Mapping Before insert a new tag in "ATTRIB_LIST", it must check that the tag is not exist. If found the old one (with the criterion as defined in a section "ATTRIB_TYPE Mapping") then using existing record, otherwise insert a new record as join "ATTRIB_LIST.attrib_type_id" with "ATTRIB_TYPE" where "ATTRIB_TYPE.name" = "OTHER"
Sample ATTRIB_LIST's Attribute Type Mapping
After parse all tags from input text then insert data of each attribute to "NE_RUN_ATTRIB" using these data are:
and look-up query are:
Group Mapping