HTTP interface: "There is no service named _viewlog"

Issue #972 resolved
Ulrich Windl created an issue

When I click on “View Monit logfile?” in the HTTP interface, there is a lengthy delay, the a window with an empty frame.

I see no error message in the local monit.log (defined as set log /var/log/monit/monit.log) at that time.

After some delay I see the message “Not found” / “There is no service named “_viewlog””.

Then a `HttpRequest: error -- …` repeating the message above is logged in monit.log.

The probable cause is that (due to lacking a `logrotate` configuration) monit.log has 244 MB, while the Limit for HTTP content buffer is 1MB.

I wonder:

  1. Can’t there be a better error message like “log file content exceeds output buffer size”?
  2. Can’t there be a more clever algorithm like: Show just the head of the log file OR show just the tail of the log file OR show a combination like “head of log file” “tail of log file”

Comments (1)

  1. Tildeslash repo owner

    Fix Issue #972: Monit GUI: The log view had no limit when reading the Monit log file, so it may block the browser when the log file is very large. Also the _viewlog URL was not support via the HTTP GET method, so it returned the following error on refresh: 404 There is no service named "_viewlog"

    → <<cset bfcf020db1e6>>

  2. Log in to comment