1 | 1. Adding device |
---|
2 | |
---|
3 | $ sudo ./add_device.php |
---|
4 | |
---|
5 | [...] |
---|
6 | |
---|
7 | $ sudo ./add_device.php --list-host-templates |
---|
8 | Valid Host Templates: (id, name) |
---|
9 | 0 None |
---|
10 | 1 Generic SNMP-enabled Host |
---|
11 | 3 ucd/net SNMP Host |
---|
12 | 4 Karlnet Wireless Bridge |
---|
13 | 5 Cisco Router |
---|
14 | 6 Netware 4/5 Server |
---|
15 | 7 Windows 2000/XP Host |
---|
16 | 8 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 | |
---|
21 | Adding rtr7.ws.nsrc.org (10.10.7.254) as "Cisco Router" using SNMP v2 with community "NetManage" |
---|
22 | Success - 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 | |
---|
30 | 2. Adding graphs |
---|
31 | |
---|
32 | $ sudo ./add_graphs.php |
---|
33 | |
---|
34 | [...] |
---|
35 | |
---|
36 | List 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 | |
---|
50 | Known Hosts: (id, hostname, template, description) |
---|
51 | 1 127.0.0.1 8 Localhost |
---|
52 | 2 10.10.7.254 5 rtr7.ws.nsrc.org |
---|
53 | |
---|
54 | $ sudo ./add_graphs.php --list-graph-templates |
---|
55 | |
---|
56 | Known Graph Templates:(id, name) |
---|
57 | 2 Interface - Traffic (bits/sec) |
---|
58 | 3 ucd/net - Available Disk Space |
---|
59 | 4 ucd/net - CPU Usage |
---|
60 | 5 Karlnet - Wireless Levels |
---|
61 | 6 Karlnet - Wireless Transmissions |
---|
62 | 7 Unix - Ping Latency |
---|
63 | 8 Unix - Processes |
---|
64 | 9 Unix - Load Average |
---|
65 | 10 Unix - Logged in Users |
---|
66 | 11 ucd/net - Load Average |
---|
67 | 12 Linux - Memory Usage |
---|
68 | 13 ucd/net - Memory Usage |
---|
69 | 14 Netware - File System Cache |
---|
70 | 15 Netware - CPU Utilization |
---|
71 | 16 Netware - File System Activity |
---|
72 | 17 Netware - Logged In Users |
---|
73 | 18 Cisco - CPU Usage |
---|
74 | 19 Netware - Volume Information |
---|
75 | 20 Netware - Directory Information |
---|
76 | 21 Unix - Available Disk Space |
---|
77 | 22 Interface - Errors/Discards |
---|
78 | 23 Interface - Unicast Packets |
---|
79 | 24 Interface - Non-Unicast Packets |
---|
80 | 25 Interface - Traffic (bytes/sec) |
---|
81 | 26 Host MIB - Available Disk Space |
---|
82 | 27 Host MIB - CPU Utilization |
---|
83 | 28 Host MIB - Logged in Users |
---|
84 | 29 Host MIB - Processes |
---|
85 | 30 Netware - Open Files |
---|
86 | 31 Interface - Traffic (bits/sec, 95th Percentile) |
---|
87 | 32 Interface - Traffic (bits/sec, Total Bandwidth) |
---|
88 | 33 Interface - Traffic (bytes/sec, Total Bandwidth) |
---|
89 | 34 SNMP - Generic OID Template |
---|
90 | |
---|
91 | |
---|
92 | $ sudo ./add_graphs.php --host-id=2 --list-snmp-queries |
---|
93 | Known SNMP Queries:(id, name) |
---|
94 | 1 SNMP - Interface Statistics |
---|
95 | 2 ucd/net - Get Monitored Partitions |
---|
96 | 3 Karlnet - Wireless Bridge Statistics |
---|
97 | 4 Netware - Get Available Volumes |
---|
98 | 6 Unix - Get Mounted Partitions |
---|
99 | 7 Netware - Get Processor Information |
---|
100 | 8 SNMP - Get Mounted Partitions |
---|
101 | 9 SNMP - Get Processor Information |
---|
102 | |
---|
103 | |
---|
104 | $ sudo ./add_graphs.php --snmp-query-id=1 --list-query-types |
---|
105 | |
---|
106 | Known SNMP Query Types: (id, name) |
---|
107 | 2 In/Out Errors/Discarded Packets |
---|
108 | 3 In/Out Non-Unicast Packets |
---|
109 | 4 In/Out Unicast Packets |
---|
110 | 9 In/Out Bytes (64-bit Counters) |
---|
111 | 13 In/Out Bits |
---|
112 | 14 In/Out Bits (64-bit Counters) |
---|
113 | 16 In/Out Bytes |
---|
114 | 20 In/Out Bits with 95th Percentile |
---|
115 | 21 In/Out Bits with Total Bandwidth |
---|
116 | 22 In/Out Bytes with Total Bandwidth |
---|
117 | |
---|
118 | |
---|
119 | $ sudo ./add_graphs.php --list-snmp-fields --host-id=2 |
---|
120 | Known SNMP Fields for host-id 2: (name) |
---|
121 | ifAlias |
---|
122 | ifDescr |
---|
123 | ifHighSpeed |
---|
124 | ifHwAddr |
---|
125 | ifIndex |
---|
126 | ifIP |
---|
127 | ifName |
---|
128 | ifOperStatus |
---|
129 | ifSpeed |
---|
130 | ifType |
---|
131 | |
---|
132 | |
---|
133 | $ sudo ./add_graphs.php --list-snmp-values --host-id=2 --snmp-field=ifType |
---|
134 | |
---|
135 | Known values for ifType for host 2: (name) |
---|
136 | ethernetCsmacd(6) |
---|
137 | other(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 |
---|
140 | Graph Added - graph-id: (5) - data-source-ids: (8, 8) |
---|
141 | Graph Added - graph-id: (6) - data-source-ids: (9, 9) |
---|
142 | |
---|
143 | $ sudo ./add_graphs.php --list-hosts |
---|
144 | Known Hosts: (id, hostname, template, description) |
---|
145 | 1 127.0.0.1 8 Localhost |
---|
146 | 2 10.10.7.254 5 rtr7.ws.nsrc.org |
---|
147 | 3 10.10.1.254 5 rtr1.ws.nsrc.org |
---|
148 | 4 10.10.2.254 5 rtr2.ws.nsrc.org |
---|
149 | 5 10.10.3.254 5 rtr3.ws.nsrc.org |
---|
150 | 6 10.10.4.254 5 rtr4.ws.nsrc.org |
---|
151 | 7 10.10.5.254 5 rtr5.ws.nsrc.org |
---|
152 | 8 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 |
---|
159 | Graph Added - graph-id: (7) - data-source-ids: (10, 10) |
---|
160 | Graph Added - graph-id: (8) - data-source-ids: (11, 11) |
---|
161 | Graph Added - graph-id: (9) - data-source-ids: (12, 12) |
---|
162 | Graph Added - graph-id: (10) - data-source-ids: (13, 13) |
---|
163 | Graph Added - graph-id: (11) - data-source-ids: (14, 14) |
---|
164 | Graph Added - graph-id: (12) - data-source-ids: (15, 15) |
---|
165 | Graph Added - graph-id: (13) - data-source-ids: (16, 16) |
---|
166 | Graph Added - graph-id: (14) - data-source-ids: (17, 17) |
---|
167 | Graph Added - graph-id: (15) - data-source-ids: (18, 18) |
---|
168 | Graph Added - graph-id: (16) - data-source-ids: (19, 19) |
---|
169 | Graph Added - graph-id: (17) - data-source-ids: (20, 20) |
---|
170 | Graph Added - graph-id: (18) - data-source-ids: (21, 21) |
---|
171 | |
---|
172 | |
---|
173 | 3. Trees |
---|
174 | |
---|
175 | $ sudo ./add_tree.php |
---|
176 | |
---|
177 | [...] |
---|
178 | |
---|
179 | $ sudo ./add_tree.php --list-trees |
---|
180 | Known Trees: |
---|
181 | id sort method name |
---|
182 | 1 Manual Ordering (No Sorting) Default Tree |
---|
183 | |
---|
184 | |
---|
185 | $ sudo ./add_tree.php --list-trees |
---|
186 | Known Trees: |
---|
187 | id sort method name |
---|
188 | 1 Manual Ordering (No Sorting) Default Tree |
---|
189 | 2 Manual Ordering (No Sorting) NETMGMT routers |
---|
190 | |
---|
191 | |
---|
192 | $ sudo ./add_tree.php --host-id=2 --tree-id=2 --node-type=host --type=node |
---|
193 | Added 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 |
---|
199 | Added Node node-id: (9) |
---|
200 | Added Node node-id: (10) |
---|
201 | Added Node node-id: (11) |
---|
202 | Added Node node-id: (12) |
---|
203 | Added Node node-id: (13) |
---|
204 | Added Node node-id: (14) |
---|