Flow-view timespan issue

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
Rno
Cacti Pro User
Posts: 704
Joined: Wed Dec 07, 2011 9:19 am

Flow-view timespan issue

Post by Rno »

I try to understand how flow-view, work, so far not easy, since I can't make the basic filter working (filter by ip source).
And I try to understand the timespan!

When I create a filter, I set it up for last helf hour, on the database it save the time and date of when I apply the save! So far not right, since this date will change of curse when I'm using the fitler.

So I go to flowview, and select my filter, then it take the date time that are in the database. Instead of applying the rule 'last half hour'

Event in the code it dosen't look right:

Code: Select all

						if (!isset_request_var('predefined_timespan')) {
							set_request_var('predefined_timespan', $q['timespan']);

							if ($q['timespan'] == 0) {
								set_request_var('date1', strtoupper($q['startdate']));
								set_request_var('date2', strtoupper($q['enddate']));
							} else {
								$span = array();
								get_timespan($span, time(), get_request_var('predefined_timespan'), read_user_setting('first_weekdayid'));
								set_request_var('date1', $span['current_value_date1']);
								set_request_var('date2', $span['current_value_date2']);
							}
						}
taken the startdate/enddate from the url is not correct, because it's taken from the filter database, and timespan stored on the DB is always 0, even if I change to hour or something else it's never changed.
So this code is always :

Code: Select all

								set_request_var('date1', strtoupper($q['startdate']));
								set_request_var('date2', strtoupper($q['enddate']));
Or I missing something about how the filter is used
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
Rno
Cacti Pro User
Posts: 704
Joined: Wed Dec 07, 2011 9:19 am

Re: Flow-view timespan issue

Post by Rno »

And by the way doing an edit of a filter and a save the filed timespan is missing from the URL.
only
predefined_timespan "3" (2hours in this case)

exist.

so timespan on the DB is never saved
Test
Almalinux
php 8.2.14
mariadb 10.6.16
Cacti 1.2.27
Spine 1.2.27
RRD 1.7.2
thold 1.8
monitor 2.5
syslog 3.2
flowview: 3.3
weathermap 1.0 Beta
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Flow-view timespan issue

Post by TheWitness »

I've done some fix-ups in Develop that seems to have corrected some of the issues. Working on a parallel query feature for union tables to speed up the query times though, and the order clause still ends up being quite wrong every time you select a new filter. The logic there is horrible, but there is hope.
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?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest