The following tables list the available macros:
![]() |
Warning |
|---|---|
These macros are available only in the syslog-ng Agent for Windows. To recognize Windows-specific elements of the log message (e.g., eventlog-related macros) on the syslog-ng server, you have to use parsers on the syslog-ng server. The parser must be configured to match the message format set in the syslog-ng Agent. See Section 3.8, “Parsing messages” for details. |
![]() |
Note |
|---|---|
Note that if you use the Syslog protocol template (meaning that messages are sent using the IETF-syslog protocol), only the message part of the log message can be customized, the structure of the headers and other information is fixed by the protocol. |
By default, syslog-ng Agent uses the following format:
<${PRI}>${BSDDATE} ${HOST} ${APP_NAME}[${PROCESS_ID}]:
${MESSAGE}, where $MESSAGE is
${EVENT_USERNAME}: ${EVENT_NAME} ${EVENT_SOURCE}: [${EVENT_TYPE}]
${EVENT_MSG} (EventID ${EVENT_ID}) for eventlog messages, and
$FILE_NAME: $FILE_CURRENT_POSITION/$FILE_SIZE:
$FILE_MESSAGE for file messages.
| Macro | Description |
|---|---|
| HOST | Name of the host sending the message. Hostnames are automatically converted to lowercase. |
| MESSAGE | The content of the message, including the text of the message and any file- or event-specific macros that are set for the source. |
| MSG | An alias for the MESSAGE macro. |
| PRI | Priority header of the message, storing the facility and the level of the message. |
Table 5.1. Protocol-related macros of the syslog-ng agent
Table 5.2. Time-related macros of the syslog-ng agent
| Macro | Description |
|---|---|
| EVENT_CATEGORY | The category of the event. |
| EVENT_FACILITY | The facility that sent the message. |
| EVENT_ID | The identification number of the event. |
| EVENT_LEVEL | Importance level of the message represented as a number: 6 - Success, 5 - Informational, 4- Warning, or 3 - Error). |
| EVENT_MESSAGE | The content of the message. |
| EVENT_MESSAGE_XML | Contains the entire message in XML format. Available only on Windows Vista and Server 2008 platforms |
| EVENT_MSG | The content of the message. This is an alias of the
EVENT_MESSAGE. |
| EVENT_NAME | Name of the Windows event log container (e.g., Application or Security). |
| EVENT_REC_NUM | The record number of the event in the event log. |
| EVENT_SID | The security identification number of the event. |
| EVENT_SID_TYPE | The security identification number resolved into name. One of the
following: User,
Group, Domain,
Alias
WellKnownGroup,
DeletedAccount,
Invalid, Unknown,
Computer. |
| EVENT_SOURCE | The application that created the message. |
| EVENT_TASK | The task category of the event. Available only on Windows Vista and Server 2008 platforms |
| EVENT_TYPE | The importance level of the message in text format. |
| EVENT_USERNAME | The user running the application that created the message. |
Table 5.3. Eventlog-related macros of the syslog-ng agent
| Macro | Description |
|---|---|
| FILE_CURRENT_POSITION | The position of the message from the beginning of the file in bytes. |
| FILE_FACILITY | The facility that sent the message. |
| FILE_LEVEL | Importance level of the message represented as a number: 6 - Success, 5 - Informational, 4- Warning, or 3 - Error). |
| FILE_MESSAGE | The content of the message. |
| FILE_MSG | The content of the message. This is an alias of the
FILE_MESSAGE macro. |
| FILE_NAME | Name of the log file (including its path) from where the syslog-ng Agent received the message. |
| FILE_SIZE | The current size of the file in bytes. |
Table 5.4. File-related macros of the syslog-ng agent
© 2007-2010 BalaBit IT Security
Please send your comments or documentation bugs to: documentation@balabit.com