It would be exceedingly challenging to determine whether or not all animals get bored, but it does appear that higher functioning animals can indeed experience boredom. Household pets such as dogs and cats, for example, often take extended naps apparently prompted by a lack of mental stimulation. Cats are especially prone to bouts of boredom, since they crave a significant amount of interaction with their owners throughout the day.
One reason determining if animals get bored or not is difficult is the tendency of human observers to assign human emotions and expressions to their non-human test subjects. Some animals may display a glassy-eyed stare or apparent disinterest in their outside environment, but this does not necessarily translate to the human concept of boredom. Some animals spend hours at a time simply waiting for a promising food source to arrive. While these animals may appear to be listless or disinterested, it might be more accurate to describe their state of mind as dormant or semi-conscious.
Other animals, especially those with higher functioning brains, can indeed become bored following an extended lack of mental stimulation. When higher functioning animals get bored, they may invent stimulating games or visit unexplored sections of their habitats. This behavior is remarkably similar to the pointless but mind-stimulating projects humans often engage in when faced with hours of inactivity.
Some may argue that an animal's attention span can be extremely short in general, which means what humans might consider signs of boredom may simply be a temporary lack of mental stimulation. While some animals may display signs of boredom, they may not actually have the capacity to form such a complex emotion. It is possible that many animals live more in a more delineated "excited/not excited" state of mind, which would still allow for a sense of boredom, but not the same sense of frustration humans associated with true boredom. When many animals get bored, they simply live in a disconnected emotional state until something new arrives to break the monotony. Animals living in zoos, for example, may sit quietly for hours until visitors arrive.