Is there any method of receiving notification when Maintenance Mode is Enter/Exit. The API provides methods to enable/disable but not get current state.
No such feature at this time.
Are you suggesting that the entry/exit would issue an alert via the Alert Publisher?
I'm happy to log a Jira to request a feature, but would like to make sure I capture what you envision.
Yes, that would be great. Possibly configure blackout period in hours, days to allow for maintenance and then automatically reenable itself. It should also capture user and display history of maint intervals.
I added you to an existing Jira requesting a timer to have maintenance mode expire.
The Jira also requests a history for maintenance mode.
For now, you can use the Cloudera Manager Audits tab to view mainatenance mode enter/exit.
Unfortunately, you cannot filter to only see maintenance mode sinc "operationtext" is not a filterable column.
You can download a CSV on that Audits page, though, and then sort/search on the operationtext column.
Thanks for your input!
i could see using API we can keep cluster to MaintenanceMode using below API's
curl -u 'admin:admin' -X post 'http://xxx.xxx.xxx.com:7180/api/v14/clusters/CDH_DEV/commands/enterMaintenanceMode'
curl -u 'admin:admin' -X post 'http://xxx.xxx.xxx.com:7180/api/v14/clusters/CDH_DEV/commands/exitMaintenanceMode'
Can we keep Cloudera Management Service to MaintenanceMode using APi's?
please advice , Thanks!
Yes, but it is only available in Cloudera Manager 5.13 and higher (supporting v18 or higher)
This is more of a curl/command line question.
You might do something like this:
# echo -n "password" > ~/cm_password
# curl -u admin:`cat ~/cm_password` -X GET http://cm_host:7180/api/version
There are other options like making it an environment variable possibly.
The password needs to be plain text when passed to Cloudera Manager. How you manage it before then is up to you.