Hmac hash log integrity check


I'm using graylog with filebeats.

each line of log has a hash appended at the end. the hash is supposed to be used for data integrity check.

Is there a way for the filebeats harvester to check and match the log data by hmac hashing?
e.g. hash_hmac('sha256', $logdata, $key);