New viewlog output limit suggestion

Issue #999 new
Lutz Mader created an issue

Hello Tildeslash,
a question/suggestion, with Monit 5.29.0 the viewlog output is limited to 1 MB.

Snippet from cervlet.c file:

// Limit for the viewlog response
#define VIEWLOG_LIMIT 1048576

Issue #972, "HTTP interface: "There is no service named _viewlog"",
see https://bitbucket.org/tildeslash/monit/commits/bfcf020db1e6

A plan to add a "set limit" statement to increase/modify the hard coded limit. From my point of view the limit is very small. To show the 1 MB tail of the log file is more useful than the beginning.

With regards,
Lutz

Comments (2)

  1. Tildeslash repo owner

    Good point, i agree with both (add the “set limit” option for viewlog + show log tail instead of head)

  2. Lutz Mader reporter

    Hello Tildeslash,
    thanks for your agreement.

    A internal function to rotate the used log files by monit itself will be nice too.

    On the other hand, a simple “check file” service to monitor and rotate the log file works well. Or "syslog.d" will do the job, if necessary.

    With regards,
    Lutz

  3. Log in to comment