Cloudera hadoop上的一些问题

来源:互联网 发布:新疆卫生系统网络直报 编辑:程序博客网 时间:2024/05/16 03:07

 

  1. 日志存放的原理

cloudera的日志一般都存放在/var/log里面

* zookeeper

* spark

* hive

* hadoop-hdfs

* hadoop-yarn

* cloudera-scm-server

* cloudera-scm-agent

 

http://blog.cloudera.com/blog/2009/09/apache-hadoop-log-files-where-to-find-them-in-cdh-and-what-info-they-contain/

 

日志都是由Hadoop守护进程来创建

    These logs are createdby the Hadoop daemons, and exist on all machines running at least one Hadoopdaemon. Some of the files end with .log, and others end with .out. The .outfiles are only written to when daemons are starting. After daemons have startedsuccessfully, the .out files are truncated. By contrasts, all log messages canbe found in the .log files, including the daemon start-up messages that aresent to the .out files. There is a .log and .out file for each daemon runningon a machine. When the namenode, jobtracker, and secondary namenode are runningon the same machine, then there are six daemon log files: a .log and .out forthe each of the three daemons.

 

the logs are stored in a few different places and retained for acertain amount of time (or forever). 

 

/etc/cloudera-scm-server/log4j.propertieslog4j的配置文件

 

各个组件安装的位置/opt/cloudera/parcels/CDH-5.12.0-1.cdh5.12.0.p0.29

 

log日志文件通过log4j记录的,大部分应用程序的日志消息都写到该日志文件中,故障诊断的首要步骤即为检查该文件。【此日志文件最重要】

out日志文件记录标准输出和标准错误日志,由于大多日志均使用log4j输出至log日志文件中,因此此文件很小或者为空。系统仅保留最新的5个日志。

 

 

计算机生成了可选文字:日 志 丨 输 入 搜 索 短 语 或 正 则 表 达 式 v 选 择 源 主 机 丨 输 入 主 机 名 称 其 他 最 低 日 志 级 别 WAR! Cloudera Management Service 》 Cloudera Management Service Cloudera Manag• 》 Cloudera M 厂 所 有 源 Cluster 1 》 HDFS 》 Hive 》 Hue 》 Spark 》 YARN (MR2 Included) 》 ZooKeeper

 

 

 

  1. 主机信息存放的地方,以及展示原理

查找到集群信息存储的位置 /var/lib/cloudera-scm-server/commands/55 /var/lib/cloudera-scm-server/commands/300

 

http://10.59.2.168:7180/api/v4/cm/deployment

返回配置信息

 

集群信息

http://10.59.2.168:7180/api/v13/clusters/

http://10.59.2.168:7180/api/v13/hosts

 

 

服务监控,主机监控,行为监控

 

也可以通过API访问CM获取主机配置信息, 服务的信息

 

通过tsquery language获取数据

内存使用状况信息http://10.59.2.168:7180/api/v13/timeseries?query=select%20physical_memory_used&from=2017-8-6&to=2017-8-9

 

其他信息描述

Python http://cloudera.github.io/cm_api/docs/python-client/

Java

  1. cloudera的报警机制,如何与公司的报警服务相对接

 

  •  报警机制

cloudera提供了一些报警服务,其中包括主机的运行情况,各组件的运行状况,日志和活动等信息,并且可以设置报警事件的阀值。

计算机生成了可选文字:警 报 收 件 人 编 辑 」 凵 N289@pingan.com/cn 发 送 测 试 警 报 0 报 警 运 行 状 况 以 外 的 转 换 的 警 报 : 否 运 行 状 况 警 报 阈 值 : Bad Failover Controller 运 彳 亍 状 况 HttpFSÉ 行 状 况 JournalNode 运 行 状 况 NFS Gatewayié 行 状 况 NameNode 运 行 状 况 运 行 状 况 SecondaryNameNode 服 务 运 行 状 况 运 行 状 况 DataNode Hive Metastore Se 丨 ve 彳 亍 状 况 运 行 状 况 HiveServer2 WebHCat Serve 彳 亍 状 况 服 务 运 行 状 况 警 报 类 型 运 行 状 况 hdfs hive hue mgmt OOZIe spark—on—yarn yarn zookeeper 主 机 活 动 HealthE 报 设 置 hdfs ( 编 辑 ) 警 报 启 用 对 象 警 报 用 对 象 hive 编 辑 ) 警 报 启 用 对 象 警 报 用 对 象

 

  • 邮件报警机制

可以配置邮件报警的方法进行报警

配置报警邮件的属性:

  • Display the Cloudera Management Service status page.
  • Click the Configuration tab.
  • Select Scope > Alert Publisher.
  • Select Category > Main to see the list of properties. To receive email alerts, you must set (or verify) the following settings:

Enable email alerts

Email protocol to use.

Your mail server hostname and port.

The username and password of the email user that will be loggedinto the mail server as the "sender" of the alert emails.

A comma-separated list of email addresses that will be therecipients of alert emails.

The format of the email alert message. Select json if you need themessage to be parsed by a script or program.

If more than one role group applies to this configuration, edit thevalue for the appropriate role group. See Modifying Configuration PropertiesUsing Cloudera Manager.

 

  • Click the Save Changes button at the top of the page to save your settings.
  • Restart the Alert Publisher role.

 

计算机生成了可选文字:筛 选 器 v 范 围 Cloudera Management Service Activity Monitor Event Server Host Monitor Monitor Alert Publisher Navigator Audit Server Navigator Metadata Server v 类 别 王 要 堆 栈 集 合 安 全 性 性 能 抑 制 数 据 库 端 囗 和 址 址 清 除 全 部 服 务 范 53 86 108 80 6 5 0 0 4 2 警 报 : 启 用 电 子 邮 件 警 报 警 报 : 邮 件 服 务 器 协 议 警 报 : 邮 件 服 务 器 主 机 名 称 警 报 : 邮 件 服 务 器 用 户 名 警 报 : 邮 件 服 务 器 密 码 警 报 : 邮 件 发 件 人 地 址 Alert Publisher Default Group Alert Publisher Default Group 回 smtp O smtPS Alert Publisher Default Group localhost Alert Publisher Default Group Alert Publisher Default Group Alert Publisher Default Group noreply@localhost 切 换 至 经 典 布 局 角 色 组 显 示 所 有 说 明 0

 

 

 

  • SNMP消息转发机制

 

此服务只在cloudera收费版中提供

 

https://www.cloudera.com/documentation/enterprise/5-11-x/topics/cm_ag_snmp.html

 

  • 设置alter脚本

 

此服务只在cloudera收费版中提供

 

https://www.cloudera.com/documentation/enterprise/5-11-x/topics/cm_ag_alert_script.html

 

 

API文档

http://cloudera.github.io/cm_api/javadoc/5.8.0/index.html

原创粉丝点击