creating nagios plugins and defining services

Hello friends,

i have essential nagios documents and some basic configuration documents but they dont meet my needs, so i would like to have a detailed, comprehensive documents that refers to pluggins, how to configure a complex nagios script as a service, maybe even how to trigger another script in error case or send sms in case of fatal. I would appreciate if you share anything usefull with me,
thanks in advance