# NXLog

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fintegrations%2Ffiles%2Fnxlog.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fintegrations%2Ffiles%2Fnxlog.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

The following tutorial demonstrates how to configure `NXLog` to seamlessly send your logs to Coralogix.

## Prerequisites[​](#prerequisites "Direct link to Prerequisites")

This document includes cluster dependent URL's. Each URL has a variable part (in Italic). Please match this part with a row entry within the following table. Copy the table row entry located under the column that matches the top level domain of your Coralogix account (.com, .in etc.). Replace the variable part of the URL with this entry.

\[table id=51 /]

Have `NXLog` installed, for more information on how to install: <https://nxlog.co/documentation/nxlog-user-guide/deployment.html>

## General[​](#general "Direct link to General")

**Private Key** – Your [Send-Your-Data API key](https://docs-docusaurus.kinsta.page/user-guides/account-management/api-keys/send-your-data-api-key/.md) is a unique ID that represents your company.

**Company Id** – A unique number which represents your company. You can get your company id from the settings tab in the *Coralogix* dashboard.

**Application Name** – The name of your main application, for example, a company named *"SuperData"* would probably insert the *"SuperData"* string parameter or if they want to debug their test environment they might insert the *"SuperData– Test"*.

**SubSystem Name** – Your application probably has multiple subsystems, for example, Backend servers, Middleware, Frontend servers, etc. in order to help you examine the data you need, inserting the subsystem parameter is vital.

## Configuration[​](#configuration "Direct link to Configuration")

### [](https://github.com/coralogix/integrations-docs/blob/master/integrations/nxlog/README.rst#on-host-machine)On the host machine[​](#on-the-host-machine "Direct link to on-the-host-machine")

Here is a basic example of **nxlog.conf**:

```
<Extension json>

    Module  xm_json

</Extension>



<input messages />

    Module  im_file

    File    "/var/log/messages"





<Output coralogix>

    Module  om_udp

    Host    syslogserver.

Cluster URL

    Port    5140

    <Exec>

        delete($EventReceivedTime);

        delete($SourceModuleName);

        delete($SourceModuleType);



        $message      = $raw_event;

        $pri_text     = 'daemon.info';

        $hostname     = hostname();

        $program_name = 'nxlog';

        $tag          = 'syslog';

        $raw_event    = '{"fields":{"private_key":"YOUR_PRIVATE_KEY","company_id":"YOUR_COMPANY_ID","app_name":"APP_NAME","subsystem_name":"SUB_NAME"},"message":' + to_json() + '}';

    </Exec>

</Output>



<Route messages_to_coralogix>

    Path    messages => coralogix

</Route>
```

### [](https://github.com/coralogix/integrations-docs/blob/master/integrations/nxlog/README.rst#docker)Docker[​](#docker "Direct link to docker")

Build a Docker image with your **nxlog.conf**:

```
FROM nxlog/nxlog-ce:latest

COPY nxlog.conf /etc/nxlog.conf
```

Before deploying your container **don't forget** to mount volume with your logs.
