Start by downloading the owners manual and the parts books from the NL web site. These are both important to have on hand.
The OM shows the wiring. The gray wire is the fault shutdown circuit. There are three safety switches daisy chained together with the gray wire, and if any of those switches detects a fault it grounds the gray wire and shuts down the generator. The three switches are 1) low oil pressure, 2) high coolant temp, and 3) high exhaust temp. Don't confuse these safety switches with the oil pressure and coolant temp senders which are used for the gauges.
Given the location, that is probably the connection for the oil pressure switch. Someone disconnected it because the switch is defective, or they were diagnosing an issue and forgot to reconnect it. First locate the switch, which can be in different locations depending on the configuration of the generator. The parts book shows the locations. You can test the oil pressure switch with a meter. The electrical connection point should have continuity to ground when the generator is off, and when it's running it should be open. You could also test by starting the generator and while it's running, touch the gray wire ring terminal to the terminal on the oil pressure switch. If the engine shuts down then the switch is defective and should be replaced.
Either way, it's an important safety switch and is worth the time to get it working properly.