Then i selected all the related graphs for all my devices and i created thresholds from template.
I can then customize particular tholds eventually.
So far, so good.
I don't get how i can have the threshold template automatically used when i add a new disk graph for a new device.
On settings --> Threshold i saw an option
but the threshold template is tied to a data template, not to a device!Auto Create Thresholds
If selected, when running either automation, or when creating/saving a Device, all Thresholds associated with the Device Template will be created.
So i did anyway changed my device template "Standard SNMP Enabled Host Basic OS" which i normally use to add
Stdrd HOST-RESOURCE-MIB hrStorage [hrStorageUsed]
But i don't understand, when i add a new host (template 6 is my id for the device template above)
Code: Select all
php -q add_device.php --description="fooserver" --ip="192.168.100.27" --template=6 --community="my_private_one"
Code: Select all
for folder in `php -q add_graphs.php --host-id=$hostid --snmp-field=hrStorageDescr --list-snmp-values | grep / | grep -v shm | grep -v "/run" | grep -v "/sys/fs/cgroup" `;do
/bin/php -q add_graphs.php --host-id=$hostid --graph-type=ds --graph-template-id=`graph_template_id "Stdrd HOST-RESOURCE-MIB - Storage size/used"` --snmp-query-id=`snmp_query_id "Stdrd_HOST-RESOURCE-MIB hrStorage"` --snmp-query-type-id=`snmp_query_type_id "Stdrd_HOST-RESOURCE-MIB hrStorage" "Stdrd HOST-RESOURCE-MIB - Storage size/uesd"` --snmp-field=hrStorageDescr --snmp-value=$folder
done