WebHDFS (om_webhdfs)
|
This module is being phased out and will be removed in a future release. Use an external script instead. |
This module allows logs to be stored in Hadoop HDFS using the WebHDFS protocol.
Configuration
The om_webhdfs module accepts the following directives in addition to the common module directives. The File and URL directives are required.
Required directives
The following directives are required for the module to start.
This mandatory directive specifies the name of the destination file. It must be a string type expression. If the expression in the File directive is not a constant string (it contains functions, field names, or operators), it will be evaluated before each request is dispatched to the WebHDFS REST endpoint (and after the Exec is evaluated). Note that the filename must be quoted to be a valid string literal, unlike in other directives which take a filename argument. |
|
This mandatory directive specifies the URL of the WebHDFS REST endpoint where the module should POST the event data. The module operates in plain HTTP or HTTPS mode depending on the URL provided, and connects to the hostname specified in the URL. If the port number is not explicitly indicated in the URL, it defaults to port 80 for HTTP and port 443 for HTTPS. |
HTTPS directives
The following directives configure secure data transfer via HTTPS.
Set this directive to |
||||||||||||||||
Set this directive to |
||||||||||||||||
Set this directive to |
||||||||||||||||
Set this directive to the path of a directory containing Certificate Authority (CA) certificates.
The module uses these certificates to verify the certificate presented by the remote host.
Name the certificate files using the OpenSSL hashed format: the hash of the certificate followed by
For example, if the certificate hash is To trust a remote host’s self-signed certificate, include a copy of it in this directory. If this directive isn’t specified, NXLog Agent falls back to the default operating system root certificate store.
Unix-like operating systems commonly store root certificates in In addition, Microsoft’s PKI repository contains root certificates for Microsoft services. This directive is mutually exclusive with the HTTPSCAThumbprint, HTTPSCAPattern, and HTTPSSearchAllCertStores directives. |
||||||||||||||||
Set this directive to the path of the Certificate Authority (CA) certificate used to verify the certificate presented by the remote host. To trust a remote host’s self-signed certificate, specify the remote host’s certificate itself. For certificates signed by an intermediate CA, the specified certificate must contain the complete certificate chain (certificate bundle). This directive is mutually exclusive with the HTTPSCAThumbprint, HTTPSCAPattern, and HTTPSSearchAllCertStores directives. |
||||||||||||||||
Set this directive to a PCRE2-compliant regular expression to locate a suitable Certificate Authority (CA) certificate. This directive is supported on Windows and macOS. On Windows, the certificate must be in the Windows Certificate Store. On macOS, the certificate must be in the system keychain. NXLog Agent matches the pattern against a string built from the certificate’s fields in this order:
The pattern doesn’t need to match every field.
Include only the fields you want to match, and use For example, the following pattern matches only the
This produces the following output in the NXLog Agent log file:
If the pattern matches multiple certificates, NXLog Agent uses the first match. If the certificate changes, restart NXLog Agent to apply the new certificate. This directive is mutually exclusive with the HTTPSCAThumbprint, HTTPSCADir, HTTPSCAFile, and HTTPSSearchAllCertStores directives.
|
||||||||||||||||
Set this directive to the thumbprint of the Certificate Authority (CA) certificate used to verify the certificate presented by the remote host. This directive is supported on Windows and macOS. On Windows, copy the hexadecimal fingerprint string from Windows Certificate Manager (certmgr.msc). The certificate must be in a Windows certificate store accessible by NXLog Agent. On macOS, obtain the hexadecimal fingerprint string from the Keychain Access application. The certificate must be accessible in the system keychain. Whitespaces and colons are automatically removed. This directive is mutually exclusive with the HTTPSCADir, HTTPSCAFile, HTTPSCAPattern, and HTTPSSearchAllCertStores directives.
|
||||||||||||||||
Set this directive to the path of the certificate file to present to the remote host during the HTTPS handshake. |
||||||||||||||||
Set this directive to the path of the private key file corresponding to the certificate specified by HTTPSCertFile. |
||||||||||||||||
Set this directive to a PCRE2-compliant pattern to identify the certificate and its corresponding private key. This directive is supported on Windows and macOS. NXLog Agent matches the pattern against a string built from the certificate’s fields in this order:
The pattern doesn’t need to match every field.
Include only the fields you want to match, and use On Windows, import the certificate in PFX format into the On macOS, ensure the certificate and its private key are present in the System Keychain ( During configuration, NXLog Agent resolves this directive into the corresponding HTTPSCertThumbprint value. If the pattern matches multiple certificates, NXLog Agent uses the first match. This directive is not dynamic; restart NXLog Agent to apply a changed certificate. We recommend keeping the certificate storage referenced by this directive well-maintained for optimal performance. This directive is mutually exclusive with the HTTPSCertThumbprint, HTTPSCertFile and HTTPSCertKeyFile directives. Configuration examples:
or
This produces the following output in the NXLog Agent log file:
|
||||||||||||||||
Set this directive to the thumbprint of the certificate to present to the remote host during the HTTPS handshake. Whitespaces and colons are automatically removed. This directive is supported on Windows and macOS. On Windows, copy the hexadecimal fingerprint string from Windows Certificate Manager (certmgr.msc).
Import the certificate to the
When the global directive UseCNGCertificates is set to
When UseCNGCertificates is set to On macOS, obtain the hexadecimal fingerprint string from the Keychain Access application.
The certificate and its associated private key must be present in the System Keychain ( For example:
|
||||||||||||||||
Set this directive to the path of a directory containing certificate revocation list (CRL) files.
The module uses these files to reject connections from hosts presenting a revoked certificate.
Name the files using the OpenSSL hashed format: the hash of the issuer followed by
For example, if the hash is |
||||||||||||||||
Set this directive to the path of the certificate revocation list (CRL) file used to reject connections from hosts presenting a revoked certificate. To generate a CRL file using OpenSSL:
|
||||||||||||||||
Set this directive to the path of a file containing Diffie-Hellman parameters for key exchange. Generate the parameters using dhparam(1ssl). If this directive is not set, the module uses default parameters. See the OpenSSL Wiki for further details. |
||||||||||||||||
Set this directive to the passphrase of the private key specified by HTTPSCertKeyFile. This directive applies only to encrypted private keys. To generate a private key with Triple DES encryption using OpenSSL:
|
||||||||||||||||
Set this directive to This directive is only supported on Windows. |
||||||||||||||||
Set this directive to |
||||||||||||||||
Set this directive to |
||||||||||||||||
Set this directive to override the permitted cipher list for TLSv1.2 and below.
Use the format described in the ciphers(1ssl) man page.
For example, specify
|
||||||||||||||||
Set this directive to override the permitted cipher list for TLSv1.3. Use the same format as HTTPSSSLCipher. Refer to the OpenSSL documentation for a list of valid TLS v1.3 cipher suites. The default is:
|
||||||||||||||||
Set this directive to
|
||||||||||||||||
Set this directive to restrict the TLS/SSL protocols the module accepts.
Specify a comma-separated list of the following values: |
||||||||||||||||
Set this directive to This directive depends on the values of the HTTPSAllowUntrusted and HTTPSRequireCert directives:
|
||||||||||||||||
Set this directive to the signature algorithm parameter to pass to the Windows SSL library. Accepted values depend on the available encryption providers. This directive is only supported on Windows. |
||||||||||||||||
Set this directive to the hostname to use for Server Name Indication (SNI) in HTTPS mode. If not set, the module uses the hostname specified in the URL directive. |
||||||||||||||||
Set this directive to |
Optional directives
The module will send the data to the endpoint defined in URL after this amount of time in seconds, unless FlushLimit is reached first. This defaults to 5 seconds. |
|||
When the number of events in the output buffer reaches the value specified by this directive, the module will send the data to the endpoint defined in URL. This defaults to 500 events. The FlushInterval may trigger sending the write request before this limit is reached if the log volume is low to ensure that data is sent promptly. |
|||
This configuration option can be used to specify additional HTTP Query Parameters such as BlockSize. This option may be used to define more than one parameter:
|
|||
Set this directive to the number of seconds to wait between reconnection attempts. If you do not set this directive, the module starts with a 1 second interval and doubles it after each failed attempt, resetting to 1 second once it reconnects successfully.
|
|||
Set this directive to |
Examples
This example output module instance forwards messages to the specified URL and file using the WebHDFS protocol.
<Output hdfs>
Module om_webhdfs
URL http://hdfsserver.domain.com/
File "myfile"
QueryParam blocksize 42
QueryParam destination /foo
</Output>