ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Quiroga <quirogadf4w...@gmail.com>
Subject Re: How to get active metric collector hostname in alert script?
Date Sat, 14 Jul 2018 16:35:05 GMT
>From what I understand config is a member variable of the Script class
(resource_management.libraries.script).
A service script (install/configure/start/stop) creates a class inherited
from the Script, which makes config available there.
That is to say config is not a library that can be imported and called.

I believe alert scripts themselves don't instantiate any classes, they rely
on common function naming.

Not too helpful in this case, but just a note that the host the alert is
running on is exposed via the host_name parameter in the execute function,
at least when the alert is triggered by Ambari Server.
def execute(configurations={}, parameters={}, host_name=None):

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message