Hello there, I am using thold-0.4.9-3 with Cacti 0.8.8a.
I've created some new templates to get some thold's setup for bandwidth utilization %, but I suspect my RPN skills are lacking.
I've made some new data queries/templates/etc so I have 3 datasources available, traffic_in [ifHCInOctets - bytes], traffic_out [ifHCOutOctets - bytes], and ifSpeed [ifSpeed - bits]. I was going to use the handy Percent option on the thresholds but then I realized comparing bytes to bits would not work, and I don't seem to be able to use both a CDEF and a Percent at the same time.
So I'm trying to come up with a correct RPN expression to handle this. This is my best guess so far, trying to end up with a Percentage ultimately so I can say warn if above 80, critical if above 90 etc:
Inbound threshold: |ds:traffic_in|,8,*,|ds:ifSpeed|,/,100,*
Outbound threshold: |ds:traffic_out|,8,*,|ds:ifSpeed|,/,100,*
Testing this though I'm getting some slightly weird results. "ALERT: TEST - Traffic - C14 [traffic_out] [traffic_out] is still above threshold of 2 with 6820.872" ..... The 6820.872 does not match up to the actual outbound ifHCOutOctets, so I'm guessing my RPN is not correct and its producing too large of a number?
I also see that RPN supports flow operators, would anyone happen to know off the top of their heads the correct syntax to basically make the expression return 0 if ifSpeed is 0, otherwise do all that math, to avoid potential divide by 0 errors? I would really like to do this in the RPN and not get into modifying files which is always a pain when upgrading in the future etc.
Thanks!!
RPN for Bandwidth Utilization
Moderators: Developers, Moderators
Who is online
Users browsing this forum: No registered users and 3 guests