Sagging rafters may be the result of having framed the roof with lumber of dimensions smaller than current building standards such as using 2x4s or 2x6 s or there may be damage to the framing from insects or rot.
Roof sagging near chimney.
Fixing a truss or rafter.
Also inspect the metal or plywood gusset plates used where your wood meets on a truss look for damage that includes cracks rot breaks and any other impairment.
Some roof framing designs include the use of a strut or beam that runs perpendicular across the bottom of the rafters inside the attic.
Because where the chimney comes through there is going to be some framing that takes the flooring around that and that s probably the reason that the floor is sinking in the area of the chimney and walls that are resting on that floor would move accordingly.
Common flaws include undersized rafters insufficient sheathing or too few rafter or collar ties.
Sagging sheathing between rafters may be due to rot delamination use of fiberboard or other materials that may not perform well over the life of a home or due use of too thin plywood roof decking to start with.
Causes of chimney failure.
A chimney that is leaning away from a house or appears to be falling onto a yard indicates foundation issues.
Keep your attic well insulated and ventilated to prevent ice dams which can cause roof leaks.
To determine what is causing your chimney to lean take a look at the angle.
Grab a flashlight and head up to your attic to inspect your roof rafters and decking specifically those where your roof is sagging.
Sagging ceiling could be an indication of framing issues some of which could be related to the roof.
Weight related sagging can also be caused by design flaws that leave the roof unable to support its own weight.