Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support
It is currently Wed Jul 30, 2014 2:13 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: thold 0.4.1, CDEF and query_ hack
PostPosted: Sat Mar 07, 2009 1:36 pm 
Offline

Joined: Tue Nov 14, 2006 7:07 am
Posts: 46
For anyone who is playing with the thold plugin, attached is a quick hack to support |query_XXX| custom text strings in a CDEF. I'm using it in a CDEF designed to work out the utilization percentage of an interface (this allows me to grab a result for |query_ifSpeed) so I can theshold on a percentage.

~ David


Attachments:
File comment: query_ in CDEF support for THOLD
thold-0.4.1_cdef-query.patch [979 Bytes]
Downloaded 358 times
Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 07, 2009 3:39 pm 
Offline

Joined: Tue Sep 30, 2008 11:38 pm
Posts: 41
Location: Sofia, Bulgaria
10x, that's good. Can you tell me how many interfaces do you have, and what time it takes for thold to check them? I have about 13k interfaces, and im curious if i can monitor the with thold.
10x.

_________________
"Ubuntu" - an African word, meaning "Slackware is too hard for me".


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 07, 2009 5:52 pm 
Offline

Joined: Tue Nov 14, 2006 7:07 am
Posts: 46
I'm currently in the middle of trialing cacti to replace the existing homegrown mrtg solution, so haven't had much chance to load up the system yet. This will be changing over the next week or so, expecially after I finish writing a script to handle polling of two key devices; one of them is annoying as you have to poll the main interface but it returns an ifSpeed of 0 - you have to poll the ifStackTable, work out the sub interfaces, add their speeds together and use that for the total ifSpeed...

There is definitely room for improvement. I didn't want to alter any of the existing functions, so am using a table join to work out the host id. If that was passed, that would help.

For reference, current stats look like:

03/07/2009 04:40:18 PM - SYSTEM THOLD STATS: Time:5.5956 Tholds:1232 Hosts:0


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 21, 2009 7:01 am 
Offline

Joined: Fri Apr 28, 2006 4:02 am
Posts: 28
I did try this hack and was successful. I have around 4000 thresholds on 5 minute cycles with around 1500 hosts and it works fine.
Great stuff!

One remark: If you use query_ifspeed to calculate percentage of line speed, then you have to make sure that you deal with division by 0 on the rpn functio thold_rpn:
e.q. on line 905:

case 4:
if ($y == 0) return (-1);
return $x / $y;
break;


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 21, 2009 1:39 pm 
Offline
Developer

Joined: Thu Apr 07, 2005 3:29 pm
Posts: 1693
Location: B/CS Texas
Nice find, I have updated SVN with this patch.

_________________
CactiEZ CD


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 15, 2009 11:09 am 
Offline

Joined: Thu May 11, 2006 1:44 pm
Posts: 21
Can someone explain how I install this? I have a requirement to threshold on 75% utilization of an interface and this looks to be the solution (vs. traffic_in or traffic_out).

Any help would be greatly appreciated.


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: JohnYYC 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