应用平台 APPSTAGE-常用监控插件说明:osinfo

时间:2024-08-29 19:07:18

osinfo

插件类型

OS

功能说明

osinfo插件采集操作系统相关信息。

使用该插件要求/etc/nsswitch.conf文件有读权限,且其中hosts的解释项不能使用dns,即cat /etc/nsswitch.conf | grep "^hosts:" | grep dns命令返回应为空。"running"/"sleeping"/"stopped"/"zombie",全部进程数total与top命令输出的结果一致;最大文件打开数max_opens、最大进程数max_procs与ulimit -u、ulimit -n命令输出一致;本机当前打开的句柄数open_files与lsof|wc –l命令输出一致。open_files的获取每180秒只采集并上报一次,对于那些没有采集open_files的周期,该指标不出现在消息中。

原始数据来源:/proc/stat

参数配置

不需配置。

消息样例及含义说明

{
"plugin_id": "osinfo",
"metric": {
       "node": " host-10-33-0-188",             #单位: | 类型:string  | 说明:主机名,消息来源标识
       "timestamp": 1482161028000, 	        #单位: | 类型:long    | 说明:UTC时间戳
       "ctx": "245480",			        #单位: | 类型:int     | 说明:本周期上下文切换次数
       "procs": "1032",			        #单位: | 类型:int     | 说明:采集周期内新增的任务总数
       "blocked": "0",			        #单位: | 类型:int     | 说明:当前被阻塞的任务数
       "running": "0",	                        #单位: | 类型:int	| 说明:当前R状态的进程数(top: running)
       "sleeping": "882",			#单位: | 类型:int 	| 说明:当前D状态的进程数(top: sleeping)
       "stopped": "1",				#单位: | 类型:int 	| 说明:当前T状态的进程数(top: stopped)
       "zombie": "1"				#单位: | 类型:int 	| 说明:当前Z状态的进程数(top: zombie)
       "procs_total": "884",			#单位: | 类型:int 	| 说明:当前总进程数(top: Tasks)
       "max_opens": "1024",			#单位: | 类型:int 	| 说明:执行ulimit -n结果
       "max_procs": "2059087",		        #单位: | 类型:int 	| 说明:执行ulimit -u结果
       "open_files": "2059087",		        #单位: | 类型:int 	| 说明:本机当前打开的句柄数
}
}
support.huaweicloud.com/usermanual-wiseeye/appstage_04_1249.html