i must monitoring my mail server and i'm doing this by background tail and parse postfix log so i know what i should to know about statistics of my mail server but it will be nice to configure and do it by iredadmin. it should be done - we are using iredmail and iredadmin pro from some years and i very like this software but lack of seriously monitoring is not good. Yes i know that there is better option to do this - snmptrap should be called directly from iredapd and as i heard there is possibility to write plugin to iredapd so maybe some day i do it in more elegant way.ītw: i saw that iredmail has registered oid so i think that there was an idea to implement snmp into iredmail. This external bash script do query to mysql about details: "SELECT throttle_tracking.account, throttle_tracking.cur_msgs, throttle.max_msgs, throttle.period, throttle_tracking.init_time, throttle_tracking.last_time FROM throttle_tracking INNER JOIN throttle ON throttle_tracking.tid = throttle.id WHERE throttle_tracking.id = $1 " and do snmptrap with all this informations to nms. Next i wrote a user defined function (send_to_nms) for using in mysql to execute external program (mysql do not allow to run external program for security reason) - it is written in c but its very simple - main routine is just starting external bash script in the background, passing to it id of record and immediately return (to not block table). If NEW.cur_msgs > 0.8 * max_msg_user then Select _msgs into max_msg_user from iredapd.throttle where = NEW.tid This trigger can looks like below (it is more complex in production - there is another table to set flags at 80%, 90% and 100% used quota so there can be only 3 traps sended to nms etc.): ![]() I created a trigger AFTER UPDATE ON `throttle_tracking` - if user reach a 80% of his limit (sended mails) procedure calls function send_to_nms.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |