Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Aug 20, 2018 12:09 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Using thold for percentage
PostPosted: Wed Jun 06, 2018 6:18 am 
Offline
Cacti Pro User
User avatar

Joined: Wed Apr 09, 2003 2:17 am
Posts: 721
Location: Izmir/Turkey
Hi,
I have cacti 0.8.8.b and Thold 0.5
I use Percentage CDEF to create data. Such as:
cdef=CURRENT_DATA_SOURCE,8,*,CURRENT_DS_MAXIMUM_VALUE,/,100,* (Idon't use |query_ifSpeed| because my interface speed not same as real defined value)

I try to create thold alarm for percentage value like, if traffic in is over than 40% create alarm as warning, and 50% is for critical alarm
https://astdisk.yasar.com.tr/owncloud/public.php?service=files&t=d476e95d5f27c2af903c8d7b3ac1bda4
But I can't create a correct alarm.
For example Output capacitiy :10 Mbps,
Output current value: 3,16 Mpbs
Utilization: 30.83%
But thol alarm is:
Message: ALERT: VKG_Aliaga_SOL - Traffic - Gi0/1 [traffic_out] [traffic_out] is still above threshold of 50 with 1744.8217

What should I do?


Top
 Profile  
 
 Post subject: Re: Using thold for percentage
PostPosted: Mon Jul 16, 2018 7:22 am 
Offline

Joined: Mon Jul 16, 2018 7:05 am
Posts: 3
In Data Type select RPN Expression and paste below.


|ds:traffic_in|,0.000008,*,|query_ifHighSpeed|,/,100,*

This converts traffic_in or traffic_in into MB and then divides with interface speed and then multiply with 100 to get percentage.


Top
 Profile  
 
 Post subject: Re: Using thold for percentage
PostPosted: Tue Jul 17, 2018 3:02 am 
Offline
Cacti Pro User
User avatar

Joined: Wed Apr 09, 2003 2:17 am
Posts: 721
Location: Izmir/Turkey
Hi,
For outbound traffik thold:
|ds:traffic_out|,0.000008,*,|query_ifHighSpeed|,/,100,*
right?
But there is a problem in calculation I think
My BW is 10 Mbps, so when outbound utilization is 5.4 Mbpsso utilization percentage is 54%
Attachment:
File comment: Graphic
1.jpg
1.jpg [ 10.68 KiB | Viewed 91 times ]

But thols current value shows 5.4 and it is wrong
Attachment:
File comment: Thold current value
2.jpg
2.jpg [ 5.51 KiB | Viewed 91 times ]

And my RPN is :
Code:
|ds:traffic_out|,0.000008,*,|query_ifHighSpeed|,/,100,*

and
Code:
|ds:traffic_in|,0.000008,*,|query_ifHighSpeed|,/,100,*

This calculation issue is occurs for inbound traffis also.
Is there any idea why it happens? Is it related with 0.000008 ?


Top
 Profile  
 
 Post subject: Re: Using thold for percentage
PostPosted: Tue Jul 17, 2018 3:31 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 1332
The 0.000008 figure is a conversion between bits, bytes and percentages.

_________________
Cacti Resources:
Cacti Website
Cacti Issues
Cacti Releases

My resources:
How to submit Pull Requests
Development Wiki and How To's
Updated NetSNMP Memory template for Cacti 1.x
Cisco SFP template for Cacti 0.8.8


Top
 Profile  
 
 Post subject: Re: Using thold for percentage
PostPosted: Tue Jul 17, 2018 5:23 am 
Offline
Cacti Pro User
User avatar

Joined: Wed Apr 09, 2003 2:17 am
Posts: 721
Location: Izmir/Turkey
Understand it converts to Mbps in one step. But why value is wrong?


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

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 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