Released on Oct 18, 2024
- New
- Fixed
- Enhanced
Changes Version 4.3.1
This is a minor bug fix and improvement release.
- New Environment Variables: Added two new environment variables for use by Alert Service and Alert Program scripts.
MONIT_TIMESTAMP
contains the event timestamp in UTC (seconds) and can be used by your script to display a date in a different time zone than MONIT_DATE, which contains a date string in the M/Monit server's local time.MONIT_STATE
represents the event state, where 0 = Success, 1 = Failed, 2 = Changed, and 3 = Initial/Other. By examining this value, the script can determine whether it was triggered due to an error or a successful event. - Dark/Light Theme: To allow all users on the system, including non-admin users, to change the M/Monit theme, we have moved appearance settings from admin/settings to admin/user. Click on a user to select the theme for the M/Monit application. Choose "Auto" to follow the system's dark or light mode settings, or manually set the theme to "Light" or "Dark" based on your preference. The appearance setting is stored in your browser's local storage.
- Execute Program: Failed if M/Monit was using the PostgreSQL database. The following error was displayed: Scheduler: task Command processor: SQLException: ERROR: invalid input syntax for type integer: "...script...".
- Host Detailed Status: The Parent PID value was missing in the Process callout menu.
- Plus other minor improvements and fixes.
New installation
- Download the release for your OS.
- Unpack the tar.gz file in a directory; any directory will do, but unpacking in /opt or /usr/local are good choices. Example:
tar -xzf mmonit-4.3.1-linux-x64.tar.gz
- Go to the unpacked mmonit-4.3.1 directory:
cd mmonit-4.3.1
- Optional: Change the default account's password using:
./bin/mmonit-admin password admin ./bin/mmonit-admin password monit
- Run M/Monit using:
./bin/mmonit
- Point your browser to the host where M/Monit is installed (or "localhost" if running on the same machine), for example: http://localhost:8080/ and log in as user admin with password swordfish (or the password that was set using mmonit-admin).
- If you want to set up M/Monit to use MySQL or PostgreSQL instead of the default SQLite database, follow these instructions in the wiki.
- More documentation can be found inline in the application and in the manual (PDF).
- Troubleshooting: If M/Monit does not appear to run, investigate the error.log in the logs directory. You can also run M/Monit in the foreground and in diagnostic mode by starting M/Monit with the -id options. In diagnostic mode, M/Monit will print errors and debug information to the console. Use CTRL+C to stop M/Monit in this mode.
Upgrading from previous M/Monit releases (2.3 or later)
The upgrade program can be used to automatically copy database and configuration files from the previous installation and update the database schema. On macOS upgrading is not needed as the installer will upgrade M/Monit in /usr/local/mmonit automatically.
The whole upgrade process should take less than a minute, and you do not have to stop or change Monit on other machines during this process. Monit will simply pick up and start reporting to the new M/Monit 4.3.1 version.
- Download the new 4.3.1 release for your OS.
- Install M/Monit 4.3.1 in the same directory as the previous release. For example:
/usr/local/mmonit-4.2.2 /usr/local/mmonit-4.3.1
- Stop the previous M/Monit release:
/usr/local/mmonit-4.2.2/bin/mmonit stop
Or if you monitor M/Monit via Monit:
monit stop mmonit
- Run the upgrade program and specify the path to the previous M/Monit release:
/usr/local/mmonit-4.3.1/upgrade/upgrade -p /usr/local/mmonit-4.2.2
- Start M/Monit 4.3.1:
/usr/local/mmonit-4.3.1/bin/mmonit
- Finally, clear your browser cache before accessing M/Monit 4.3.1.