A couple of rules I have that have worked for me so far is:
Colleagues, tasks, compensation - if at least two of the three are good, it's fine to stay. If not it's time to look for something new.
The first year is a learning year, the second is a productive year, and the third is a "what else can I get out of this place" year. If nothing changes in the third year, then there's not much more to learn from the company and it's maybe time to move on.