opnsense / core

OPNsense GUI, API and systems backend
https://opnsense.org/
BSD 2-Clause "Simplified" License
3.35k stars 751 forks source link

Monit status widget does not update properly on new dashboard #7669

Closed mgittelman closed 3 months ago

mgittelman commented 3 months ago

Important notices

Before you add a new report, we ask you kindly to acknowledge the following:

Describe the bug

The green circles on the left next to each item do not update if an alert has failed.

To Reproduce

Steps to reproduce the behavior:

  1. Add the monit widget
  2. Add a monit test service that works such as ping external site
  3. Check dashboard to make sure the monit widget item is green
  4. Create condition where test service fails, such as changing ping IP to one that is un=pingable
  5. Check monit dashboard again to see if the status has changed.

Expected behavior

The green circles next to each item being monitored by monit on the dashboard should turn red in the case of a failure in the service being monitored. Additionally, when I hover my mouse over the green circles, if an alert has failed it just says "undefined" instead of "ok." The hover over text should say "failed"

Screenshots In the screenshot, the item "Test_Ping_Check" has failed and you can see the mouseover is showing "undefined"

image

Relevant log files

N/A

Additional context

N/A

Environment

OPNsense 24.7_5-amd64 (amd64). Intel i3-9100f Supermicro X11SCL-IF

Monviech commented 3 months ago

When the ping does not work, its status in the API shows as "status":"16384"

Since this is not mapped in the widget, it goes to undefined.

I'm working on a fix.