OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: 4r7ur on December 22, 2022, 10:32:02 am

Title: Plugin warnings for Gateway status
Post by: 4r7ur on December 22, 2022, 10:32:02 am
Good morning,

after updating to day to 22.7.10_2-amd64 (FreeBSD 13.1-RELEASE-p5/OpenSSL 1.1.1s 1 Nov 2022) I receive about every 5 seconds or so a lot of warnings like this:

2022-12-22T10:27:36
opnsense   /usr/local/opnsense/scripts/routes/gateway_status.php: plugins_run return_gateways_status (execute task : dpinger_status())
2022-12-22T10:27:36
opnsense   /usr/local/opnsense/scripts/routes/gateway_status.php: plugins_run return_gateways_status ()
2022-12-22T10:27:31
opnsense   /usr/local/opnsense/scripts/routes/gateway_status.php: plugins_run return_gateways_status (execute task : dpinger_status())
2022-12-22T10:27:31
opnsense   /usr/local/opnsense/scripts/routes/gateway_status.php: plugins_run return_gateways_status ()

I'm not sure if this was already an issue before the 22.7.10_2 hotfix. If I remove the gateways widget from the dashboard, the warings stop. Any idea how to supress these messages?

Kind regards,
Artur
Title: Re: Plugin warnings for Gateway status
Post by: FullyBorked on December 22, 2022, 02:45:13 pm
Not sure the fix, but I'm seeing these logs too. 
Title: Re: Plugin warnings for Gateway status
Post by: danderson on December 22, 2022, 03:17:54 pm
same as above, seeing the errors in 22.7.10_2
Title: Re: Plugin warnings for Gateway status
Post by: NW4FUN on December 22, 2022, 04:08:12 pm
Same here
Title: Re: Plugin warnings for Gateway status
Post by: dcol on December 22, 2022, 04:43:26 pm
I have them too. But they are not errors, just Notices. Probably can be ignored
Title: Re: Plugin warnings for Gateway status
Post by: franco on December 22, 2022, 08:35:44 pm
Where was the log output copied from? It's not a "warning" either, not by syslog priority nor by content.

It's about https://github.com/opnsense/core/commit/b493c543039d but the message was always there as a debug message. Since it didn't go into the log because the minimum level is notice it now goes into the log by magic of log_msg().

I'm not convinced the log messages in plugins.inc hold any value, but so far it was discussed to keep them and make them visible.


Cheers,
Franco
Title: Re: Plugin warnings for Gateway status
Post by: FullyBorked on December 22, 2022, 08:40:47 pm
Where was the log output copied from? It's not a "warning" either, not by syslog priority nor by content.

It's about https://github.com/opnsense/core/commit/b493c543039d but the message was always there as a debug message. Since it didn't go into the log because the minimum level is notice it now goes into the log by magic of log_msg().

I'm not convinced the log messages in plugins.inc hold any value, but so far it was discussed to keep them and make them visible.



Cheers,
Franco

I see then in System > Logfile > General.  Yes they are labeled as notice not warning.  I hadn't seen them before, is the reason I posted.   

Edit: I use the syslog widget to get a quick view of the log file to see if anything is there I should take notice of, this log spam fills up that widget so any useful log is pushed off quickly.  Otherwise it seems harmless.
Title: Re: Plugin warnings for Gateway status
Post by: franco on December 22, 2022, 08:52:53 pm
The commit can very likely be reverted with the patch:

 # opnsense-patch b493c543039d

I'm not sure what we will do but I can bring it up for when we start planning for 22.7.11.


Cheers,
Franco
Title: Re: Plugin warnings for Gateway status
Post by: FullyBorked on December 22, 2022, 08:55:40 pm
The commit can very likely be reverted with the patch:

 # opnsense-patch b493c543039d

I'm not sure what we will do but I can bring it up for when we start planning for 22.7.11.


Cheers,
Franco

Personally for me it's not that big of a deal.  Might look into filtering that widget though.  It has a filter option but I'm not sure how it works.  I'll mess with that and see if I can filter by log level. 
Title: Re: Plugin warnings for Gateway status
Post by: ColeTrain on January 22, 2023, 01:20:46 am
still gettin em
Title: Re: Plugin warnings for Gateway status
Post by: franco on January 22, 2023, 02:49:01 pm
I'll bring up the topic in our final 23.1 talk on Monday. But keep in mind this is purely cosmetic (and yes nothing changed so everything is still as it was).


Cheers,
Franco
Title: Re: Plugin warnings for Gateway status
Post by: Fright on January 23, 2023, 06:57:54 am
@FullyBorked
can you test log widget with the
Code: [Select]
opnsense-patch -a kulikov-a 626651eapplied, please?
(https://github.com/kulikov-a/core/commit/626651e)
widget was refactored before the RFC5424 migration and i would be happy to add an severity filter if @franco doesn't mind )
Title: Re: Plugin warnings for Gateway status
Post by: franco on January 23, 2023, 12:00:48 pm
Spurious logging from plugins_run() will be removed in 23.1: https://github.com/opnsense/core/commit/7248a47143f


Cheers,
Franco
Title: Re: Plugin warnings for Gateway status
Post by: FullyBorked on January 23, 2023, 05:26:13 pm
@FullyBorked
can you test log widget with the
Code: [Select]
opnsense-patch -a kulikov-a 626651eapplied, please?
(https://github.com/kulikov-a/core/commit/626651e)
widget was refactored before the RFC5424 migration and i would be happy to add an severity filter if @franco doesn't mind )

I installed it but doesn't look like I can see any option other than debug.  See attached screenshot.

Title: Re: Plugin warnings for Gateway status
Post by: Fright on January 23, 2023, 07:06:35 pm
oops. I'm sorry, I completely forgot that I'm testing on a "gridstack.js" lobby.. :-[
opnsense-patch -a kulikov-a 7ea01a3
(don't revert previous)
(https://github.com/kulikov-a/core/commit/7ea01a3)
shoud make this work
sorry
Title: Re: Plugin warnings for Gateway status
Post by: FullyBorked on January 23, 2023, 07:23:41 pm
oops. I'm sorry, I completely forgot that I'm testing on a "gridstack.js" lobby.. :-[
opnsense-patch -a kulikov-a 7ea01a3
(don't revert previous)
(https://github.com/kulikov-a/core/commit/7ea01a3)
shoud make this work
sorry

No worries, that final patched worked as expected.  This is a fantastic addition, thank you for working on that. 
Title: Re: Plugin warnings for Gateway status
Post by: Fright on January 23, 2023, 07:40:20 pm
thanks! I'll try to make a pr )