Cacti / plugin_thold

Thold Plugin for Cacti

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding "Associated Threshold Template" on device has no action/error

sgvfr opened this issue · comments

Describe the bug
Trying to apply a threshold template to a device has no action, error or log entry

cacti: commit 4563aaa1db7cc90f44edb25b23698a1d0208139e (HEAD -> develop)
thold: commit 8c3fa9c (HEAD -> develop, origin/develop, origin/HEAD)
PHP 8.1.27 (cli) (built: Dec 21 2023 20:19:54) (NTS)

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Management / Devices'
  2. choose a device with a linked threshold template
  3. Click "add" for the threshold template to add to the device

Expected behavior
The template should be added to the device, but is not.

Screenshots
image

Pretty sure this is fixed now. I do get this warning in the Console, but that is to be expected.

image

Okay, I figured this one out. To fix, you have to first upgrade to the latest 1.2.x branch or develop. Just fixed last night and then set your Thold version back to 1.7 and re-upgrade.

UPDATE plugin_config SET version='1.7' WHERE directory='thold';

Then, it'll work as expected. So, basically, when 1.8 is officially released, to take advantage of this feature, you will need 1.2.27. Going to get push back on that, but it is what it is.

works.. my steps below.

I disabled the installed 1.8.
set the db to 1.7 with your above sql command, verified in plugin management it shows 1.7.
re-enabled thold and after a few seconds it shows 1.8.

thresholds are added in the device view now.

edit: spoke too soon. error shown in logs when applying threshold in:
Management / Devices / checkbox a device / dropdown select: Apply thresholds

2024-04-10 12:19:22 - PHP ERROR WARNING Backtrace: (/host.php[86]:form_actions(), /host.php[586]:form_continue_confirmation(), /lib/html_form.php[1557]:CactiErrorHandler())
2024-04-10 12:19:22 - ERROR PHP WARNING: Undefined variable $title in file: /var/www/html/cacti/lib/html_form.php on line: 1557
2024-04-10 12:19:22 - PHP ERROR WARNING Backtrace: (/host.php[86]:form_actions(), /host.php[586]:form_continue_confirmation(), /lib/html_form.php[1373]:CactiErrorHandler())
2024-04-10 12:19:22 - ERROR PHP WARNING: Undefined variable $message in file: /var/www/html/cacti/lib/html_form.php on line: 1373
2024-04-10 12:19:22 - PHP ERROR WARNING Backtrace: (/host.php[86]:form_actions(), /host.php[586]:form_continue_confirmation(), /lib/html_form.php[1327]:CactiErrorHandler())
2024-04-10 12:19:22 - ERROR PHP WARNING: Undefined array key "thold" in file: /var/www/html/cacti/lib/html_form.php on line: 1327

Viewing tab "thold" / "Device Status" throws the following error

2024-04-10 12:27:42 - SQL Backtrace: (/plugins/thold/thold_graph.php[104]:hosts(), /plugins/thold/thold_graph.php[956]:thold_get_allowed_devices(), /plugins/thold/thold_functions.php[7731]:db_fetch_assoc(), /lib/database.php[827]:db_fetch_assoc_prepared(), /lib/database.php[851]:db_execute_prepared())
2024-04-10 12:27:42 - CMDPHP ERROR: A DB Row Failed!, Error: Column 'graphs' in field list is ambiguous

Okay, fantastic! Thanks!!