Configure data inputs (Rsyslog, Filebeat, or Winlogbeat)
Configure a data input for streaming log messages to your ServiceNow instance using an Rsyslog, Filebeat, or Winlogbeat agent.
Before you begin
- You must have an installed and configured MID Server with the log ingestion capability enabled.
- If the MID Server IP address is exposed by network address translation (NAT), a load balancer, or a similar device, it must have a public IP address. In the MID Server properties, add a property named mid.public_ip with the public IP address as the value. For more information, see Create a MID Server property.
- For information about shipping your logs encrypted using SSL TLS, see the Streaming Data With Rsyslog & Filebeat Using SSL [KB0866319] article in the Now Support Knowledge Base.
Role required: evt_mgmt_admin
Procedure
- Navigate to All > Health Log Analytics > Data Input > Data Inputs.
- On the Data Inputs page, select New.
-
Choose the data input type to create from the available data input types
described in the table.
Note:The selected data input type complements the passive data input (listener). For more information, see Supported data inputs.
Table 1. Data input types Type Description Rsyslog Streams log messages from UNIX-based servers to the ServiceNow AI engine using the Rsyslog agent. Linux using Filebeat Streams system log messages and local files from Linux servers to the instance using the Filebeat agent. Windows Application Logs using Filebeat Streams local files from Microsoft Windows devices to the ServiceNow instance using the Filebeat agent. Windows OS using Winlogbeat Streams Windows event logs to the ServiceNow instance using the Winlogbeat agent. -
On the Getting Started tab, fill in the form.
For a description of the fields, see Rsyslog, Filebeat, or Winlogbeat data input configuration fields.
Note:When creating a data input for Linux using Filebeat, you can select a content pack from the Content pack drop-down. The content pack contains default source types and mapping script templates that save you the time it takes to create them from scratch. For more information, see Health Log Analytics content packs for quicker time to value. -
If the agent has not already been installed, download and install it from the
Installation tab.
Note:Make sure that you’re running the latest version of the agent. Earlier versions will work, but with limited functionality.
-
On the Tagging and Binding tab, assign logs to an
application service in the Configuration Management Database (CMDB) to
enable the service to correlate the log data and enable the system to do root
cause analysis.
-
For each source, configure the path and application service for the
logs to be streamed.
Note:By default, only the required fields Path and Application Service appear.
For a description of the fields, see Rsyslog, Filebeat, or Winlogbeat data input configuration fields.
-
If you want to ship multiline logs using Filebeat, configure the
properties that control how Filebeat handles messages that span multiple
lines of text.
Field Description Match Specifies how Filebeat combines matching lines into an event. Negate Defines whether the pattern identified in the log lines is negated. Regex Specifies the regular expression to match. Note:Health Log Analytics currently doesn't support multiline properties for Rsyslog. - Optional:
Define additional log paths to enable the data input to stream log
types from multiple paths.
Do the following for each additional log path:
- Insert a new row.
- Configure the log path.
- Choose an application service.
- (Optional) Choose a component and a source type.
Note:This option is not available or necessary when using Winlogbeat, because Health Log Analytics streams the Windows event logs.
-
For each source, configure the path and application service for the
logs to be streamed.
-
On the Finish tab, complete the configuration for your
data input type.
-
Rsyslog:
- Download the configuration file and install it on the endpoint
device, in the /etc/rsyslog.d/rsyslog.conf
directory.Note:If you are using the Health Log Analytics application, Version 20.0.11 - July 2021, available from the ServiceNow Store , do the following instead:
- On the endpoint device, install the configuration file in the /etc/rsyslog.d/ directory.
- Create a spool directory by running the
sudo mkdir -p/var/spool/rsyslogcommand.
- Validate the configuration by running the
rsyslogd -N1command and verify the output. - Restart Rsyslog by running the
sudo systemctl restart rsyslogcommand. - Verify the output. If it contains errors, check the /var/log/messages system log file for error messages and fix the errors.
- Download the configuration file and install it on the endpoint
device, in the /etc/rsyslog.d/rsyslog.conf
directory.
-
Linux using Filebeat:
- Download the configuration file and install it on the endpoint device, in the /etc/filebeat/ directory.
- Start the agent service by running the
sudo service filebeat startcommand.Note:The generated configuration ignores files that were last changed more than six hours ago. If needed, you can change this setting in the configuration. - Restart the agent service by running the appropriate command.
-
Windows using Beats (Filebeat or
Winlogbeat):
- Download the configuration file and install it on the endpoint device, in the C:\Program Files\ directory.
- Start the agent service by running the appropriate command in
PowerShell.
- Filebeat:
PS > Start-Service filebeat - Winlogbeat:
PS > Start-Service winlogbeat
Note:The generated configuration ignores files that were last changed more than six hours ago. If needed, you can change this setting in the configuration. - Filebeat:
- Restart the agent service by running the appropriate command.
-
Rsyslog:
-
Select Save.
Health Log Analytics adds the data input record to the Data Inputs table.
-
Ensure that the data input is configured correctly by selecting Test
connection.
Health Log Analytics tries to connect the MID Server to the data repository.
- If the connection was established, the Test connection button is turned off and the Publish button is enabled.
- If the connection failed, the reason for the failure displays in the
Error message field. This field displays only
when a streaming error has occurred.
Resolve the issue, select Save if you modified the configuration, and then select Test connection to test the connection again.
Note:You can only publish the data input configuration when the connection is created successfully.
Note:You can revert to the last published configuration by selecting Revert Changes. This option is available only when you're modifying a configuration that has been published previously. - Select Publish to publish the data input to the MID Server.
Result
The configuration file is attached to the record. The data input starts streaming logs.