xmacan / plugin_snver

Small Cacti plugin - try find serial numbers, versions and important information about devices
GNU Lesser General Public License v2.1
2 stars 0 forks source link

email attachment errors today #11

Closed sgvfr closed 2 months ago

sgvfr commented 4 months ago

I don't know what triggered this, i just noticed the errors in the logs today.

2024-05-08 09:52:37 - PHP ERROR Backtrace: (CactiShutdownHandler())
2024-05-08 09:52:37 - ERROR PHP ERROR: Uncaught TypeError: send_mail(): Argument #5 ($attachments) must be of type ?array, string given, called in /var/www/html/cacti/plugins/snver/setup.php on line 175 and defined in /var/www/html/cacti/lib/functions.php:5130 Stack trace: #0 /var/www/html/cacti/plugins/snver/setup.php(175): send_mail() #1 /var/www/html/cacti/lib/plugins.php(236): plugin_snver_poller_bottom() #2 /var/www/html/cacti/lib/plugins.php(90): api_plugin_run_plugin_hook() #3 /var/www/html/cacti/poller.php(960): api_plugin_hook() #4 {main} thrown in file: /var/www/html/cacti/lib/functions.php on line: 5130

Any ideas?

xmacan commented 4 months ago

It is php 8.x issue. Try to change setup.php line 175, from: $data_act . '

' . PHP_EOL . 'Older data:
' . PHP_EOL . $data_his, '', '', true); to: $data_act . '

' . PHP_EOL . 'Older data:
' . PHP_EOL . $data_his, array(), '', true);

Plugin SNVer is discontinued. I'm rewriting it now. It will be much better. You will find it here or on https://github.com/cacti in few days. New name will be Evidence.

@sgvfr - If you want to test Evidence before release, let me know. I would appreciate a tester.

sgvfr commented 4 months ago

Absolutely will be a tester for you.

xmacan commented 3 months ago

@sgvfr thank you! I'm ready. Please try install https://github.com/xmacan/plugin_evidence It isn't finished yet, few things missing:

You can gather data and display data for specific host or template. Don't forget configure Configuration -> settings -> Evidence tab.

You can report issues for now here https://github.com/xmacan/plugin_evidence/issues Thank you!

sgvfr commented 3 months ago

I will install later today, thanks!

On June 24, 2024 12:44:08 p.m. PDT, Petr Macek @.***> wrote:

@sgvfr thank you! I'm ready. Please try install https://github.com/xmacan/plugin_evidence It isn't finished yet, few things missing:

  • searching and filtering in stored data
  • classic theme has still "snver tab icons"
  • does not show changes between records (new feature)
  • evidence tab shows only one MAC address sometimes

You can gather data and display data for specific host or template. Don't forget configure Configuration -> settings -> Evidence tab.

You can report issues for now here https://github.com/xmacan/plugin_evidence/issues Thank you!

-- Reply to this email directly or view it on GitHub: https://github.com/xmacan/plugin_snver/issues/11#issuecomment-2187282330 You are receiving this because you were mentioned.

Message ID: @.***>

sgvfr commented 2 months ago

Finally got around to installing - so far no errors.. will update the plugin code issues if I do see anything

xmacan commented 2 months ago

@sgvfr Thank you. It is prepared for release now. I have made a lot fo changes in last few days. Please update from https://github.com/Cacti/plugin_evidence