Hello,
I created a graph template in Cacti to monitor "used" bandwidth on wireless radio. I'm using pretty simple CDEF function cdef=a,100,*,b,/, the value A is traffic on the radio and value B is data rate. This way I have exact value of how much of space my wireless links have, cause it's calculated from actual data rate and actual traffic.
Now I would like to use treshold to alert me if the value in graph exceed for example 75%, but threshold can monitor only data sources and this is graph created (calculated) from two datasources. Is there any way how to do it?
I have many wireless link to monitor and it's time consuming to doing manual control of links every week, thold would be much better if he send me an email.
Thank you very much!
THold check value in graph, not from data-source
Moderators: Developers, Moderators
-
- Posts: 6
- Joined: Fri Nov 13, 2020 2:33 pm
-
- Posts: 6
- Joined: Fri Nov 13, 2020 2:33 pm
Re: THold check value in graph, not from data-source
Nobody knows???
- TheWitness
- Developer
- Posts: 17007
- Joined: Tue May 14, 2002 5:08 pm
- Location: MI, USA
- Contact:
Re: THold check value in graph, not from data-source
Well, if it's 75% of a static number, just make that your warning/alert threshold. If your calculation is relative on two number like: max value, measured value, you can use the Percentage Data Manipulation Type, but your RRDfile will need to contain both data source values: max value and measured value.
If you use the percentage Type, the numerator is the measured value, and the denominator would be the max value, then the warn and alerts are in percentages, in your case, you would enter 75. (aka 75%).
Though there are many people on this forum that know the answers to your question, we don't always answer. Most of us are well beyond training wheels and only take time to answer things here when we are bored, or have the day off from work and prefer to be inside over working in sub freezing temperatures.
If you use the percentage Type, the numerator is the measured value, and the denominator would be the max value, then the warn and alerts are in percentages, in your case, you would enter 75. (aka 75%).
Though there are many people on this forum that know the answers to your question, we don't always answer. Most of us are well beyond training wheels and only take time to answer things here when we are bored, or have the day off from work and prefer to be inside over working in sub freezing temperatures.
True understanding begins only when we realize how little we truly understand...
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Life is an adventure, let yours begin with Cacti!
Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages
For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
-
- Posts: 6
- Joined: Fri Nov 13, 2020 2:33 pm
Re: THold check value in graph, not from data-source
Hi, thanks for the answer.
The problem is, that the calculated value has no datasource, like I said, it get's the radiospeed (for what speed is radio connected) and radiospeedtx (the actual traffic on the radio) and make a result in % in the graph. I need make a warning/alert on the result which sadly has no datasource, because it's calculated.
The problem is, that the calculated value has no datasource, like I said, it get's the radiospeed (for what speed is radio connected) and radiospeedtx (the actual traffic on the radio) and make a result in % in the graph. I need make a warning/alert on the result which sadly has no datasource, because it's calculated.
-
- Posts: 2
- Joined: Fri Dec 25, 2020 5:53 am
Re: THold check value in graph, not from data-source
You should create new php script for "total graph"(more than 1 data source to 1 output). After that you can create threshold for this. This script can read your actual traffic and you can use this for alarm.
You can read this for using more CDEF/data sources.
about28709.html
You can read this for using more CDEF/data sources.
about28709.html
-
- Posts: 6
- Joined: Fri Nov 13, 2020 2:33 pm
Re: THold check value in graph, not from data-source
It's not a static number.TheWitness wrote: ↑Fri Dec 18, 2020 12:39 pm Well, if it's 75% of a static number, just make that your warning/alert threshold. If your calculation is relative on two number like: max value, measured value, you can use the Percentage Data Manipulation Type, but your RRDfile will need to contain both data source values: max value and measured value.
If you use the percentage Type, the numerator is the measured value, and the denominator would be the max value, then the warn and alerts are in percentages, in your case, you would enter 75. (aka 75%).
Though there are many people on this forum that know the answers to your question, we don't always answer. Most of us are well beyond training wheels and only take time to answer things here when we are bored, or have the day off from work and prefer to be inside over working in sub freezing temperatures.
First datasource (a) is radiospeedtx - which is in MBits and it's converted to % using CDEF
Second datasource is radiospeed (b) - which is in Mbits and it's converted to % using CDEF
CDEF function cdef=a,100,*,b,/
Is there any way how to access a second data source? I created a thold based on radiospeedtx and trying to get radiospeed via RPN Expression, but no luck
Code: Select all
|ds:radiospeedtx|,100,*,|ds:radiospeed|,/
usr/bin/rrdtool graph - \
--imgformat=PNG \
--start='-86400' \
--end='-30' \
--pango-markup \
--title='Actual Bandwidth in %' \
--vertical-label='Percentage' \
--slope-mode \
--base=1000 \
--height=150 \
--width=500 \
--tabwidth '30' \
--rigid \
--upper-limit='100' \
--lower-limit='0' \
COMMENT:"From 2021-02-16 14\:28\:27 To 2021-02-17 14\:27\:57\c" \
COMMENT:" \n" \
--color BACK#161616 \
--color CANVAS#060606 \
--color SHADEA#0B0B0B \
--color SHADEB#292929 \
--color GRID#545454 \
--color MGRID#6A6C6C \
--color FONT#FFFFFF \
--color AXIS#2C4D43 \
--color ARROW#2C4D43 \
--color FRAME#060606 \
--border 1 --font TITLE:11:'Arial' \
--font AXIS:8:'Arial' \
--font LEGEND:8:'Courier' \
--font UNIT:8:'Arial' \
--font WATERMARK:6:'Arial' \
--slope-mode \
--watermark 'Generated by Cacti®' \
DEF:a='/var/www/html/cacti/rra/xxx_radiospeedtx_1286.rrd':'radiospeedtx':LAST \
DEF:b='/var/www/html/cacti/rra/xxx_1275.rrd':'radiospeed':LAST \
CDEF:cdefa='a,8388608,/,100,*' \
CDEF:cdefb='b,8388608,/,100,*' \
CDEF:cdefc='a,100,*,b,/' \
CDEF:cdefe='a,100,*,b,/' \
CDEF:cdeff='a,100,*,b,/' \
CDEF:cdefg='a,100,*,b,/' \
LINE1:cdefa#B1FB1700: \
LINE1:cdefb#00FF0000: \
AREA:cdefc#FFFF00FF:'Bandwidth Percentage\n' \
GPRINT:cdefc:LAST:'Last\:%8.1lf%%\n' \
GPRINT:cdefe:AVERAGE:'Avg\:%8.1lf%%\n' \
GPRINT:cdeff:MIN:'Min\:%8.1lf%%\n' \
GPRINT:cdefg:MAX:'Max\:%8.1lf%%\n'
RRDtool Command lengths = 1416 charaters.
RRDtool Says:
OK
Who is online
Users browsing this forum: No registered users and 0 guests