My client use a CDN on their website. Sometimes the CDN is not properly working and images aren't loading.
Can I automatically get a notification whenever the CDN is not working properly? The client is using Pagely.
How to get notifications on if a CDN is still online largely depends on the CDN and how they publish outage information. Some have a status site that you can see (but may or may not be able to subscribe to notifications on), others send out an email to account holders, and others still have no notifications at all. Regarding Pagely specifically since that is the CDN provider you have mentioned they appear to have a status site located at http://status.pagely.com/ however I have been unable to find any way within the status site to subscribe to notifications for outages.
As you mention there have been multiple times where the CDN has gone offline I would tend to recommend changing CDN providers as the point of a CDN isn't just to provide static content closer to the end user for site speed reasons but also to provide redundancy so that a server outage doesn't bring the whole site crashing down. Pagely advertises that they are providing WordPress hosting and so the CDN aspect is only one part of what they do and that they are hosting in the Amazon Web Services Cloud. If issues continue to be experienced you may be in a position to get better service by hosting the site directly through AWS instead of going through Pagely but that would be something that you would have to decide upon based on if the impact from the outages outweighs the benefits of having a managed WordPress hosting service.
Get another server and install something like Zabbix, PRTG or IPHost and make a sensor to check a http get with response validation. Have it poll the image and report back to you with success, performance warning or down.