Cacti / plugin_flowview

FlowView Plugin for Cacti
GNU General Public License v2.0
18 stars 10 forks source link

"Protocol Filters" is not working #118

Closed cheerfultime closed 3 months ago

cheerfultime commented 3 months ago

Hi,

AlmaLinux release 9.4 + cacti + flowview(3.3 latest develop from github on Jun 5) Ubuntu 22.04 + cacti + flowview(3.3 latest develop from github on Jun 5)

  1. "Protocol Filters" are not working I entered the IP in "Source IP" but it's not working. Is my setting wrong? ProtocolFilters

  2. Then, there are error messages in cacti.log. 2024-06-06 14:26:18 - ERROR PHP WARNING in Plugin 'flowview': Undefined array key "src_domain" in file: /usr/share/cacti/plugins/flowview/functions.php on line: 16542024-06-06 14:26:18 - CMDPHP PHP ERROR WARNING Backtrace: (/plugins/flowview/flowview.php[51]:flowview_get_chartdata(), /plugins/flowview/functions.php[1654]:CactiErrorHandler())

Thanks!

TheWitness commented 3 months ago

I've updated the functions.php. Please update and try again. In the future if there is such an issue, there will be a warning in your Cacti.log. I will need to know the report you were running in this case.

cheerfultime commented 3 months ago

I've updated the functions.php. Please update and try again. In the future if there is such an issue, there will be a warning in your Cacti.log. I will need to know the report you were running in this case.

Hi,

1. "Protocol Filters" are not working < = there is no error messages in cacti.log. It's still not working.

2. After i update flowview, restart flow-capture, disable flowview, uninstall flowview. Then install flowview, enable flowview, there are error messages in cacti.log.

2024-06-06 22:52:21 - FLOWVIEW ERROR: Unable to process domain information. Please open a ticket on GitHub 2024-06-06 22:52:21 - FLOWVIEW ERROR: Unable to process domain information. Please open a ticket on GitHub 2024-06-06 22:52:21 - FLOWVIEW ERROR: Unable to process domain information. Please open a ticket on GitHub

3. I found that as long as "uninstall flowview", all the plugin_flowview_raw_2024xxx tab will be deleted. May I ask if this is normal?

Thanks!

TheWitness commented 3 months ago
  1. You will have to be more specific.
  2. That's log message is what I was looking for.
  3. That's normal. Don't uninstall unless you are prepared to loose that data. In a few hours, you will get them back again. Restore from your last backup if you need the data back.
TheWitness commented 3 months ago

Should be resolved now. I reproduced and corrected the reports.

cheerfultime commented 3 months ago

Hi,

I have updated flowview.

1. firefox_AzxCkXUOw5 "Source IP" or "Dest IP" in "Protocol Filters" works for IP, but not for range(x.x.x.x/24). When fill range in "Source IP" or "Dest IP", there is no error messages in cacti.log.

2. firefox_t1a7pV7ISq When "Statistical Report" choose "Destination IP", the table has an additional "Source DNS" field.

3. firefox_WwxPG3gw9D Since I unchecked "Domains/Hostnames Only" once, there are error messages in cacti.log.

2024-06-08 00:47:14 - CMDPHP Validation Error, Variable:graph_type, Value:null Backtrace: (/plugins/flowview/flowview.php[52]:flowview_request_vars(), /plugins/flowview/flowview.php[280]:validate_store_request_vars(), /lib/html_utility.php[712]:die_html_input_error(), /lib/html_validate.php[64]:cacti_debug_backtrace()) 2024-06-08 00:47:14 - CMDPHP Validation Error, Variable:graph_type, Value:null Backtrace: (/plugins/flowview/flowview.php[52]:flowview_request_vars(), /plugins/flowview/flowview.php[280]:validate_store_request_vars(), /lib/html_utility.php[712]:die_html_input_error(), /lib/html_validate.php[64]:cacti_debug_backtrace()) 2024-06-08 00:47:14 - CMDPHP Validation Error, Variable:graph_type, Value:null Backtrace: (/plugins/flowview/flowview.php[52]:flowview_request_vars(), /plugins/flowview/flowview.php[280]:validate_store_request_vars(), /lib/html_utility.php[712]:die_html_input_error(), /lib/html_validate.php[64]:cacti_debug_backtrace())

Thanks!

TheWitness commented 3 months ago

Good update. That validation error should be transient.

TheWitness commented 3 months ago

Just did another update. Hopefully this one gets it.

cheerfultime commented 3 months ago

Hi,

I have updated flowview.

1. "Source IP" or "Dest IP" in "Protocol Filters" works for IP, but still not for range(x.x.x.x/24). Is there anything I should pay attention to when entering "Source IP" or "Dest IP" range? When fill range in "Source IP" or "Dest IP", there is no error messages in cacti.log.

2. Destination IP When "Statistical Report" choose "Destination IP", the table has additional "Source DNS" and "Source IP" field. Are those specially added fields?

Source IP When "Statistical Report" choose "Source IP", "Dest DNS" and "Dest IP" will not be displayed.

3. "Validation Error" problem has been solved, thank you.

4. Is there an upper limit on the efficiency of FlowView's collection of flows? I want to collect flows in the scope of B class, but I find that the flow data is missing and incomplete. There is no error messages in cacti.log. The CPU usage of the server is very low, there is more than 24GB of ram, more than 40GB of hard disk space, and 10Gb network card interface. Do I need to adjust php or mariadb or other config?

Thanks!

TheWitness commented 3 months ago

That's not a protocol filter, that's an IP filter. Let's close this one, and open a new issue for the CIDR syntax filtering.