Even though the OPs issue was a bad fuel filter, like others mentioned, bad fuel probably takes out more generators. Given most all on board gas gennys run off the vehicle fuel tank and running non ethanol gas in a big gas hog is anything but economical, it would be beneficial to put a valve on the gas line if there isn’t one, and run it dry it out of service for a while.
For portable engines, the easy button if inconvenient to run it dry is use a fuel stabilizer, non ethanol or aviation fuel. With av gas being the best solution for long term storage.