The cluster signals in Ambari,
the details in each service.
How to combine metrics, alerts, interfaces, logs, and auditing to monitor TDP Datacenter and investigate the behavior of the services.
Topics on this page
- Cluster and service metrics
- Operational interfaces
- Logs and execution history
- Access auditing
- Alerts and recovery verification
Cluster and service metrics
Ambari gathers host and service indicators.
Ambari Metrics provides components for collecting and storing metrics and includes Grafana, with dashboards integrated with this infrastructure.
Reading trends and comparing equivalent periods covers CPU and memory, disk space and I/O, network traffic, HDFS capacity and application resource usage.
The set of metrics depends on the integrations of each service.
Hosts
Physical resources
CPU, memory, disk and network pressure, related to the processes running on each machine.
Data
Storage state
HDFS capacity, available nodes and replication indicators.
Execution
Applications and queues
YARN queue demand and job duration, compared with the resources actually used.
Ambari dashboard, service pages and Grafana dashboards, when configured. Details in Apache Ambari.
Operational interfaces
The cluster view in Ambari is the starting point, and the interface of each component helps locate the affected execution.
The Ambari Quick Links lead to the interfaces published for the service.
| Question | Interface or source |
|---|---|
| Are the service and its components started? | Ambari: services, components and hosts. |
| Which queue holds waiting applications? | ResourceManager and YARN scheduler information. |
| Which stage took the longest in Spark? | Application interface and Spark History Server, with event logs enabled. |
| What is the state of capacity and DataNodes? | NameNode interface and HDFS indicators in Ambari. |
| Which flow accumulated data? | NiFi interface. |
| Which pipeline task failed? | Airflow interface and logs. |
Logs and execution history
Logs help relate a symptom to the process and the machine involved.
Time, application and host are the references for comparing records from different components.
In YARN, log aggregation, enabled in Ambari (yarn.log-aggregation-enable), gathers the records of the application containers and keeps them for the retention period configured in yarn.log-aggregation.retain-seconds.
In Spark, event logs, enabled in Ambari (spark.eventLog.enabled), are stored in HDFS (spark.eventLog.dir), from where the History Server reads them. They preserve information about jobs and stages and serve a different purpose from the process error logs.
Spark history cleanup, also configurable in Ambari (spark.history.fs.cleaner.enabled), removes event logs older than the age defined in spark.history.fs.cleaner.maxAge.
In Ambari operations, the tasks of each request show the output and errors of the execution, which helps locate installation, configuration and restart failures.
Log retention and collection are defined according to the team's needs.
YARN → Configs, log aggregation; Spark3 → Configs, spark.eventLog.enabled and the event log directory; log settings of each service.
Access auditing
The investigation of data usage starts from the audit records of the services and of the enabled Ranger plugins.
User, resource, operation, decision and time can be related to the records of the application that made the request.
This trail depends on the audit destinations enabled in each service and on the delivery of the events.
The records of Knox and of the services themselves complement the investigation of the paths that do not go through the same plugin.
Ranger Admin and logs of the services involved. Audit destinations in Security model.
Alerts and recovery verification
Ambari has alert definitions to monitor processes, endpoints and service conditions, such as the DataNode process, NameNode high availability health and storage usage.
The definitions can be enabled or disabled, with their own thresholds and intervals, and notifications are configured in Ambari itself.
Each installed service brings its own alert definitions in Ambari.
Some definitions evaluate the service as a whole, such as the percentage of available DataNodes, and others evaluate each host, such as the health of each NodeManager.
| Service | Examples of alert definitions |
|---|---|
| HDFS | NameNode High Availability Health · Percent JournalNodes Available · HDFS Capacity Utilization |
| YARN | Percent NodeManagers Available · NodeManager Health · ResourceManager Web UI |
| ZooKeeper | Percent ZooKeeper Servers Available |
| Spark3 | Spark3 History Server |
| Ambari Metrics | Metrics Collector Process · Grafana Web UI |
An alert is the start of the investigation: an unavailable process, a delayed heartbeat or an almost full volume each call for different actions.
After the intervention, the service state, the metrics and an operation representative of real usage confirm the recovery.
Ambari alerts and notifications area. During maintenance, the interpretation of alerts takes the planned window into account, without skipping the verification that the services have recovered.
Scenario: slower reports at month-end closing
Situation: during month-end closing, reports start taking longer.
What TDP does: the Grafana dashboards integrated with Ambari Metrics narrow down the period, and the YARN ResourceManager shows the queues and the waiting applications.
The Spark History Server, fed by the event logs, makes it possible to compare the stages of the executions, the aggregated YARN logs gather the container records of the affected applications, and Ambari gathers the CPU, memory and disk metrics of the hosts.
Effect: the team locates the cause from the signals already gathered in Ambari and in the service interfaces.
After addressing it, the team repeats a representative workload and tracks the same indicators to confirm the recovery.