Creating XML body for alerts , basic alerts

can someone help me with some alerts basicially

when a node is down

when a interface is down

when component is down

when a hardware component is down

can i get xml if i am using send/post html action or email action 

i tried the sample package for some reason its not working 

for some i am getting same xml code in pagerduty 

some of the nodes are failing while simulating 

i need some general xml which will show the alert , node or component and  and some additional details

----------------

and also how can i resolve it automatically if its resolved in pagerduty