Can not write correct rpn pr cdef

Support questions about the Threshold plugin

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
TFC
Cacti Pro User
Posts: 722
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Can not write correct rpn pr cdef

#1 Post by TFC » Tue Jul 17, 2018 8:59 am

I try to create Interface traffic percentage treshold value. (Thold 0.5V)
I try rpn expression:

Code: Select all

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

Code: Select all

|ds:traffic_in|,0.000008,*,|query_ifSpeed|,/,100,*
I try CDEF:
selected CDEF is

Code: Select all

cdef=CURRENT_DATA_SOURCE,8,*,CURRENT_DS_MAXIMUM_VALUE,/,100,*
But always I get wrong value.
Is there any way to get correct value?


User avatar
TFC
Cacti Pro User
Posts: 722
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Re: Can not write correct rpn pr cdef

#3 Post by TFC » Wed Jul 18, 2018 12:44 am

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


User avatar
TFC
Cacti Pro User
Posts: 722
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Re: Can not write correct rpn pr cdef

#5 Post by TFC » Wed Jul 18, 2018 8:30 am

template.jpg
Teplate
template.jpg (49.43 KiB) Viewed 539 times
thold.jpg
Thold Output
thold.jpg (15.32 KiB) Viewed 539 times
graph.jpg
Graph
graph.jpg (13.2 KiB) Viewed 539 times

User avatar
TFC
Cacti Pro User
Posts: 722
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Re: Can not write correct rpn pr cdef

#6 Post by TFC » Thu Jul 19, 2018 7:39 am

Any idea?

Post Reply