generalize the max retries rule
optional hostname