Cacti / plugin_flowview

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

Invalid paths in flowview/service/flow-capture and flowview/service/flowview-capture.service #217

Open gcrumb opened 2 months ago

gcrumb commented 2 months ago

Describe the bug Function get_cacti_base() at line 113 includes this list of base directories:

$cacti_bases = array(
    '/var/www/html/cacti',
    '/usr/local/share/cacti',
    '/usr/share/cacti',
    '/var/www/html',
    '/opt/cacti'
);

The second entry is incorrect in Cacti v 1.2.27 as packaged in Debian Trixie. The actual path is:

    '/usr/local/share/cacti/site',

A second issue, which made diagnosis harder, is that /var/log/cacti/poller.log is owned by root, but the flowview-capture service runs as the website user (changed to www-data in this installation).

To Reproduce Steps to reproduce the behavior:

  1. Install Cacti from Debian packages on debian Trixie
  2. Pull Flowview from git
  3. Install and configure the flowview-capture service:
  4. Update the flowview-capture.service paths to the correct script location.
  5. Update the flowview-capture.service user to 'www-data'
  6. Add and configure a new listener
  7. Listener shows status 'Down'.

Expected behavior Correct Debian path should be included in the array of potential paths.

Plugin (please complete the following information): [info] name = flowview version = 4.8 longname = FlowView author = The Cacti Group email = developers@cacti.net homepage = http://www.cacti.net compat = 1.2.28 capabilities = online_view:0, online_mgmt:0, offline_view:0, offline_mgmt:0, remote_collect:0

Desktop (please complete the following information):

TheWitness commented 2 months ago

Were you going to propose a pull request?

gcrumb commented 2 months ago

Sorry I don't have a devel environment set up. I'm not (currently) a software dev. Just trying to get a local device working.

TheWitness commented 2 months ago

@gcrumb, check the update flow-capture service and let us know if it's better after you follow the remainder of the install process now.

gcrumb commented 2 months ago

Thanks!

I'm in the middle of testing right now, but I'll do a reinstall/reconfig once this round is complete.

On 20/09/2024 01:15, TheWitness wrote:

@gcrumb https://github.com/gcrumb, check the update flow-capture service and let us know if it's better after you follow the remainder of the install process now.

— Reply to this email directly, view it on GitHub <https://github.com/ Cacti/plugin_flowview/issues/217#issuecomment-2361112926>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ AAIJAJDA4AOQ7FNCL225MG3ZXLMBLAVCNFSM6AAAAABOOVMN7SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRRGEYTEOJSGY>. You are receiving this because you were mentioned.Message ID: <Cacti/ @.***>