if (value.length === 0) {
	return '[]';
}

try {
	var matches = value.match(/statement="show (slave|replica) status[\s\S]*(?:Master|Source)_Host[^>]*>([^<]+)</);

	if (matches && matches[1] && matches[2]) {
		return JSON.stringify([{
			statement: matches[1],
			master_host: matches[2].trim()
		}]);
	}

	return '[]';
}
catch (e) {
	Zabbix.log(4, 'Replication parser error: ' + e.message);
	return '[]';
}