I want to get an alert message to an email whenever name goes to safe mode. Can we achieve this with Cloudera Manager (Administration > Alerts).
By default CM will throw an alert on CM->HDFS ->status page when the namenode is in Safe Mode.
NameNode Safemode Health Test -
|Enables the health test that the NameNode is not in safemode|
You can configure email Alert, using the below
Let me know if that helps.