Hello Community.
With Cacti I am doing a couple of queries by OID. In each one I am obtaining an integer value, which represents the daily total, of requests, (Successful and failed), of an authentication service.
As I already mentioned, the integer value that I get in each request is a daily total, so the figure increases until 00:00 hours, when it starts again from 0.
I am trying to use CDEF, to create a mathematical operation that allows me to obtain only the difference between the received value and the last plotted value, with the intention that only new authentications are represented in the graph.
Could you help me?
If there is already a post that can help me, please send me the link.
Thank you in advance for your help.
Here is a screenshot of what I am currently capturing.
Regards.
Improve my charts obtained by OID
Moderators: Developers, Moderators
Re: Improve my charts obtained by OID
Your image is broken, so nothing to see.
You seem to choose the wrong data source type. You have an application with a counter that constantly increases, but you don't want to visualize the total counter value but the difference between each query. The correct data source type for this kind of data is COUNTER. Make your data source type COUNTER. The COUNTER type works by computing and storing the differences in the database in the first place. On counter reset, cacti recognizes the counter "going backwards" and reset the computing of the differences.
You seem to have set GAUGE as type, which just contains the current counter value. This is correct if you want to measure a thermometer for example, for the current temperature, which goes up and down and always represents the actual thing you want to visualize.
You seem to choose the wrong data source type. You have an application with a counter that constantly increases, but you don't want to visualize the total counter value but the difference between each query. The correct data source type for this kind of data is COUNTER. Make your data source type COUNTER. The COUNTER type works by computing and storing the differences in the database in the first place. On counter reset, cacti recognizes the counter "going backwards" and reset the computing of the differences.
You seem to have set GAUGE as type, which just contains the current counter value. This is correct if you want to measure a thermometer for example, for the current temperature, which goes up and down and always represents the actual thing you want to visualize.
-
- Posts: 5
- Joined: Thu Jun 18, 2020 7:31 am
Re: Improve my charts obtained by OID
Thanks @tercio, I'm going to try it and I'll tell you the result.
-
- Posts: 5
- Joined: Thu Jun 18, 2020 7:31 am
Re: Improve my charts obtained by OID
I have tried. The chart I have created, using "COUNTER" instead of "GAUGE" is not drawing anything.
However @tercio, as I already mentioned at the beginning of the post, the OID only returns an integer value, with a total that increases during the day.
However @tercio, as I already mentioned at the beginning of the post, the OID only returns an integer value, with a total that increases during the day.
Re: Improve my charts obtained by OID
If you change a data source type of an existing data source with an existing *.rrd file, you need to delete the corresponding *.rrd file and let cacti create a new one. The type cannot be changed on the fly for an existing *.rrd file.
-
- Posts: 5
- Joined: Thu Jun 18, 2020 7:31 am
Re: Improve my charts obtained by OID
Hi @tercio, I have removed the graphic using OID "X". Then I have recreated the graph with the OID "X" but this time I have used "Counter" But in the graph nothing is seen.
-
- Posts: 5
- Joined: Thu Jun 18, 2020 7:31 am
Re: Improve my charts obtained by OID
I think it could solve my problem if I can use CDEF to subtract from the value I get in real time, the value I got in the previous query.
What is the variable that has the value of the previous query stored in the DB?
What is the variable that has the value of the previous query stored in the DB?
Who is online
Users browsing this forum: No registered users and 0 guests