Skip to content

Instantly share code, notes, and snippets.

@broxio
Created August 7, 2015 17:37
Show Gist options
  • Save broxio/d9c4fed121c569611ec1 to your computer and use it in GitHub Desktop.
Save broxio/d9c4fed121c569611ec1 to your computer and use it in GitHub Desktop.
Bulk add graph to Cacti.
#--snmp-query-id=1 - SNMP - Interface Statistics
#--snmp-query-type-id=14 64bit counter
for i in {40..96}; do
php cli/add_graphs.php --host-id=${i} --graph-type=cg --graph-template-id=18;
php cli/add_graphs.php --host-id=${i} --graph-type=ds --graph-template-id=2 --snmp-query-id=1 --snmp-query-type-id=14 --snmp-field=ifOperStatus --snmp-value=Up;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment