No Image

MySQL syslog tűzfal trigger

2010.10.13. legyes 0

delimiter // create trigger tr_syslog before insert on logs for each row begin IF (NEW.host = ‘10.1.12.218’) THEN INSERT INTO cisco_wlc (host,facility,priority,level,tag,datetime,program,msg,seq) VALUES (NEW.host,NEW.facility,NEW.priority,NEW.level,NEW.tag,NEW.datetime,NEW.program,NEW.msg,NEW.seq); DELETE FROM logs WHERE seq=NEW.seq LIMIT 1; END if;