var result = [];

if (value === "deprecated") {
	result = [{
		"replica_key": "slave",
		"replica_name": "Slave",
		"source_key": "master",
		"source_name": "Master"
	}];
} else {
	try {
		value = JSON.parse(value);
		if (value.length > 0) {
			result = [{
				"replica_key": "replica",
				"replica_name": "Replica",
				"source_key": "source",
				"source_name": "Source"
			}];
		}
	}
	catch (error) {
		Zabbix.log(3, "MySQL replica status ERROR: " + error);
	}
}

return JSON.stringify(result);