Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to use aggregate data from custom script made for ambari alert ?

How to use aggregate data from custom script made for ambari alert ?

New Contributor

I am working on making custom alerts for apache Ambari so I want to get the script data of each of my data nodes and use the aggregated data to make my own script based alert.?

4 REPLIES 4

Re: How to use aggregate data from custom script made for ambari alert ?

Super Collaborator

Can you provide more details about what you want to be alerting on? When you say "script data from your datanodes", what are you referring to?

In general, the only data which can be passed to a custom script alert are the configurations of the cluster. The script alert would then take whatever configurations it needs and then check "something". If you need to pull data from all of your DataNodes, that could be quite a bit of work depending on the size of the cluster.

Re: How to use aggregate data from custom script made for ambari alert ?

New Contributor

@Jonathan Hurley

Sir we are trying to make an alert which will notify us when cluster level CPU usage go upto certain percentage.?

I have successfully created a script which got the CPU usage of each data node as ambari alert. Now we want to get those value in one place so that we can aggregate it and make it as cluster level CPU-usage. Please help me out.

Re: How to use aggregate data from custom script made for ambari alert ?

Super Collaborator

Aggregation of this data is really a metrics-related concern. The alerts framework won't aggregate data for you. It sounds like you've defined a host-alert which can get the CPU usage of each DataNode. That host alert can trigger if the CPU usage is above a set threshold. You can create an "AGGREGATE" alert type which will essentially look for a percentage of problems across the cluster.

For example, let's say you define a host-level alert and have it set to be 80% for WARN and 90% for critical. You would define an AGGREGATE alert which says that when X alerts are triggered, I will trigger. If you set this to be 20%, then in a cluster of 10 hosts, when 2 of them have CPU levels above the thresholds, it will fire.

If you wanted to have a single alert against an aggregate value, then you'd need to feed the CPU usage data into Ambari Metrics somehow. Once it's in there, you could query it with another custom alert.

Re: How to use aggregate data from custom script made for ambari alert ?

New Contributor
@Jonathan Hurley

my cluster discription I have two Datanodes (no other component on them except datanode and nodemanagers) and a master node (a higher config machine) containing the YARN/HDFS and other master components.

Don't have an account?
Coming from Hortonworks? Activate your account here