Find host id:
php add_graphs.php --list-hosts | awk '/hostname/ {print $1}'
add a device:
php add_device.php --description=vz021 --ip=vz021.example.com --avail=snmp --template=9 --version=2 --community=community --port=162
add graph template to host:
php add_graph_template.php --host-id=$ID --graph-template-id=149
add graph to host:
templates=`php add_graphs.php --list-graph-templates --host-template-id=<tid> | awk '/^[0-9][0-9]/ {print $1}'`
for id in $templates; do php add_graphs.php --host-id=<id> --graph-type=cg --graph-template-id=$id; done
add host to tree:
php add_tree.php --type=node --node-type=host --parent-node=<pnode> --tree-id=<tid> --host-id=<id>
update graph templates to the same width:
Login to the database. update graph_templates_graph SET width=620;
Add unbound graphs for node:
for graphid in {111..118}; do php add_graphs.php --host-id=$hostid --graph-type=cg --graph-template-id=$graphid; done