In this book it states on page 217 that:
Patton developed a great and lingering suspicion during this period [him being stationed in Hawaii] that the Japanese not only sought war with the Unites States-noting their stunning victory against the czar's fleet in the Russo-Japanese War-but also intended a sneak attack on Pearl Harbor. Patton noticed that Japanese migrant farmers had established shacks near important inlets and installations. Whenever Japanese ships arrived for visits, reported Patton's daughter, the officers would visit the little farm shacks ostensibly because they would have relatives there. It was a poor reflection on U.S. at the time that such information wasn't forthcoming from intelligence personnel.
Patton was incredulous because he knew that under the Japanese caste system naval officers were highly unlikely to have peasants for relatives. "All these things he reported to Military Intelligence from where it disappeared into the vast maw of Washington unnoticed.
How accurate was Patton here? Would it be unusual for naval officers to have relatives who would be migrant farmers during this time? Were his suspicions ever confirmed or investigated by anybody?
So there was in fact a Japanese intelligence operation running in Hawaii, out of the Consulate in Honolulu. But it was more or less restricted to staff assigned from Japan to the consulate. Either specially assigned diplomatic corps members as collateral duties, or in the run up to war in 1940/41 at least one medically retired young Naval officer selected for the purpose. Local Japanese Americans were in large part kept out of the actual gatherings of intelligence, though as several were routinely employed as errand boys, drivers, clerks, and in general supplementary labor a few were of material aid to the staff's efforts. Nor did they have to be very furtive about their efforts, though the staff was conscious to never seem obvious, to not keep set patterns, or get too close to the Naval Base in particular. But it is in clear view of most of Honolulu or Pearl City, it is a simple thing even today to go up to an upper floor of a building with good site lines and see which ships are in and which are out. In 1941 for instance a Japanese tea parlor with an upper room and good view was used, including placing a telescope in it.
But part of the reason for sending a naval officer clandestinely was in the first place that the Home Islands were unhappy with the quality of intelligence they were getting. An untrained diplomat is unlikely to notice the little things, or even properly identify what ship types he is looking at. While the fact is an enormous % of the islands population was of Japanese descent, if there were people living somewhere chances are a few of them were going to be Japanese. While the plan to actually attack Japan only moves from fever dreams to actually possible in 1940 and early 1941 when Yamamoto begins serious consultations with a series of trusted officers. Until then it was considered essentially impossible and not worth the effort by and large. While Japan was certainly preparing and contemplating for war with the US, attacking Pearl was not really in the picture seriously or as a full thrust until the year or so before the attack when the capabilities and expertise in the IJN matured enough to tackle the problems of such an operation.
Those discussions are what prompted the dispatch of the officer, named Takeo Yoshikawa to Hawaii, where he also cooperated with another staff member of the Consulate Kokichi Seki who had attended Etajima(Japan's Naval Academy). In particular Richard Kotoshirodo was the main duel citizen who was of aid to them, as one the main drivers on staff to chauffeur them around. Though the men also went to the extent of chartering sight seeing aircraft for aerial views of the harbor and other bases on Oahu. However as mentioned the in general large exclusion of locals was not just for operational security against too large a force. The men had their doubts as to their willingness to act of their supposed loyalty to the Emperor, and did not wish to risk that much in the tension filled months of mid 1941 on what they thought an unreliable group.
We should also note two additional factors that made intel collection efforts before late 1940, early 1941 a lower priority. The first being that while Patton was there(two tours one in the late 20's the second mid 30's till 1937) it was simply not as active a base as it would become. Facilities were limited, and only a handful of ships were home ported there as the 'Hawaiian Detachment' with the main body still based out of San Diego. During the Summer the near entirety of the fleet would gather for the annual Fleet Problems either in the Caribbean or Hawaii for several weeks of exercises before breaking off into the constituent squadrons again. This and whenever other squadrons rotated through to Pearl represented the peak of activity at the base. It was not until the Fall of 1940 that FDR made the decision that the main body of the fleet should remain in Hawaii indefinitely as its new main base. In response to tensions in Asia as a deterrent to Japan(this of course also prompts greater efforts by Japan to monitor the fleet). While these comings and going were also routinely reported upon in local papers too, one didnt generally need to try very hard to know what the fleet was up to before the war.
It is older but At Dawn We Slept by Gordon Prange is still one of the key works on Pearl and dedicates considerable time to examining the efforts at Japan to develop and use an intel gathering network in Hawaii.