Mercurial > hg > nginx-site
annotate xml/en/docs/syslog.xml @ 2943:0f468b4e01d6
njs-0.7.11.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Thu, 09 Mar 2023 22:20:24 +0000 |
parents | 4add6ae1296f |
children | 9eadb98ec770 |
rev | line source |
---|---|
1285
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1 <?xml version="1.0"?> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
3 <!-- |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
4 Copyright (C) Nginx, Inc. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
5 --> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
6 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
7 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd"> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 <article name="Logging to syslog" |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 link="/en/docs/syslog.html" |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 lang="en" |
1923
66a30a380fba
Fixed links to tools.ietf.org.
Ruslan Ermilov <ru@nginx.com>
parents:
1621
diff
changeset
|
12 rev="6"> |
1285
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
13 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 <section> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 <para> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 The |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
18 <link doc="ngx_core_module.xml" id="error_log"/> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
19 and |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 <link doc="http/ngx_http_log_module.xml" id="access_log"/> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 directives support logging to syslog. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 The following parameters configure logging to syslog: |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 <list type="tag"> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 <tag-name><literal>server=</literal><value>address</value></tag-name> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 <tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 Defines the address of a syslog server. |
1621
54fa47139017
Made the syslog:server= description more like in upstream server.
Ruslan Ermilov <ru@nginx.com>
parents:
1589
diff
changeset
|
28 The address can be specified as a domain name or IP address, |
54fa47139017
Made the syslog:server= description more like in upstream server.
Ruslan Ermilov <ru@nginx.com>
parents:
1589
diff
changeset
|
29 with an optional port, or as a UNIX-domain socket path |
54fa47139017
Made the syslog:server= description more like in upstream server.
Ruslan Ermilov <ru@nginx.com>
parents:
1589
diff
changeset
|
30 specified after the “<literal>unix:</literal>” prefix. |
54fa47139017
Made the syslog:server= description more like in upstream server.
Ruslan Ermilov <ru@nginx.com>
parents:
1589
diff
changeset
|
31 If port is not specified, the UDP port 514 is used. |
1285
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 If a domain name resolves to several IP addresses, the first resolved |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 address is used. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 </tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 <tag-name><literal>facility=</literal><value>string</value></tag-name> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 <tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
38 Sets facility of syslog messages, as defined in |
2831
4add6ae1296f
Updated links to datatracker.ietf.org.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1923
diff
changeset
|
39 <link url="https://datatracker.ietf.org/doc/html/rfc3164#section-4.1.1">RFC 3164</link>. |
1285
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
40 Facility can be one of “<literal>kern</literal>”, “<literal>user</literal>”, |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 “<literal>mail</literal>”, “<literal>daemon</literal>”, |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 “<literal>auth</literal>”, “<literal>intern</literal>”, |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
43 “<literal>lpr</literal>”, “<literal>news</literal>”, “<literal>uucp</literal>”, |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 “<literal>clock</literal>”, “<literal>authpriv</literal>”, |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 “<literal>ftp</literal>”, “<literal>ntp</literal>”, “<literal>audit</literal>”, |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 “<literal>alert</literal>”, “<literal>cron</literal>”, |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
47 “<literal>local0</literal>”..“<literal>local7</literal>”. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 Default is “<literal>local7</literal>”. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
49 </tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
50 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
51 <tag-name><literal>severity=</literal><value>string</value></tag-name> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
52 <tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
53 Sets severity of syslog messages for |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
54 <link doc="http/ngx_http_log_module.xml" id="access_log"/>, |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 as defined in |
2831
4add6ae1296f
Updated links to datatracker.ietf.org.
Sergey Kandaurov <pluknet@nginx.com>
parents:
1923
diff
changeset
|
56 <link url="https://datatracker.ietf.org/doc/html/rfc3164#section-4.1.1">RFC 3164</link>. |
1285
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 Possible values are the same as for the second parameter (level) of the |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 <link doc="ngx_core_module.xml" id="error_log"/> directive. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 Default is “<literal>info</literal>”. |
1574 | 60 <note> |
61 Severity of error messages is determined by nginx, thus the parameter | |
1572
8df0327a1c87
The "severity" syslog parameter is not supported in "error_log".
Vladimir Homutov <vl@nginx.com>
parents:
1466
diff
changeset
|
62 is ignored in the <literal>error_log</literal> directive. |
8df0327a1c87
The "severity" syslog parameter is not supported in "error_log".
Vladimir Homutov <vl@nginx.com>
parents:
1466
diff
changeset
|
63 </note> |
1285
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
64 </tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
65 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
66 <tag-name><literal>tag=</literal><value>string</value></tag-name> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
67 <tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
68 Sets the tag of syslog messages. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
69 Default is “<literal>nginx</literal>”. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
70 </tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
71 |
1589
be92e50c52ac
Documented the "nohostname" syslog option.
Vladimir Homutov <vl@nginx.com>
parents:
1574
diff
changeset
|
72 <tag-name><literal>nohostname</literal></tag-name> |
be92e50c52ac
Documented the "nohostname" syslog option.
Vladimir Homutov <vl@nginx.com>
parents:
1574
diff
changeset
|
73 <tag-desc> |
be92e50c52ac
Documented the "nohostname" syslog option.
Vladimir Homutov <vl@nginx.com>
parents:
1574
diff
changeset
|
74 Disables adding the “hostname” field into the syslog message header (1.9.7). |
be92e50c52ac
Documented the "nohostname" syslog option.
Vladimir Homutov <vl@nginx.com>
parents:
1574
diff
changeset
|
75 </tag-desc> |
be92e50c52ac
Documented the "nohostname" syslog option.
Vladimir Homutov <vl@nginx.com>
parents:
1574
diff
changeset
|
76 |
1285
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 <!-- |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 <tag-name><literal>bare=</literal><literal>on</literal> | |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 <literal>off</literal></tag-name> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 <tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 If enabled, messages are sent without syslog headers. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 Default is <literal>off</literal>. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 </tag-desc> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
84 --> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 </list> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
87 Example syslog configuration: |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
88 <example> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
89 error_log syslog:server=192.168.1.1 debug; |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
90 |
1589
be92e50c52ac
Documented the "nohostname" syslog option.
Vladimir Homutov <vl@nginx.com>
parents:
1574
diff
changeset
|
91 access_log syslog:server=unix:/var/log/nginx.sock,nohostname; |
1285
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
92 access_log syslog:server=[2001:db8::1]:12345,facility=local7,tag=nginx,severity=info combined; |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
93 </example> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
94 </para> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
95 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
96 <para> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
97 <note> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
98 Logging to syslog is available since version 1.7.1. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
99 As part of our |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
100 <commercial_version>commercial subscription</commercial_version> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
101 logging to syslog is available since version 1.5.3. |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
102 </note> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
103 </para> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
104 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
105 </section> |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
106 |
4e89518a5999
Moved syslog configuration details into the separate documents.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
107 </article> |