Yes, it is necessary for boilers and DG Sets to be inspected every year.
Actually they are completely different requirements.
1. If it's a boiler under Indian Boilers Act, then inspection is every year and you need to check the boiler license for details of who to apply
2. If it is a smaller boiler then it is a pressure vessel under factories act. The inspection is to be done every 6 months external inspection, 12 months internal inspection and 2 years hydrolic / ultrasonic inspection.
3. D g sets inspected annually. Contact the electrical inspector or the state electrical department. Again, all the details are on your DG license