> For the complete documentation index, see [llms.txt](https://docs.blusapphire.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blusapphire.io/log-forwarding/03_log-forwarding-guide/log-forward/linux/centos-rhel.md).

# CENTOS-RHEL

To forward Audit logs &#x20;

Install syslog package, if you haven’t installed it&#x20;

`yum -y install rsyslog`&#x20;

Checking the rsyslog.conf&#x20;

Open a rsyslog.conf file located at /etc/rsyslog.conf by following command&#x20;

`#vim/etc/rsyslog.conf`&#x20;

At the end of the file check for the following line and uncomment&#x20;

`$IncludeConfig /etc/rsyslog.d/*.conf`&#x20;

`# Include all config files in /etc/rsyslog.d/`&#x20;

`$IncludeConfig /etc/rsyslog.d/*.conf`&#x20;

Save and Quit the configuration file.&#x20;

Create log configuration for Audit logs with vim /etc/rsyslog.d/auditlog.conf and paste following lines below&#x20;

`$ModLoad imfile`&#x20;

`# auditd audit.log`&#x20;

`$InputFileName /var/log/audit/audit.log ##path of log file`&#x20;

`$InputFileTag tag_audit_log:`&#x20;

`$InputFileStateFile audit_log`&#x20;

`$InputFileSeverity info`&#x20;

`$InputFileFacility local6`&#x20;

```
$InputFilePollInterval 1
```

<pre class="language-shellscript"><code class="lang-shellscript"><strong>$InputFilePersistStateInterval 1
</strong></code></pre>

`$InputRunFileMonitor`&#x20;

`$WorkDirectory /var/lib/rsyslog`&#x20;

`$ActionQueueFileName fwdRule1 # unique name prefix for spool files`&#x20;

`$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)`&#x20;

`$ActionQueueSaveOnShutdown on # save messages to disk on shutdown`&#x20;

`$ActionQueueType LinkedList # run asynchronously`&#x20;

`$ActionResumeRetryCount -1`&#x20;

`local6.* @<Log Collector IP>:514`&#x20;

Save and Quit the configuration file.&#x20;

Restart rsyslog service&#x20;

`service rsyslog restart`&#x20;


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.blusapphire.io/log-forwarding/03_log-forwarding-guide/log-forward/linux/centos-rhel.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
