syslog (System)
语法
syslog { allow-duplicates; alternate-format; archive { (binary-data| no-binary-data); files number; size maximum-file-size; (world-readable | no-world-readable); } console { facility severity; application-status (any | error); } file filename { allow-duplicates; archive { (binary-data| no-binary-data); files number; size maximum-file-size; start-time "YYYY-MM-DD.hh:mm"; transfer-interval minutes; (world-readable | no-world-readable); } archive-sites [url <password password>]; facility severity; explicit-priority; match "regular-expression"; match-strings [match-strings...]; structured-data { brief; } } grpc-replay; host (hostname | other-routing-engine | scc-master) { facility severity; allow-duplicates; exclude-hostname; explicit-priority; facility-override facility; log-prefix string; match "regular-expression"; match-strings [match-strings...]; routing-instance routing-instance-name; source-address source-address; structured-data { brief; } port port-number; tlsdetails { local-certificate; mutual-authentication { certificate-authority; } trusted-ca-group [trusted-ca-group-name]; } transport; } log-rotate-frequency frequency; routing-instance routing-instance-name; server { routing-instances (routing-instance-name | all | default) { disable; } } shell; source-address source-address; time-format (millisecond | year | year millisecond); user (username | *) { allow-duplicates; facility severity; match "regular-expression"; match-strings [match-strings...]; } }
层次结构级别
[edit system]
描述
配置系统日志消息类型以发送到不同的目标,例如文件、远程目标、用户终端或系统控制台。
其余陈述详见其他陈述。
选项
archive | 定义用于存档日志消息的参数。 |
allow-duplicates | 允许所有目标的重复日志消息。 |
alternate-format | 配置为将节点名称附加到守护程序名称。 |
console | 向控制台发送指定等级和严重性的日志消息。 |
file | 将日志消息发送到命名文件。 |
host | 远程位置,以便接收特定日志消息的通知。 |
log-rotate-frequency | 配置用于检查日志文件大小和存档消息的时间间隔。 |
server | 在 App Engine 中为计算节点和 VM 启用 syslog 服务器。 |
shell | 配置为记录从 shell 执行的命令。 |
source-address | 包括指定的地址作为日志消息的源地址。 |
time-format | 要包含在系统日志时间戳中的其他信息。
|
user | 将日志事件通知特定用户。 |
所需权限级别
system - 在配置中查看此语句。
system-control - 将此语句添加到配置中。
发布信息
在 Junos OS 7.4 版之前引入的语句。
在 Junos OS 演化版 20.4R2 中引入的选项 alternate-format
。
在 Junos OS 演化版 23.1R1 中引入的选项 shell
。
application-status
在 Junos OS 演化版 23.1R1 中引入的选项。