Agenda: cli-transcript.txt

File cli-transcript.txt, 5.6 KB (added by b.candler, 6 years ago)
Line 
11. Adding device
2
3$ sudo ./add_device.php
4
5[...]
6
7$ sudo ./add_device.php  --list-host-templates
8Valid Host Templates: (id, name)
90       None
101       Generic SNMP-enabled Host
113       ucd/net SNMP Host
124       Karlnet Wireless Bridge
135       Cisco Router
146       Netware 4/5 Server
157       Windows 2000/XP Host
168       Local Linux Machine
17
18
19$ sudo ./add_device.php --description="rtr7.ws.nsrc.org" --ip=10.10.7.254 --template=5 --avail=snmp --version=2 --community=NetManage
20
21Adding rtr7.ws.nsrc.org (10.10.7.254) as "Cisco Router" using SNMP v2 with community "NetManage"
22Success - new device-id: (2)
23
24$ for router in 1 2 3 4 5 6
25> do
26> sudo ./add_device.php --description="rtr$router.ws.nsrc.org" --ip=10.10.$router.254 --template=5 --avail=snmp --version=2 --community=NetManage
27> done
28
29
302. Adding graphs
31
32$ sudo ./add_graphs.php
33
34[...]
35
36List Options:
37    --list-hosts
38    --list-graph-templates [--host-template-id=[ID]]
39    --list-input-fields --graph-template-id=[ID]
40    --list-snmp-queries
41    --list-query-types  --snmp-query-id [ID]
42    --list-snmp-fields  --host-id=[ID] [--snmp-query-id=[ID]]
43    --list-snmp-values  --host-id=[ID] [--snmp-query-id=[ID]] --snmp-field=[Field]
44
45'cg' graphs are for things like CPU temp/fan speed, while
46'ds' graphs are for data-source based graphs (interface stats etc.)
47
48$ sudo ./add_graphs.php --list-hosts
49
50Known Hosts: (id, hostname, template, description)
511       127.0.0.1       8       Localhost
522       10.10.7.254     5       rtr7.ws.nsrc.org
53
54$ sudo ./add_graphs.php --list-graph-templates
55
56Known Graph Templates:(id, name)
572       Interface - Traffic (bits/sec)
583       ucd/net - Available Disk Space
594       ucd/net - CPU Usage
605       Karlnet - Wireless Levels
616       Karlnet - Wireless Transmissions
627       Unix - Ping Latency
638       Unix - Processes
649       Unix - Load Average
6510      Unix - Logged in Users
6611      ucd/net - Load Average
6712      Linux - Memory Usage
6813      ucd/net - Memory Usage
6914      Netware - File System Cache
7015      Netware - CPU Utilization
7116      Netware - File System Activity
7217      Netware - Logged In Users
7318      Cisco - CPU Usage
7419      Netware - Volume Information
7520      Netware - Directory Information
7621      Unix - Available Disk Space
7722      Interface - Errors/Discards
7823      Interface - Unicast Packets
7924      Interface - Non-Unicast Packets
8025      Interface - Traffic (bytes/sec)
8126      Host MIB - Available Disk Space
8227      Host MIB - CPU Utilization
8328      Host MIB - Logged in Users
8429      Host MIB - Processes
8530      Netware - Open Files
8631      Interface - Traffic (bits/sec, 95th Percentile)
8732      Interface - Traffic (bits/sec, Total Bandwidth)
8833      Interface - Traffic (bytes/sec, Total Bandwidth)
8934      SNMP - Generic OID Template
90
91
92$ sudo ./add_graphs.php --host-id=2 --list-snmp-queries
93Known SNMP Queries:(id, name)
941       SNMP - Interface Statistics
952       ucd/net -  Get Monitored Partitions
963       Karlnet - Wireless Bridge Statistics
974       Netware - Get Available Volumes
986       Unix - Get Mounted Partitions
997       Netware - Get Processor Information
1008       SNMP - Get Mounted Partitions
1019       SNMP - Get Processor Information
102
103
104$ sudo ./add_graphs.php --snmp-query-id=1 --list-query-types
105
106Known SNMP Query Types: (id, name)
1072       In/Out Errors/Discarded Packets
1083       In/Out Non-Unicast Packets
1094       In/Out Unicast Packets
1109       In/Out Bytes (64-bit Counters)
11113      In/Out Bits
11214      In/Out Bits (64-bit Counters)
11316      In/Out Bytes
11420      In/Out Bits with 95th Percentile
11521      In/Out Bits with Total Bandwidth
11622      In/Out Bytes with Total Bandwidth
117
118
119$ sudo ./add_graphs.php --list-snmp-fields --host-id=2
120Known SNMP Fields for host-id 2: (name)
121ifAlias
122ifDescr
123ifHighSpeed
124ifHwAddr
125ifIndex
126ifIP
127ifName
128ifOperStatus
129ifSpeed
130ifType
131
132
133$ sudo ./add_graphs.php --list-snmp-values --host-id=2 --snmp-field=ifType
134
135Known values for ifType for host 2: (name)
136ethernetCsmacd(6)
137other(1)
138
139$ sudo ./add_graphs.php --host-id=2 --snmp-query-id=1  --snmp-query-type-id=14 --snmp-field=ifType --snmp-value=6 --graph-template-id=2 --graph-type=ds
140Graph Added - graph-id: (5) - data-source-ids: (8, 8)
141Graph Added - graph-id: (6) - data-source-ids: (9, 9)
142
143$ sudo ./add_graphs.php --list-hosts
144Known Hosts: (id, hostname, template, description)
1451       127.0.0.1       8       Localhost
1462       10.10.7.254     5       rtr7.ws.nsrc.org
1473       10.10.1.254     5       rtr1.ws.nsrc.org
1484       10.10.2.254     5       rtr2.ws.nsrc.org
1495       10.10.3.254     5       rtr3.ws.nsrc.org
1506       10.10.4.254     5       rtr4.ws.nsrc.org
1517       10.10.5.254     5       rtr5.ws.nsrc.org
1528       10.10.6.254     5       rtr6.ws.nsrc.org
153
154
155$ for router in 3 4 5 6 7 8
156> do
157> sudo ./add_graphs.php --host-id=$router --snmp-query-id=1  --snmp-query-type-id=14 --snmp-field=ifType --snmp-value=6 --graph-template-id=2 --graph-type=ds
158> done
159Graph Added - graph-id: (7) - data-source-ids: (10, 10)
160Graph Added - graph-id: (8) - data-source-ids: (11, 11)
161Graph Added - graph-id: (9) - data-source-ids: (12, 12)
162Graph Added - graph-id: (10) - data-source-ids: (13, 13)
163Graph Added - graph-id: (11) - data-source-ids: (14, 14)
164Graph Added - graph-id: (12) - data-source-ids: (15, 15)
165Graph Added - graph-id: (13) - data-source-ids: (16, 16)
166Graph Added - graph-id: (14) - data-source-ids: (17, 17)
167Graph Added - graph-id: (15) - data-source-ids: (18, 18)
168Graph Added - graph-id: (16) - data-source-ids: (19, 19)
169Graph Added - graph-id: (17) - data-source-ids: (20, 20)
170Graph Added - graph-id: (18) - data-source-ids: (21, 21)
171
172
1733. Trees
174
175$ sudo ./add_tree.php
176
177[...]
178
179$ sudo ./add_tree.php --list-trees
180Known Trees:
181id      sort method                     name
1821       Manual Ordering (No Sorting)    Default Tree
183
184
185$ sudo ./add_tree.php --list-trees
186Known Trees:
187id      sort method                     name
1881       Manual Ordering (No Sorting)    Default Tree
1892       Manual Ordering (No Sorting)    NETMGMT routers
190
191
192$ sudo ./add_tree.php --host-id=2 --tree-id=2 --node-type=host --type=node
193Added Node node-id: (8)
194
195$ for router in 3 4 5 6 7 8
196> do
197> sudo ./add_tree.php --host-id=$router --tree-id=2 --node-type=host --type=node
198> done
199Added Node node-id: (9)
200Added Node node-id: (10)
201Added Node node-id: (11)
202Added Node node-id: (12)
203Added Node node-id: (13)
204Added Node node-id: (14)