m1ke פורסם 2011 באפריל 10 Share פורסם 2011 באפריל 10 זקוק להסבר איך לכתוב נכון Data Query (XML) עבור פלט snmp לא הכי סטנדרטי בעולם..לדוגמא הנה שני פלטים של snmpwalksnmpwalk -v 1 -c public 172.16.100.254 .1.3.6.1.4.1.2636.3.1.13.1.5SNMPv2-SMI::enterprises.2636.3.1.13.1.5.1.1.0.0 = STRING: "node0 midplane"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.1.2.0.0 = STRING: "node1 midplane"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.2.1.0.0 = STRING: "node0 PEM 0"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.2.3.0.0 = STRING: "node1 PEM 0"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.4.1.0.0 = STRING: "node0 Fan Tray"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.4.1.1.0 = STRING: "node0 Fan 1"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.4.1.2.0 = STRING: "node0 Fan 2"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.4.1.3.0 = STRING: "node0 Fan 3"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.4.1.4.0 = STRING: "node0 Fan 4"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.4.2.0.0 = STRING: "node1 Fan Tray"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.4.2.1.0 = STRING: "node1 Fan 1"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.4.2.2.0 = STRING: "node1 Fan 2"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.4.2.3.0 = STRING: "node1 Fan 3"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.4.2.4.0 = STRING: "node1 Fan 4"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.7.1.0.0 = STRING: "node0 FPC: SRX3k SFB 12GE @ 0/*/*"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.7.2.0.0 = STRING: "node0 FPC: SRX3k SPC @ 1/*/*"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.7.3.0.0 = STRING: "node0 FPC: SRX3k SPC @ 2/*/*"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.7.6.0.0 = STRING: "node0 FPC: SRX3k NPC @ 5/*/*"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.7.9.0.0 = STRING: "node1 FPC: SRX3k SFB 12GE @ 0/*/*"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.7.10.0.0 = STRING: "node1 FPC: SRX3k SPC @ 1/*/*"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.7.11.0.0 = STRING: "node1 FPC: SRX3k SPC @ 2/*/*"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.7.14.0.0 = STRING: "node1 FPC: SRX3k NPC @ 5/*/*"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.8.1.1.0 = STRING: "node0 PIC: 8x 1GE-TX 4x 1GE-SFP @ 0/0/*"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.8.2.1.0 = STRING: "node0 PIC: SPU Cp-Flow @ 1/0/*"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.8.3.1.0 = STRING: "node0 PIC: SPU Flow @ 2/0/*"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.8.6.1.0 = STRING: "node0 PIC: NPC PIC @ 5/0/*"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.8.9.1.0 = STRING: "node1 PIC: 8x 1GE-TX 4x 1GE-SFP @ 0/0/*"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.8.10.1.0 = STRING: "node1 PIC: SPU Cp-Flow @ 1/0/*"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.8.11.1.0 = STRING: "node1 PIC: SPU Flow @ 2/0/*"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.8.14.1.0 = STRING: "node1 PIC: NPC PIC @ 5/0/*"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.9.1.0.0 = STRING: "node0 Routing Engine 0"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.9.3.0.0 = STRING: "node1 Routing Engine 0"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.10.1.1.0 = STRING: "node0 FPM Board"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.10.2.1.0 = STRING: "node1 FPM Board"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.12.1.0.0 = STRING: "node0 CB 0"SNMPv2-SMI::enterprises.2636.3.1.13.1.5.12.3.0.0 = STRING: "node1 CB 0"snmpwalk -v 1 -c public 172.16.100.254 .1.3.6.1.4.1.2636.3.1.13.1.8SNMPv2-SMI::enterprises.2636.3.1.13.1.8.1.1.0.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.1.2.0.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.2.1.0.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.2.3.0.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.4.1.0.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.4.1.1.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.4.1.2.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.4.1.3.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.4.1.4.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.4.2.0.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.4.2.1.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.4.2.2.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.4.2.3.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.4.2.4.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.7.1.0.0 = Gauge32: 12SNMPv2-SMI::enterprises.2636.3.1.13.1.8.7.2.0.0 = Gauge32: 12SNMPv2-SMI::enterprises.2636.3.1.13.1.8.7.3.0.0 = Gauge32: 12SNMPv2-SMI::enterprises.2636.3.1.13.1.8.7.6.0.0 = Gauge32: 12SNMPv2-SMI::enterprises.2636.3.1.13.1.8.7.9.0.0 = Gauge32: 12SNMPv2-SMI::enterprises.2636.3.1.13.1.8.7.10.0.0 = Gauge32: 12SNMPv2-SMI::enterprises.2636.3.1.13.1.8.7.11.0.0 = Gauge32: 12SNMPv2-SMI::enterprises.2636.3.1.13.1.8.7.14.0.0 = Gauge32: 12SNMPv2-SMI::enterprises.2636.3.1.13.1.8.8.1.1.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.8.2.1.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.8.3.1.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.8.6.1.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.8.9.1.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.8.10.1.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.8.11.1.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.8.14.1.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.9.1.0.0 = Gauge32: 41SNMPv2-SMI::enterprises.2636.3.1.13.1.8.9.3.0.0 = Gauge32: 7SNMPv2-SMI::enterprises.2636.3.1.13.1.8.10.1.1.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.10.2.1.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.12.1.0.0 = Gauge32: 0SNMPv2-SMI::enterprises.2636.3.1.13.1.8.12.3.0.0 = Gauge32: 0הפלט הראשון הוא של ה description, השני הוא של ניצול CPU.אני רוצה ליצור data query שבעזרתו אוכל בקלות ליצור גרפים עבור ניצולת cpu ל routing engine של node1 ו-node2. לצערי אני לא ממש מבין איך אני עושה את זה מהdocumentation של cacti. בדוגמאות שלהם האינדקס הוא האיבר האחרון, ואילו פה זה בכלל לא המצב..http://www.cacti.net/downloads/docs/html/snmp_query_xml.htmlhttp://docs.cacti.net/manual:087:3a_advanced_topics.3d_script_data_query_walkthrou gh קישור לתוכן שתף באתרים אחרים More sharing options...
m1ke פורסם 2011 באפריל 12 מחבר Share פורסם 2011 באפריל 12 טוב אולי מתישהו זה יעזור למישהו פההנה ה snmp query שעבד יפה:<query> <name>Get SNMP Juniper CPU</name> <description>Should be used for juniper SRX with more then 1 node</description> <oid_index>.1.3.6.1.4.1.2636.3.1.13.1.1.9</oid_index> <oid_index_parse>OID/REGEXP:.*\.([0-9]{1,3}\.0\.0)$</oid_index_parse> <index_order_type>numeric</index_order_type> <index_title_format>|chosen_order_field|</index_title_format> <fields> <jIndex> <name>Index</name> <method>walk</method> <source>OID/REGEXP:.*\.([0-9]{1,3}\.0\.0)$</source> <direction>input</direction> <oid>.1.3.6.1.4.1.2636.3.1.13.1.1.9</oid> </jIndex> <jDescription> <name>Description</name> <method>walk</method> <source>value</source> <direction>input</direction> <oid>.1.3.6.1.4.1.2636.3.1.13.1.5.9</oid> </jDescription> <jCPU> <name>CPU</name> <method>walk</method> <source>value</source> <direction>output</direction> <oid>.1.3.6.1.4.1.2636.3.1.13.1.8.9</oid> </jCPU> <jMemory> <name>Memory</name> <method>walk</method> <source>value</source> <direction>output</direction> <oid>.1.3.6.1.4.1.2636.3.1.13.1.11.9</oid> </jMemory> </fields></query> קישור לתוכן שתף באתרים אחרים More sharing options...
Recommended Posts
ארכיון
דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.