I was able to hook in nans ( to group the alerts ) in Nagios, but initially I got an email from NANS first time and then never got them.
I tried debugging but no luck. In nans there are two perl scripts -
The collate replaces your unix mail/sendmail client in nagios config and the aggregate is run from cron which collects and sends out the grouped emails.
Collate ran first time I restarted Nagios but hasnt been running since. Ran in debug mode but it seems Nagios hasnt even called collate.
I have noticed that nagios runs fine in standalone mode but if you hook in more external programs it doesnt behave well. Please let me know if someone has faced similar issue and can help!
Here is the link to nans -