Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu May 23, 2019 5:05 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Can not write correct rpn pr cdef
PostPosted: Tue Jul 17, 2018 8:59 am 
Offline
Cacti Pro User
User avatar

Joined: Wed Apr 09, 2003 2:17 am
Posts: 722
Location: Izmir/Turkey
I try to create Interface traffic percentage treshold value. (Thold 0.5V)
I try rpn expression:
Code:
|ds:traffic_in|,0.000008,*,|query_ifHighSpeed|,/,100,*

or
Code:
|ds:traffic_in|,0.000008,*,|query_ifSpeed|,/,100,*

I try CDEF:
selected CDEF is
Code:
cdef=CURRENT_DATA_SOURCE,8,*,CURRENT_DS_MAXIMUM_VALUE,/,100,*

But always I get wrong value.
Is there any way to get correct value?


Top
 Profile  
 
 Post subject: Re: Can not write correct rpn pr cdef
PostPosted: Tue Jul 17, 2018 10:32 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2474
Why are you sure it's the wrong value?

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

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: Can not write correct rpn pr cdef
PostPosted: Wed Jul 18, 2018 12:44 am 
Offline
Cacti Pro User
User avatar

Joined: Wed Apr 09, 2003 2:17 am
Posts: 722
Location: Izmir/Turkey
Lets have an example
Interface Speed= 1Gbps
rrd_maximum = 600Mbps (I set it manually during graph creation)
so My Bandwidth =600Mbps
Utilization = 15.4Mbps (Raw value is Byte so , 15.Mbps / 8 = 1,96MBs)
according to CDEF :
cdef=CURRENT_DATA_SOURCE,8,*,CURRENT_DS_MAXIMUM_VALUE,/,100,*
and RPN Expression:
|ds:traffic_in|,8,*,|query_ifSpeed|,/,100,*
So percentage is = 2.5% ~ ((15.4/600)*100)
I create THOLD alrm for W:10 and C:15
But THOLD read current value as:
1,541,869.4777
Thats the wrong value
I think RPN cannot calculate corectly, it seems raw data. RPn dont diveide to rrd_maximum value which is |query_ifSpeed| or |query_ifHighSpeed| and then didnt multiply by 100


Top
 Profile  
 
 Post subject: Re: Can not write correct rpn pr cdef
PostPosted: Wed Jul 18, 2018 1:27 am 
Offline
Cacti Guru User

Joined: Sun Aug 27, 2017 12:05 am
Posts: 2474
Do you have a screenshot of your thold definition?

_________________
Official Cacti Developer

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation

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: Can not write correct rpn pr cdef
PostPosted: Wed Jul 18, 2018 8:30 am 
Offline
Cacti Pro User
User avatar

Joined: Wed Apr 09, 2003 2:17 am
Posts: 722
Location: Izmir/Turkey
Attachment:
File comment: Teplate
template.jpg
template.jpg [ 49.43 KiB | Viewed 328 times ]

Attachment:
File comment: Thold Output
thold.jpg
thold.jpg [ 15.32 KiB | Viewed 328 times ]

Attachment:
File comment: Graph
graph.jpg
graph.jpg [ 13.2 KiB | Viewed 328 times ]


Top
 Profile  
 
 Post subject: Re: Can not write correct rpn pr cdef
PostPosted: Thu Jul 19, 2018 7:39 am 
Offline
Cacti Pro User
User avatar

Joined: Wed Apr 09, 2003 2:17 am
Posts: 722
Location: Izmir/Turkey
Any idea?


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