New user - looking for information on parsing fields from Syslog message field
We’re just starting to get LogicMonitor setup on our network and, mainly to test the collector, I setup one of our HAProxy instances to forward it’s syslog to the collector and can confirm that the logs are being ingested. However, because it’s bare syslog, all I can see is the bare message field. What I’m looking for is the functionality to pull particular fields out of the message and into fields. <134>Oct 17 23:37:17 haproxy[3719288]: 69.141.121.67:11058 [17/Oct/2023:23:37:17.568] http_front_80 http_back_80/Acc-SRV01 0/0/0/32/32 200 759 - - --NI 5825/3042/52/12/0 0/0 "POST /Server/URL.asmx HTTP/1.1" For example, in the log line above, the fields are separated by a space. Among the fields included in the log line are items such as the Client IP, the FronteEnd and BackEnd which I was hoping to be able to extract into their own fields to help with reporting. I’ve been looking through the documentation and have found the LogSource section but that doesn’t seem to be adding the field. Frankly, after a few hours of searching and experimenting, I’m hoping someone could give me some guidance on how this can be done. ThanksSolved353Views18likes11CommentsSecure syslog forwarding to LogicMonitor via TLS
Our team has verified that secure syslog forwarding (via TLS) is not supported currently and would like to submit a feature request to LogicMonitor DEV team to asseswhether securesyslogforwarding can be implemented. An example will be syslog-ng forwarding secure (i.e. encrypted) syslog messages to LogicMonitor collector. https://www.balabit.com/documents/syslog-ng-ose-latest-guides/en/syslog-ng-ose-guide-admin/html/concepts-tls.html This will enable centralized logging server to forward secure syslog messages to LogicMonitor collector then. Thanks & Best Regards, Horace31Views3likes0CommentsParse syslog facility and priority
Syslog that adheres to the standard format that has been around for decades prefixes the message with a number between greater than and less than symbols. For example: Thatvalue is the result of combining two different numbers: facility and priority. We can decode this facility and priority number pretty easily. Let’s take 164 for example: 164 in binary is “1010 0100”. The facility is extracted by taking the first 5 digits of 164 in binary, “10100” and converting to decimal, 20. Looking that up in a standard table, we can see that 20 corresponds to a facility of local4. The priority is extracted by taking the last 3 digits of 164 in binary, “100” and converting to decimal, 4. Looking that up in a standard table, we can see that 4 corresponds to a priority of Warning. LM Logs has the ability to extract this number from the log message. It’s pretty easy since all you do is pipe the search query into the parse operator: This puts the number into its own column, in this case called severity. What I’d like to do is: Take the value in the severity column and convert it to binary. Then take the first 5 digits and convert to decimal and show that as a separate field on the log. Take the value in the severity column and convert it to binary. Then take the last 3 digits and convert to decimal and show that as a separate field on the log. I’d love the ability to embed the mapping found in the standard table so that instead of displaying the number it displayed the name of the facility and priority. Since pretty much all Syslog follows this format and uses the standard table, it might be worth it for LM to build this kind of capability into LM Logs if it doesn’t exist today. All customers who do syslog streaming into LM Logs would benefit from having the facility and priority parsed out into human readable words. What I’m thinking is a couple of new operators in the query language: dec_to_bin(x) - converts a decimal number (x) to binary bin_to_dec(x) - converts a binary number (x) to decimal left(myStr, x) - grabs a specified number of characters (x) from the left part of a string (myStr) right(myStr, x) - grabs a specified number of characters (x) from the right part of a string (myStr) mid(myStr, x, y)- grabs a specified number of characters (y) from a string (myStr) starting at a certain character index (x) str(x) - converts an object (x) into a string so that it can be used as an argument in left, right, mid functions lookup(x, myDictionary) - looks up a value (x) in the keys of a dictionary (myDictionary) and returns the value of the dictionary entry Alternatively, or in addition: parse_facility(msg) - extracts the facility and returns the human readable facility name (basically doing in one step what I’d do manually with the functions above) parse_priority(msg) - extracts the priority and returns the human readable priority name (basically doing in one stepwhat I'd do manually with the functions above)23Views3likes0Comments