Microsoft Azure Sentinel is Microsoft's native cloud based SIEM solution. Beside Microsoft's own cloud services, it can accept log messages from external sources. Microsoft provides 26 predefined Data connectors and a HTTP Data Collector API for further integrations. Using this public HTTP REST interface, syslog-ng Premium Edition (syslog-ng PE) can ingest log messages directly to Microsoft Azure Sentinel cloud using the http() destination driver.
For more information about Microsoft Azure Sentinel, see Microsoft Azure: Azure Sentinel documentation.
For more information about Data connectors used in Microsoft Azure Sentinel, see Microsoft Azure: Connect data sources.
|
Caution:
Hazard of data loss!
The sentinel() destination's fields() parameter is optional and has the following default values: fields("Computer=$HOST HostName=$HOST ProcessID=$PID SyslogMessage=$MSGHDR$MSG Facility=$FACILITY SeverityLevel=$LEVEL HostIP=$SOURCEIP EventTime=$S_ISODATE")
Although it is possible to customize these default values, an incorrect configuration may result in log loss. Therefore, One Identity recommends that you do not customize the default values of the fields() parameter unless you know exactly what you are doing. |
Limitations
The current implementation of the sentinel() destination has the following limitations:
-
Only the PUT and the POST methods are supported.
-
HTTPS connections, as well as password-based and certificate-based authentication, are supported.
-
If the server returns a status code beginning with 4 (for example, 404) to the POST or PUT request, syslog-ng PE drops the message without attempting to resend it.
NOTE: Typically, only the central syslog-ng PE server uses this destination. For more information on the server mode, see Server mode.
Declaration
destination d_sentinel {
sentinel(
workspace-id("<MS provided Workspace ID / UUID>")
auth-secret("<MS provided Shared key / Secret>")
);
}
Starting with version 7.0.19, syslog-ng Premium Edition (syslog-ng PE) can ingest log messages directly to Microsoft Azure Sentinel by using Microsoft Azure Sentinel's public HTTP Data Collector API interface.
The syslog-ng PE application can directly post log messages to the Microsoft Azure Sentinel cloud using the http() destination driver.
While configuring your Microsoft Azure Sentinel Workspace according to the Microsoft Azure Sentinel: Quickstart: On-board Azure Sentinel guide's Connect data sources section, you will find certain credentials of the selected Microsoft Azure Sentinel Workspace (namely, WORKSPACE ID and PRIMARY KEY) that you should make a note of. The WORKSPACE ID and PRIMARY KEY credentials are required so that syslog-ng PE can authenticate to Microsoft servers.
To gather the required credentials to configure syslog-ng PE as a Data connector for Microsoft Azure Sentinel,
- Log in to your Microsoft Azure Sentinel account, then navigate to Dashboard > Azure Sentinel workspaces.
- Select the workspace you want to use, then under the selected workspace, select Data Connectors.
-
Select Syslog from the list of connectors.
A new panel will open on the right.
- Select Open connector page from the new panel on the right.
- Navigate back to Dashboard > Azure Sentinel workspaces > Azure Sentinel - Data connectors > Syslog.
- Under Instructions, select Open your workspace advanced settings configuration.
- Navigate to Dashboard > Azure Sentinel - Data connectors > Syslog > Advanced settings.
- Copy the following information from Connected Sources > Linux Servers:
-
WORKSPACE ID
In the syslog-ng PE configuration, this will function as the workspace-id parameter.
-
PRIMARY KEY
In the syslog-ng PE configuration, this will function as the auth-secret parameter.
Example: Using Azure Sentinel credentials in the sentinel() destination
In your syslog-ng PE configuration, you can use the credentials you have gathered like this:
d_sentinel {
sentinel(
workspace-id("01234567-89ab-cdef-0123-456789abcdef") // Provided by Microsoft: unique hexadecimal number, identifying your Sentinel instance.
auth-secret("MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWYwMTIzNDU2Nzg5YWJjZGVmMDEyMzQ1Njc4OWFiY2RlZgo=") // Provided by Microsoft: Base64-encoded secret, identifying your application.
# optional
log-type("Syslog_CL")
);
};
|
Caution:
Hazard of data loss!
The sentinel() destination's fields() parameter is optional and has the following default values: fields("Computer=$HOST HostName=$HOST ProcessID=$PID SyslogMessage=$MSGHDR$MSG Facility=$FACILITY SeverityLevel=$LEVEL HostIP=$SOURCEIP EventTime=$S_ISODATE")
Although it is possible to customize these default values, an incorrect configuration may result in log loss. Therefore, One Identity recommends that you do not customize the default values of the fields() parameter unless you know exactly what you are doing. |
On the Microsoft Azure Sentinel user interface, you can filter log events by referring to log-type parameters. Although the log-type parameters query information with their custom query language (namely, Kusto), they are essentially table fields in a database.
For more information about log-type parameters, see Microsoft Azure: Write data to Log Analytics repository.
For more information about the Kusto query language, see Microsoft Azure: Query Language: Overview.
The log-type parameter is mandatory for the Microsoft Azure Sentinel HTTP Data Collector API interface, and for syslog-ng Premium Edition (syslog-ng PE), its default value is Syslog_CL.
NOTE: While Microsoft Azure Sentinel accepts log events from external sources, it also has built-in log types. To differentiate external and built-in log types, Azure Sentinel automatically applies the Custom Log-type (_CL) suffix to log events that originate from external sources. Although the log-type parameter is optional (unlike workspace-id and auth-secret, which are mandatory), keep in mind that Microsoft Azure Sentinel will automatically attach the _CL suffix to all log events originating from external sources. For example, log events that originate from syslog-ng PE will be named Syslog_CL by default.
NOTE: If you want to store messages in different log types that all connect to the same workspace-id, you can create multiple sentinel() destinations that have a common workspace-id, but different log-type parameters.
Example syslog-ng PE message
When forwarding messages to Microsoft Azure Sentinel, syslog-ng PE automatically populates the following fields:
{
"SyslogMessage": "<34>Oct 11 22:14:15 sentineluser prog1: message_begin 2020-02-10 08:29:02:329951-default message_end\n",
"SeverityLevel": "notice",
"ProcessID": "",
"HostName": "myhost",
"HostIP": "127.0.0.1",
"Facility": "user",
"EventTime": "2020-02-10T09:29:48+01:00",
"Computer": "ubuntu"
}