1. Adding device $ sudo ./add_device.php [...] $ sudo ./add_device.php --list-host-templates Valid Host Templates: (id, name) 0 None 1 Generic SNMP-enabled Host 3 ucd/net SNMP Host 4 Karlnet Wireless Bridge 5 Cisco Router 6 Netware 4/5 Server 7 Windows 2000/XP Host 8 Local Linux Machine $ sudo ./add_device.php --description="rtr7.ws.nsrc.org" --ip=10.10.7.254 --template=5 --avail=snmp --version=2 --community=NetManage Adding rtr7.ws.nsrc.org (10.10.7.254) as "Cisco Router" using SNMP v2 with community "NetManage" Success - new device-id: (2) $ for router in 1 2 3 4 5 6 > do > sudo ./add_device.php --description="rtr$router.ws.nsrc.org" --ip=10.10.$router.254 --template=5 --avail=snmp --version=2 --community=NetManage > done 2. Adding graphs $ sudo ./add_graphs.php [...] List Options: --list-hosts --list-graph-templates [--host-template-id=[ID]] --list-input-fields --graph-template-id=[ID] --list-snmp-queries --list-query-types --snmp-query-id [ID] --list-snmp-fields --host-id=[ID] [--snmp-query-id=[ID]] --list-snmp-values --host-id=[ID] [--snmp-query-id=[ID]] --snmp-field=[Field] 'cg' graphs are for things like CPU temp/fan speed, while 'ds' graphs are for data-source based graphs (interface stats etc.) $ sudo ./add_graphs.php --list-hosts Known Hosts: (id, hostname, template, description) 1 127.0.0.1 8 Localhost 2 10.10.7.254 5 rtr7.ws.nsrc.org $ sudo ./add_graphs.php --list-graph-templates Known Graph Templates:(id, name) 2 Interface - Traffic (bits/sec) 3 ucd/net - Available Disk Space 4 ucd/net - CPU Usage 5 Karlnet - Wireless Levels 6 Karlnet - Wireless Transmissions 7 Unix - Ping Latency 8 Unix - Processes 9 Unix - Load Average 10 Unix - Logged in Users 11 ucd/net - Load Average 12 Linux - Memory Usage 13 ucd/net - Memory Usage 14 Netware - File System Cache 15 Netware - CPU Utilization 16 Netware - File System Activity 17 Netware - Logged In Users 18 Cisco - CPU Usage 19 Netware - Volume Information 20 Netware - Directory Information 21 Unix - Available Disk Space 22 Interface - Errors/Discards 23 Interface - Unicast Packets 24 Interface - Non-Unicast Packets 25 Interface - Traffic (bytes/sec) 26 Host MIB - Available Disk Space 27 Host MIB - CPU Utilization 28 Host MIB - Logged in Users 29 Host MIB - Processes 30 Netware - Open Files 31 Interface - Traffic (bits/sec, 95th Percentile) 32 Interface - Traffic (bits/sec, Total Bandwidth) 33 Interface - Traffic (bytes/sec, Total Bandwidth) 34 SNMP - Generic OID Template $ sudo ./add_graphs.php --host-id=2 --list-snmp-queries Known SNMP Queries:(id, name) 1 SNMP - Interface Statistics 2 ucd/net - Get Monitored Partitions 3 Karlnet - Wireless Bridge Statistics 4 Netware - Get Available Volumes 6 Unix - Get Mounted Partitions 7 Netware - Get Processor Information 8 SNMP - Get Mounted Partitions 9 SNMP - Get Processor Information $ sudo ./add_graphs.php --snmp-query-id=1 --list-query-types Known SNMP Query Types: (id, name) 2 In/Out Errors/Discarded Packets 3 In/Out Non-Unicast Packets 4 In/Out Unicast Packets 9 In/Out Bytes (64-bit Counters) 13 In/Out Bits 14 In/Out Bits (64-bit Counters) 16 In/Out Bytes 20 In/Out Bits with 95th Percentile 21 In/Out Bits with Total Bandwidth 22 In/Out Bytes with Total Bandwidth $ sudo ./add_graphs.php --list-snmp-fields --host-id=2 Known SNMP Fields for host-id 2: (name) ifAlias ifDescr ifHighSpeed ifHwAddr ifIndex ifIP ifName ifOperStatus ifSpeed ifType $ sudo ./add_graphs.php --list-snmp-values --host-id=2 --snmp-field=ifType Known values for ifType for host 2: (name) ethernetCsmacd(6) other(1) $ 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 Graph Added - graph-id: (5) - data-source-ids: (8, 8) Graph Added - graph-id: (6) - data-source-ids: (9, 9) $ sudo ./add_graphs.php --list-hosts Known Hosts: (id, hostname, template, description) 1 127.0.0.1 8 Localhost 2 10.10.7.254 5 rtr7.ws.nsrc.org 3 10.10.1.254 5 rtr1.ws.nsrc.org 4 10.10.2.254 5 rtr2.ws.nsrc.org 5 10.10.3.254 5 rtr3.ws.nsrc.org 6 10.10.4.254 5 rtr4.ws.nsrc.org 7 10.10.5.254 5 rtr5.ws.nsrc.org 8 10.10.6.254 5 rtr6.ws.nsrc.org $ for router in 3 4 5 6 7 8 > do > 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 > done Graph Added - graph-id: (7) - data-source-ids: (10, 10) Graph Added - graph-id: (8) - data-source-ids: (11, 11) Graph Added - graph-id: (9) - data-source-ids: (12, 12) Graph Added - graph-id: (10) - data-source-ids: (13, 13) Graph Added - graph-id: (11) - data-source-ids: (14, 14) Graph Added - graph-id: (12) - data-source-ids: (15, 15) Graph Added - graph-id: (13) - data-source-ids: (16, 16) Graph Added - graph-id: (14) - data-source-ids: (17, 17) Graph Added - graph-id: (15) - data-source-ids: (18, 18) Graph Added - graph-id: (16) - data-source-ids: (19, 19) Graph Added - graph-id: (17) - data-source-ids: (20, 20) Graph Added - graph-id: (18) - data-source-ids: (21, 21) 3. Trees $ sudo ./add_tree.php [...] $ sudo ./add_tree.php --list-trees Known Trees: id sort method name 1 Manual Ordering (No Sorting) Default Tree $ sudo ./add_tree.php --list-trees Known Trees: id sort method name 1 Manual Ordering (No Sorting) Default Tree 2 Manual Ordering (No Sorting) NETMGMT routers $ sudo ./add_tree.php --host-id=2 --tree-id=2 --node-type=host --type=node Added Node node-id: (8) $ for router in 3 4 5 6 7 8 > do > sudo ./add_tree.php --host-id=$router --tree-id=2 --node-type=host --type=node > done Added Node node-id: (9) Added Node node-id: (10) Added Node node-id: (11) Added Node node-id: (12) Added Node node-id: (13) Added Node node-id: (14)