If the roof is fairly new, it may be covered under the original installers warranty or the manufacturer.
If the roof is 20+ years old, it is bound to start having issues with water intrusion. Spending a thousand or more dollars to fix a problem may not be worth it, when spending $7K to $10K to replace brings peace of mind.
We just replaced our roof last September after I noticed leaks coming from an improperly flashed section. Our home is 33 years old and in the early 2000's when it was time to replace the cheapo three tab shingles from the original roof, the home owner just slapped on a second layer without a tear off. While that is allowed according to code, it doesn't make the roof last as long and it doesn't fix underlying issues from the original roof.