News and blog
NXLog main page
  • Products
    NXLog Platform
    Log collection
    Log management and analytics
    Log storage
    NXLog Community Edition
    Integrations
    Professional Services
  • Solutions
    Use cases
    Specific OS support
    SCADA/ICS
    Windows event log
    DNS logging
    MacOS logging
    Solutions by industry
    Financial Services
    Government & Education
    Entertainment & Gambling
    Telecommunications
    Medical & Healthcare
    Military & Defense
    Law Firms & Legal Counsel
    Industrial & Manufacturing
  • Pricing
    Licensing
    Plans
  • Partners
    Find a Reseller
    Partner Program
    Partner Portal
  • Resources
    Documentation
    Blog
    White papers
    Videos
    Webinars
    Case Studies
    Community Program
    Community Forum
  • About
    Company
    Careers
  • Support
    Support portals
    Contact us

NXLog Platform
Log collection
Log management and analytics
Log storage
NXLog Community Edition
Integrations
Professional Services

Use Cases
Specific OS support
SCADA/ICS
Windows event log
DNS logging
MacOS logging
Solutions by industry
Financial Services
Government & Education
Entertainment & Gambling
Telecommunications
Medical & Healthcare
Military & Defense
Law Firms & Legal Counsel
Industrial & Manufacturing

Licensing
Plans

Find a Reseller
Partner Program
Partner Portal

Documentation
Blog
White papers
Videos
Webinars
Case Studies
Community Program
Community Forum

Company
Careers

Support portals
Contact us
Let's Talk
  • Start free
  • Interactive demo
Let's Talk
  • Start free
  • Interactive demo
NXLog search
  • Loading...
Let's Talk
  • Start free
  • Interactive demo
November 3, 2025 security

Linux security monitoring: Collecting and visualizing events in Elasticsearch and Kibana

By Arielle Bonnici

Share
ALL ANNOUNCEMENT COMPARISON COMPLIANCE DEPLOYMENT SECURITY SIEM STRATEGY RSS

Timely visibility into system activity is what separates effective defense from reactive analysis. Every operating system, application, and device logs a trail of evidence. However, transforming that trail into actionable intelligence requires the right tools. In our previous posts, we’ve walked you through:

  • Visualizing VPN connection logs,

  • Monitoring Windows security events, and

  • Analyzing web server activity logs.

In this final installment in our series on log visualization, we’re turning our attention to Linux security monitoring. We will look at how to collect system and authentication logs with NXLog Agent and transform them into security dashboards with Elasticsearch and Kibana. Whether you have a few critical servers or a large fleet of Linux hosts, this information gives your SOC analysts and IT teams the context they need to detect anomalies and enforce compliance.

Why monitor Linux security events?

Linux forms the backbone of most enterprise and cloud infrastructures, but monitoring it effectively is not straightforward. Unlike Windows, which consolidates security events into a single location, Linux distributes its events across multiple files. Each source captures part of the story, but no single log file provides the whole picture. Additionally, routine system activity often buries the events that signal risk in these log files.

Despite these challenges, monitoring Linux is critical for three main reasons:

Detecting security threats early on

Failed SSH login attempts, unexpected sudo activity, privilege escalations, and suspicious process executions can all be early signs of malicious activity, including brute-force attacks, lateral movement, or unauthorized access. Only continuous monitoring helps detect these before they become full-blown incidents.

Compliance and auditing

Frameworks like PCI DSS, ISO 27001, and CIS Benchmarks require organizations to retain and review system activity logs. Having centralized visibility over authentication and configuration changes ensures you can meet these requirements and demonstrate control over your environment.

Operational visibility

Security monitoring isn’t just about threat detection, but also about understanding how your systems behave. By centralizing and visualizing logs, you can uncover configuration drift, troubleshoot errors, and establish a baseline for regular activity.

Key Linux security events to monitor

With so many different log files and subsystems generating telemetry data on Linux hosts, monitoring everything is not feasible. Identifying the events that reveal suspicious behavior is the key to effective security monitoring.

The table below highlights the most critical Linux security events and related MITRE ATT&CK techniques. These events should be at the top of your priority list for monitoring.

Category File(s) MITRE Technique Why it matters

Unauthorized cron job creation

/var/log/syslog
/var/log/cron

T1053.003

Detects creation or modification of scheduled tasks that attackers may use to establish persistence or execute malicious code.

Suspicious sudo command usage

/var/log/auth.log

T1548.003

Detects elevated privileges that may indicate an attacker attempting to execute unauthorized administrative actions.

New user or group creation

/etc/passwd
/var/log/auth.log

T1136.001

Identifies potential persistence mechanisms where attackers create new local accounts to maintain access.

Execution of script from world-writable directory

/var/log/syslog

T1059.004

Flags possible execution of malicious scripts placed in insecure directories that can be modified by non-privileged users.

Unauthorized access to sensitive credential files

/var/log/auth.log

T1003.008

Highlights attempts to read or modify credential stores such as /etc/shadow, which can lead to password theft or privilege escalation.

Collecting Linux security events and sending them to Elasticsearch

NXLog Agent is a lightweight, cross-platform log collection agent that can parse syslog messages into structured telemetry data. It can normalize fields and output data in JSON format, making it immediately available for viewing in Elasticsearch. Here is how we can go about it:

  • Use the File input module to collect the logs.

  • Parse the log records using the syslog extension.

  • Convert the records to JSON format.

Elasticsearch can ingest and index high volumes of data at scale, which is what you need for monitoring Linux security events. NXLog Agent can forward events directly to it using its dedicated Elasticsearch output module, ensuring that logs are stored correctly and ready to query in near real-time.

Here is the complete configuration:

User                 root (1)

GenerateDateInUTC    TRUE (2)
ParseDateInUTC       TRUE

<Extension json>
    Module           xm_json
</Extension>

<Extension syslog>
    Module           xm_syslog
</Extension>

<Input linux_events>
    Module           im_file

    # Authentication and sudo logs (Ubuntu/Debian)
    File             '/var/log/auth.log'

    # Authentication and sudo logs (RHEL/CentOS)
    File             '/var/log/secure'

    # System events including cron logs (Ubuntu/Debian)
    File             '/var/log/syslog'

    # Cron job executions and modifications (RHEL/CentOS)
    File             '/var/log/cron'

    <Exec>
        syslog->parse_syslog();
        to_json();
    </Exec>
</Input>

<Output elasticsearch>
    Module           om_elasticsearch
    URL              http://172.19.113.201:9200/_bulk (3)
</Output>

<Route linux_events_to_elasticsearch>
    Path             linux_events => elasticsearch
</Route>
1 Grants NXLog Agent access to read log files in the /var/log/ directory.
2 Generates and expects dates in UTC.
3 Replace the IP address and port with your Elasticsearch instance details.

Configuring an agent is easy with NXLog Platform. Find your agent, paste the configuration into the editor, and save your changes.

NXLog Agent configuration
Figure 1. NXLog Agent configuration in NXLog Platform

You can also create a configuration and assign it to multiple agents.

With NXLog Agent handling collection and Elasticsearch providing scalable storage and search, you have a pipeline that turns raw Linux security logs into actionable insights in Kibana. We will dive into that next.

Visualizing Linux security logs in Kibana

Once your Linux events are indexed in Elasticsearch, you can immediately start exploring them in the Discover page, which lets you search and filter raw events in real time. This is particularly useful for ad hoc investigations, such as examining a suspicious logon or privilege escalation.

Discover Linux events in Elasticsearch

However, you’ll get real value when you transform thousands of events into a security dashboard. A well-designed Kibana dashboard allows analysts to spot unusual system behavior at a glance. For example, you can build a Linux security dashboard containing the following widgets:

  • sudo commands over time to spot sudden increases in sudo activity or privilege escalation attempts.

  • New users and groups to highlight unplanned user and group additions.

  • Unauthorized cron jobs to detect new or modified scheduled tasks that could run malicious commands by unexpected users or at irregular times.

  • Failed SSH login attempts by source IP to surface brute-force or credential-stuffing attempts.

And much more!

Kibana dashboard for Linux security monitoring
Figure 2. Kibana dashboard for Linux security monitoring

To help kick-start your monitoring journey, we’ve prepared a sample Kibana dashboard. You can import it into Kibana by navigating to Stack Management and then clicking on Saved Objects under Kibana. Then, click Import and upload the .ndjson file.

A thoughtfully designed dashboard provides you with invaluable insight into your infrastructure, allowing your analysts to proactively monitor for threats instead of combing through thousands of events after the fact.

Conclusion

Linux systems are at the core of most enterprise infrastructures, making monitoring them essential to maintaining security and operational integrity. Although Linux is known for its stability and security, it is not immune to misconfiguration, misuse of privileges, and malicious attacks. By collecting and centralizing Linux security logs with NXLog Agent and analyzing them in Elasticsearch and Kibana, you can uncover valuable insights that help you keep your environment secure.

At NXLog, we’ve built NXLog Platform to help organizations like yours take control of their telemetry data so they can transform raw logs into actionable security intelligence. If you’re ready to take the next step, try NXLog Agent to see how it can help you centralize your Linux security logs in Elasticsearch and Kibana.

This post concludes our series on log collection and visualization. That said, we’re always eager to hear about new use cases and explore how organizations can leverage their telemetry to strengthen security and optimize operations. If we haven’t covered your scenario, drop us a line and let us know how we can help.

NXLog Platform is an on-premises solution for centralized log management with
versatile processing forming the backbone of security monitoring.

With our industry-leading expertise in log collection and agent management, we comprehensively
address your security log-related tasks, including collection, parsing, processing, enrichment, storage, management, and analytics.

Start free Contact us
  • linux security
  • linux logs
  • elasticsearch
Share

Facebook Twitter LinkedIn Reddit Mail
Related Posts

The shadow IT haunting your network: A Halloween horror story
7 minutes | October 30, 2025
Windows security monitoring: Collecting and visualizing events in Elasticsearch and Kibana
7 minutes | September 22, 2025
Security Event Logs: Importance, best practices, and management
13 minutes | July 22, 2025

Stay connected:

Sign up

Keep up to date with our monthly digest of articles.

By clicking singing up, I agree to the use of my personal data in accordance with NXLog Privacy Policy.

Featured posts

Announcing NXLog Platform 1.9
October 22, 2025
Gaining valuable host performance metrics with NXLog Platform
September 30, 2025
Announcing NXLog Platform 1.8
September 12, 2025
Security Event Logs: Importance, best practices, and management
July 22, 2025
Announcing NXLog Platform 1.7
June 25, 2025
Enhancing security with Microsoft's Expanded Cloud Logs
June 10, 2025
Announcing NXLog Platform 1.6
April 22, 2025
Announcing NXLog Platform 1.5
February 27, 2025
Announcing NXLog Platform 1.4
December 20, 2024
NXLog redefines log management for the digital age
December 19, 2024
2024 and NXLog - a review
December 19, 2024
Announcing NXLog Platform 1.3
October 25, 2024
NXLog redefines the market with the launch of NXLog Platform: a new centralized log management solution
September 24, 2024
Welcome to the future of log management with NXLog Platform
August 28, 2024
Announcing NXLog Enterprise Edition 5.11
June 20, 2024
Raijin announces release of version 2.1
May 31, 2024
Ingesting log data from Debian UFW to Loki and Grafana
May 21, 2024
Announcing NXLog Enterprise Edition 6.3
May 13, 2024
Raijin announces release of version 2.0
March 14, 2024
NXLog Enterprise Edition on Submarines
March 11, 2024
The evolution of event logging: from clay tablets to Taylor Swift
February 6, 2024
Migrate to NXLog Enterprise Edition 6 for our best ever log collection experience
February 2, 2024
Raijin announces release of version 1.5
January 26, 2024
2023 and NXLog - a review
December 22, 2023
Announcing NXLog Enterprise Edition 5.10
December 21, 2023
Raijin announces release of version 1.4
December 12, 2023
Announcing NXLog Enterprise Edition 6.2
December 4, 2023
Announcing NXLog Manager 5.7
November 3, 2023
Announcing NXLog Enterprise Edition 6.1
October 20, 2023
Raijin announces release of version 1.3
October 6, 2023
Upgrading from NXLog Enterprise Edition 5 to NXLog Enterprise Edition 6
September 11, 2023
Announcing NXLog Enterprise Edition 6.0
September 11, 2023
The cybersecurity challenges of modern aviation systems
September 8, 2023
Raijin announces release of version 1.2
August 11, 2023
The Sarbanes-Oxley (SOX) Act and security observability
August 9, 2023
PCI DSS 4.0 compliance: Logging requirements and best practices
August 2, 2023
Detect threats using NXLog and Sigma
July 27, 2023
HIPAA logging requirements and how to ensure compliance
July 19, 2023
Announcing NXLog Enterprise Edition 5.9
June 20, 2023
Industrial cybersecurity - The facts
June 8, 2023
Raijin announces release of version 1.1
May 30, 2023
CISO starter pack - Security Policy
May 2, 2023
Announcing NXLog Enterprise Edition 5.8
April 24, 2023
CISO starter pack - Log collection fundamentals
April 3, 2023
Raijin announces release of version 1.0
March 9, 2023
Avoid vendor lock-in and declare SIEM independence
February 13, 2023
Announcing NXLog Enterprise Edition 5.7
January 20, 2023
NXLog - 2022 in review
December 22, 2022
Need to replace syslog-ng? Changing to NXLog is easier than you think
November 23, 2022
The EU's response to cyberwarfare
November 22, 2022
Looking beyond Cybersecurity Awareness Month
November 8, 2022
GDPR compliance and log management best practices
September 23, 2022
NXLog in an industrial control security context
August 10, 2022
Raijin vs Elasticsearch
August 9, 2022
NXLog provides native support for Google Chronicle
May 11, 2022
Aggregating macOS logs for SIEM systems
February 17, 2022
How a centralized log collection tool can help your SIEM solutions
April 1, 2020

Categories

  • ANNOUNCEMENT
  • COMPARISON
  • COMPLIANCE
  • DEPLOYMENT
  • SECURITY
  • SIEM
  • STRATEGY
logo

Subscribe to our newsletter to get the latest updates, news, and products releases. 

© Copyright NXLog FZE.

Privacy Policy. General Terms of Use

Follow us

  • Product
  • NXLog Platform 
  • Log collection
  • Log management and analysis
  • Log storage
  • Integration
  • Professional Services
  • Plans
  • Resources
  • Documentation
  • Blog
  • White papers
  • Videos
  • Webinars
  • Case studies
  • Community Program
  • Community forum
  • Support
  • Getting started guide
  • Support portals
  • About NXLog
  • About us
  • Careers
  • Find a reseller
  • Partner program
  • Contact us