- A specification of the check-log plugin is to check for differences between monitored log files and record the file’s read position (number of bytes) in json format.
- If this json file becomes corrupted, it will not be able to be read at the next check and an Unknown alert reading
unexpected end of JSON input
will occur.
- File corruption is often caused by the server restarting. We recommend updating the plugin regularly as the latest version has made improvements in this regard.
- To get rid of this alert, the corrupted JSON file that caused the alert must be deleted. JSON files are created in the following path.
Linux
/var/tmp/mackerel-agent/check-log/<monitored file path>-<hash string>.json
Windows
%TEMP%\check-log\<monitored file path>-<hash string>.json
- For example, if
/var/log/foo.log
is being monitored on a Linux host, the JSON file will be /var/tmp/mackerel-agent/check-log/var/log/foo.log-<hash string>.json
.
- For Windows Server hosts, this is recorded under the directory indicated by the system environment variable TEMP.
- Please check and see if the problem can be resolved by deleting the above file or changing the extension.