内置保留字段 本文主要介绍云日志服务的内置保留字段。 在云日志服务采集日志时,会将采集规则名称、采集时间、采集文件名称、主机IP等信息以KeyValue对的形式添加到日志中,这些字段是云日志服务的内置字段。 云主机接入场景 日志示例 如下是一条云容器引擎场景接入的日志,message 字段值是日志原文,其他字段是常见的一些内置保留字段。 plaintext { "tagfileName": "/root/zhl/als/testjiagong.log", "taghostIp": "192.168.0.7", "taghostName": "ecmc013", "ts": "20240612 14:48:13.000", "message": "171817442520240612 14:40:25 DEBUG 58a21b1616554e499c0f88b087992434" } 内置保留字段说明 内置保留字段 数据格式 说明 tagtopic 字符串 采集配置名称 tagfileName 字符串 采集路径与文件名称 taghostIp 字符串 云主机接入场景下,云主机的IP地址 taghostName 字符串 云主机接入场景下,云主机的名称 ts 整型,Unix时间戳(毫秒) 日志采集时间 message 字符串 日志原文 云容器引擎接入场景 日志示例 如下是一条云容器引擎场景接入的日志,message 字段值是日志原文,其他字段是常见的一些内置保留字段。 plaintext { "ts": "20240611 02:45:23", "randomnum": "7439", "msg": "It does not matter how slowly you go as long as you do not stop. Confucius", "tagappName": "hostpathjson", "taghostName": "ccseagentvmdmcnj0p0", "tagcontainerName": "container1", "tagfileName": "/var/log/als/file/output/randomjsonfile20240611.log", "level": "WARN", "taghostIp": "192.168.0.14", "tagpodIp": "172.16.168.127", "tagnamespace": "ruleverifynamespace", "tagpodName": "hostpathjson59d88dbd9fbksr6", "ts": "20240611 10:45:23.000", "message": "{"ts": "20240611 02:45:23", "randomnum":7439, "level": "WARN", "msg": "It does not matter how slowly you go as long as you do not stop. Confucius"}" }