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
    Open Telemetry
    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
Open Telemetry
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
February 6, 2023 strategy

Our customers asked - How to start an NXLog module with a delay?

By Tamás Burtics

Share
ALL ANNOUNCEMENT COMPARISON COMPLIANCE DEPLOYMENT SECURITY SIEM STRATEGY RSS
nxlog module delayed start

There are several reasons you might want to start a particular NXLog module with a delay. You can think of it like delaying the start of a Windows service. In most cases, you need to do this for performance reasons. But there might be other scenarios where you would want to do this, such as collecting logs during a specific time frame. If you have, for example, a less critical module block, you can prioritize the more important one by delaying the less important one. As mentioned, this is common practice in operating systems, and the main principle is the same when using NXLog.

Note
  • In the following example, the module we’ll stop and start is called input. It is referenced in Exec input→module_stop();, and in the <Input input> opening clause of the input module.

  • You must schedule operations externally to the module (i.e. from the Exec module block). If you schedule within the input module (in this case), the module will not start at the set time because it is in a stopped state, and so it can’t start up again.

You can use a Schedule block inside an Exec block to achieve the delayed start of a particular module.

nxlog.conf

This configuration uses two separate Schedule blocks; the first stops the referenced module when NXLog starts up, and logs the information that the module is blocked. The second Schedule block sets the module to start at the next whole minute after NXLog started using a cron schedule expression, which, in this case, runs the operation every minute. To avoid this and only run it once, the RunCount directive is specified.

<Extension exec>
    Module    xm_exec

    <Schedule>
        When        @startup
        Exec        input->module_stop();
        Exec        log_info("=========== The input module is stopped ===========");
    </Schedule>

    <Schedule>
        When        */1 * * * *
        Exec        input->module_start();
        Exec        log_info("=========== The input module is started ===========");
        RunCount    1
    </Schedule>

</Extension>

<Input input>
    Module    im_testgen
    Exec      log_info($raw_event);
</Input>

The following is the NXLog log output from running this operation.

2023-01-23 02:33:00 INFO [CORE|main] nxlog-5.6.7727 (50b2a4353@REL_v5.6) started on Windows
2023-01-23 02:33:00 INFO [om_tcp|output] connecting to 192.168.88.148:1514
2023-01-23 02:33:00 INFO [om_tcp|output] tcp connection established with 192.168.88.148:1514
2023-01-23 02:33:00 INFO [xm_exec|exec] =========== The input module is stopped ===========
2023-01-23 02:34:00 INFO [xm_exec|exec] =========== The input module is started ===========

You can schedule a larger time frame to suit your needs better. This configuration delays the start of the defined module by 1-59 seconds, depending on when NXLog was started. You could get the time from the OS to get more exact timing, but that would be different for every operating system type. This NXLog configuration works regardless of the operating system used.

You can use the same technique to stop and start any NXLog module at any time.

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
  • scheduled start
  • NXLog agent
  • Our customers asked
Share

Facebook Twitter LinkedIn Reddit Mail
Related Posts

Our customers asked - Input stream EPS tracking with NXLog
6 minutes | January 31, 2023

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

Security dashboards go dark: why visibility isn't optional, even when your defenses keep running
February 26, 2026
Building a practical OpenTelemetry pipeline with NXLog Platform
February 25, 2026
Announcing NXLog Platform 1.11
February 23, 2026
Adopting OpenTelemetry without changing your applications
February 10, 2026
Linux security monitoring with NXLog Platform: Extracting key events for better monitoring
January 9, 2026
2025 and NXLog - a recap
December 18, 2025
Announcing NXLog Platform 1.10
December 11, 2025
Announcing NXLog Platform 1.9
October 22, 2025
Gaining valuable host performance metrics with NXLog Platform
September 30, 2025
Security Event Logs: Importance, best practices, and management
July 22, 2025
Enhancing security with Microsoft's Expanded Cloud Logs
June 10, 2025

Categories

  • ANNOUNCEMENT
  • COMPARISON
  • COMPLIANCE
  • DEPLOYMENT
  • SECURITY
  • SIEM
  • STRATEGY
  • Products
  • NXLog Platform
  • NXLog Community Edition
  • Integration
  • Professional Services
  • Licensing
  • Plans
  • Resources
  • Documentation
  • Blog
  • White Papers
  • Videos
  • Webinars
  • Case Studies
  • Community Program
  • Community Forum
  • Compare NXLog Platform
  • Partners
  • Find a Reseller
  • Partner Program
  • Partner Portal
  • About NXLog
  • Company
  • Careers
  • Support Portals
  • Contact Us

Follow us

LinkedIn Facebook YouTube Reddit
logo

© Copyright NXLog Ltd.

Subscribe to our newsletter

Privacy Policy • General Terms of Business