Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Sep 24, 2018 12:27 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: create thold automatically for new graphs
PostPosted: Thu Jul 27, 2017 5:04 am 
Offline

Joined: Wed Oct 27, 2010 1:37 pm
Posts: 16
I have created a threshold template for disk occupation based on Stdrd HOST-RESOURCE-MIB hrStorage data template.
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
Quote:
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.


but the threshold template is tied to a data template, not to a device!
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:
php -q add_device.php --description="fooserver" --ip="192.168.100.27" --template=6 --community="my_private_one"


i don't have (yet) my disks created, i still have to run the part of my script that detects partitions and add them

Code:
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


So, how can i have the new thresholds to be created ?


Top
 Profile  
 
 Post subject: Re: create thold automatically for new graphs
PostPosted: Wed Mar 28, 2018 7:57 am 
Offline

Joined: Wed Sep 13, 2017 3:58 am
Posts: 13
Hi!

I have similar problem, i need to create threshold when my cacti automatically created new graph...

Did you find the way to do this?


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group