I didn’t find an internal way to do this but am still interested. Got a tip that Ambari supports SPNEGO. So am using that now :)
-- Sean Roberts @seano From: Sean Roberts <srobe...@hortonworks.com> Date: Thursday, January 18, 2018 at 6:56 PM To: "user@ambari.apache.org" <user@ambari.apache.org> Subject: Re: Hit Ambari API from an Ambari Alert? Gonzalo – Thanks. I’ve seen for grabbing metrics and configs. But in my case I need to submit POSTs to Ambari. Or can we submit to Ambari in other ways. An example would be hitting /api/v1/ldap_sync_events and the user management APIs. -- Sean Roberts @seano From: Gonzalo Herreros <gherre...@gmail.com> Reply-To: "user@ambari.apache.org" <user@ambari.apache.org> Date: Thursday, January 18, 2018 at 6:48 PM To: "user@ambari.apache.org" <user@ambari.apache.org> Subject: Re: Hit Ambari API from an Ambari Alert? Hi Sean, You are not meant to do that. The scripts are not really called from Ambari server which is a Java process but from Python scripts invoked by the agent. If you need config from ambari, you can in your script ask ambari to pass it to you. If you need some metrics to validate, you can define then in the descriptor including the validations and error messages (or as a last result talk directly to Ambari Metrics which doesn't have user/password) Have a look at some existing service that has something similar like what you trying to do. Regards, Gonzalo On 18 January 2018 at 14:57, Sean Roberts <srobe...@hortonworks.com<mailto:srobe...@hortonworks.com>> wrote: Ambari folks – Within a service we have an ALERT which uses a SCRIPT. The script talks to the Ambari API (GET and POST). Currently we are providing credentials for the script to talk to the Ambari API. Is it possible for Alerts, of the WEB or SCRIPT type, to be authenticated automatically since they are being called from Ambari? -- Sean Roberts