<h2>Health Log Analytics</h2><br/><div style="overflow-x:auto"><div class="mce-toc"> <h2>Table of Contents</h2> <ul><li><a href="#mcetoc_1fs77hfe1c">Health Log Analytics Overview</a></li><li><a href="#mcetoc_1fs77is7c12">Overall Setup RoadMap</a></li><li><a href="#mcetoc_1fs77is7d13">Request Health Log Analytics Installation</a></li><li><a href="#mcetoc_1fs77is7d14">Setup MID Server</a></li><li><a href="#mcetoc_1fs77is7d15">Setup Data Input</a></li><li><a href="#mcetoc_1fs79c30h19">Log Processing</a></li><li><a href="#mcetoc_1fs77is7d16">Log Viewer</a></li><li><a href="#mcetoc_1fs77is7d17">Alerts</a></li><li><a href="#mcetoc_1fsoneitk8">Troubleshooting</a></li><li><a href="#mcetoc_1fsoneitk9">Additional Information</a></li></ul> </div> <h3 id="mcetoc_1fs77hfe1c">Health Log Analytics Overview</h3> <h4 style="padding-left: 40px;">What is Health Log Analytics (HLA)?</h4> <p style="padding-left: 40px;">An application which receives logs, processes logs, and makes such logs available for review on your ServiceNow instance. HLA collects metrics from the logs and detects anomalies. Alerts can be generated when deviations from normal behaviors are discovered. Once processed, the logs are available for review in the instance.</p> <p style="padding-left: 40px;">Health Log Analytics collects logs streaming into your ServiceNow instance from endpoints or data lakes, such as Splunk and Elasticsearch. The instance receives the logs via the MID Server connector instance. Health Log Analytics identifies and triages anomalies in your log data using unsupervised machine-learning (ML) models. It then groups the anomalies together and applies further algorithms to help identify the root cause of the issue.</p> <h4 style="padding-left: 40px;">Architecture</h4> <p style="padding-left: 40px;"><img src="sys_attachment.do?sys_id=36fde73c1bb981500b8a9979b04bcb0a" width="990" align="baseline" border="2" /></p> <h4 style="padding-left: 40px;">Log Flow</h4> <p style="padding-left: 40px;">The diagram shows the Health Log Analytics workflow from collecting the data through sending an event or alert to Event Management.</p> <p style="padding-left: 40px;"><img src="sys_attachment.do?sys_id=87dabb341b7d81500b8a9979b04bcb42" width="990" align="baseline" border="2" /></p> <h4 style="padding-left: 40px;">Components Overview</h4> <p style="padding-left: 40px;"><strong>Streaming Sources</strong></p> <p style="padding-left: 40px;">Streaming sources are the application/servers which send the logs to the MID server.</p> <p style="padding-left: 40px;"><strong>MID Server</strong></p> <p style="padding-left: 40px;">The MID Server is the "middle-man" which receives the logs from the streaming sources and forwards them to your ServiceNow instance.</p> <p style="padding-left: 40px;"><strong>Note:</strong> The MID server can use data input pre processors to modify raw log data, and drop or break up log messages, before they are processed by the log processing nodes. This happens before Health Log Analytics maps and structures the raw logs. See <a title="Edit raw log data before processing" href="https://docs.servicenow.com/search?q=Edit+raw+log+data+before+processing">Edit raw log data before processing.</a></p> <p style="padding-left: 40px;"><strong>Log Analytics Core Server</strong></p> <p style="padding-left: 40px;">This server/application receives the logs sent by the MID server and processes them. It will:</p> <ul><li style="list-style-type: none;"> <ul style="list-style-position: inside;"><li>Send the structured logs to the log Elasticsearch server</li><li>Detect anomalies and create alerts, em_alert</li><li>Log metrics to the Metrics server</li></ul> </li></ul> <h4 style="padding-left: 40px;">Elasticsearch</h4> <p style="padding-left: 40px;">The Elasticsearch server keeps the structured logs and makes them available for searches.</p> <h4 style="padding-left: 40px;">Time Series DB</h4> <p style="padding-left: 40px;">The time series DB keeps all the metrics extracted from the logs.</p> <h3 id="mcetoc_1fs77is7c12">Overall Setup RoadMap</h3> <ol style="list-style-position: inside;"><li>Request Health Log Analytics installation<br /> <ul style="list-style-position: inside;"><li><a title="Request Health Log Analytics installation" href="https://docs.servicenow.com/search?q=Request+Health+Log+Analytics+installation">Request Health Log Analytics installation</a></li></ul> </li><li>Configure the MID Server</li><li>Configure the data inputs</li></ol> <h3 id="mcetoc_1fs77is7d13">Request Health Log Analytics Installation</h3> <ol style="list-style-position: inside;"><li>Request Health Log Analytics installation<br /> <ul style="list-style-position: inside;"><li><a title="Request Health Log Analytics installation" href="https://docs.servicenow.com/search?q=Request+Health+Log+Analytics+installation">Request Health Log Analytics installation</a></li></ul> </li></ol> <h3 id="mcetoc_1fs77is7d14">Setup MID Server</h3> <ol style="list-style-position: inside;"><li>Open the MID Server which will be used to stream logs to</li><li>Select the related list "Capabilities"</li><li>Click "Edit"</li><li>Add the "Log Ingestion" capability and save<br /> <ul style="list-style-position: inside;" type="1"><li>Note: If the data inputs need to connect to the MID server via a public IP address, configure mid server property mid.public_ip</li></ul> </li></ol> <h3 id="mcetoc_1fs77is7d15">Setup Data Input</h3> <p style="padding-left: 40px;">Now that we have a MID server setup we can configure the data inputs.</p> <p style="padding-left: 40px;">Note: While configuring a data input we also configure what port the MID server will receive the data on</p> <p style="padding-left: 40px;">You can set up the data input process for Health Log Analytics in either of two ways:</p> <ul><li style="list-style-type: none;"> <ul style="list-style-position: inside;" type="disc"><li>Guided setup</li><li>Manually</li></ul> </li></ul> <p style="padding-left: 40px;">Guided setup: Provides a sequence of tasks that help you configure data inputs on your ServiceNow instance. Using the guided setup ensures that you have the minimum required setup for the data input process. For more information, see <a href="https://docs.servicenow.com/search?q=Set+up+data+inputs+using+guided+setup">Set up data inputs using guided setup</a>.</p> <p style="padding-left: 40px;">Manually: For more information, see <a href="https://docs.servicenow.com/search?q=Set+up+data+inputs+manually">Set up data inputs manually</a>.</p> <p style="padding-left: 40px;"><strong>Note:</strong> Regardless of how you choose to implement Health Log Analytics, you must first configure a MID Server and make sure its log ingestion capability is enabled.</p> <p style="padding-left: 40px;">The optional guided setup helps you create data input connectors for the following common data sources:</p> <ul><li style="list-style-type: none;"> <ul style="list-style-position: inside;" type="disc"><li>Rsyslog</li><li>Beats</li><li>Splunk</li><li>Elasticsearch</li><li>MID Server</li><li>TCP</li></ul> </li></ul> <h3 id="mcetoc_1fs79c30h19">Log Processing</h3> <h4 style="padding-left: 40px;">Structuring</h4> <p style="padding-left: 40px;">This layer deals with structuring log data and auto-mapping it to logical silos, called Components. Data structuring can be done automatically or manually.</p> <p style="padding-left: 40px;">The system auto-structures log data by extracting the following properties from incoming log messages: Message, Timestamp, Host, Severity, and External-IDs. It extracts explicit values, like "property-name" and "value is IP." and semantic ones such as length, number of English words, and variance.</p> <p style="padding-left: 40px;">Auto-mapping assigns log samples and metadata to the appropriate tags automatically. The system tries to map log lines by analyzing the source that streams the data. The mapping is based on agent hints and common transport header fields.</p> <h4 style="padding-left: 40px;">Enrichment</h4> <p style="padding-left: 40px;">This layer handles identifying the variable parts of a log message.</p> <p style="padding-left: 40px;">Health Log Analytics workflow: Enrichment</p> <p style="padding-left: 80px;"><img style="border: 2px solid black; align: baseline;" src="sys_attachment.do?sys_id=894fcefd1b710d500b8a9979b04bcb01" alt="sep 27 megatron sshd[7498]: WARN 192.168.118.1 port 48278 ssh2 - Failed password fol" width="660" height="143" align="baseline" border="2" /></p> <p style="padding-left: 40px;">It also identifies keywords and contextual properties. In the image above, "WARN" and "Failed" are the keywords to track. "User," "source IP," and "port" are the contextual properties.</p> <h4 style="padding-left: 40px;">Analysis</h4> <p style="padding-left: 40px;">In this layer, each log line is indexed. Health Log Analytics extracts properties from the inner log message that contribute to models of behavior that the system learns to expect. Anomalous behavior departs from this expected behavior. You can search for an event and its most significant properties for manual triaging.</p> <p style="padding-left: 40px;">Machine Learning (ML) and Artificial Intelligence (AI)</p> <p style="padding-left: 40px;">Health Log Analytics uses advanced unsupervised machine-learning algorithms to discover patterns within logs and learn their unique data behavior. It then sets dynamic thresholds based on the data signature in real time to detect issues when they first occur. When the system detects a deviation from the typical pattern, it sends an event to Event Management.</p> <h3 id="mcetoc_1fs77is7d16">Log Viewer</h3> <p style="padding-left: 40px;">The Log viewer tab enables you to browse the logs by timestamp or time range, to search for particular log text, and to visualize the frequency of anomaly occurrences in a particular time period. If you discover an important metric in the log data, you can use it to define a Log Analytics alert rule.</p> <p style="padding-left: 40px;">To open up the log viewer, navigate to:</p> <ul><li style="list-style-type: none;"> <ul style="list-style-position: inside;"><li>Health Log Analytics > Log Viewer<br /><img style="border: 2px solid black; align: baseline;" src="sys_attachment.do?sys_id=8821de7d1bb10d500b8a9979b04bcb8f" width="330" align="baseline" border="2" /></li></ul> </li></ul> <p style="padding-left: 40px;">Example screenshot from viewing logs:</p> <p style="padding-left: 80px;"><img style="border: 2px solid black; align: baseline;" src="sys_attachment.do?sys_id=ca53523d1bf10d500b8a9979b04bcbb1" width="990" align="baseline" border="2" /></p> <p style="padding-left: 40px;">To learn more about the Query String Syntax, click in the info link above the search box.</p> <p style="padding-left: 80px;"><img style="border: 2px solid black; align: baseline;" src="sys_attachment.do?sys_id=a636da3d1b350d500b8a9979b04bcb08" width="330" align="baseline" border="2" /></p> <p style="padding-left: 40px;">For more information on the log viewer, please see:</p> <ul><li style="list-style-type: none;"> <ul style="list-style-position: inside;"><li><a title="Define, save, and share a search of log data" href="https://docs.servicenow.com/search?q=Define%2C+save%2C+and+share+a+search+of+log+data">Define, save, and share a search of log data</a></li><li><a title="Filter search results on the Log viewer" href="https://docs.servicenow.com/search?q=Filter+search+results+on+the+Log+viewer">Filter search results on the Log viewer</a></li></ul> </li></ul> <h3 id="mcetoc_1fs77is7d17">Alerts</h3> <p style="padding-left: 40px;">Health Log Analytics sends events to Event Management. In Event Management, Health Log Analytics alerts appear in the All alerts list. This list enables operators to see alerts from the event and the Health Log Analytics alert type in a single location.</p> <h3 id="mcetoc_1fsoneitk8">Troubleshooting</h3> <p style="padding-left: 40px;">For troubleshooting please see <a title="Health Log Analytics Troubleshooting" href="/kb_view.do?sysparm_article=KB1080232">Health Log Analytics Troubleshooting</a></p> <h3 id="mcetoc_1fsoneitk9">Additional Information</h3> <ul style="list-style-position: inside;"><li><a title="Health Log Analytics" href="https://docs.servicenow.com/search?q=Health+Log+Analytics">Health Log Analytics</a></li></ul></div>