handle NMS unresponsiveness

API timeout is 18 seconds, 20 second sleep and 1 retry for a total of 56
seconds (just within the 60 seconds Nagios timeout).
Tested with "setup appliance NMS restart" which it now successfully
survives.