> For the complete documentation index, see [llms.txt](https://docs.nimbus.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nimbus.dev/integrations/integrations.datadog/datadog.journald.md).

# Journald

## Steps

1. Install vector in your target environment.

```sh
curl --proto '=https' --tlsv1.2 -sSfL https://sh.vector.dev | bash -s -- -y
```

2. Install the nimbus configuration

   > NOTE: you'll need to replace `$YOUR_NIMBUS_ENDPOINT` with your specific endpoint

```sh
cat << EOF > /usr/local/etc/
data_dir: /tmp/
api:
address: 0.0.0.0:8686
enabled: true
playground: false
sources:
source/journald:
    type: journald
    current_boot_only: true
sinks:
sink/nimbus:
    type: http
    encoding: 
    codec: json
    compression: gzip
    inputs:
    - source/*
    uri: $YOUR_NIMBUS_ENDPOINT
EOF
```

3. Create the systemd script

```sh
cat << EOF > /tmp/nimsetup.sh
#!/bin/bash

# Define the binary and service names
BINARY_PATH=$1
BINARY_NAME="vector"
SERVICE_NAME="vector.service"

# Copy the binary to /usr/local/bin
echo "Copying $BINARY_PATH to /usr/local/bin..."
cp "$BINARY_PATH" "/usr/local/bin/$BINARY_NAME"
chmod +x "/usr/local/bin/$BINARY_NAME"

# updating config file
chmod a+r /usr/local/etc/vector-config.yaml

# Create a systemd service file
SERVICE_FILE_PATH="/etc/systemd/system/$SERVICE_NAME"
echo "Creating $SERVICE_FILE_PATH..."

cat <<EOF1 > "$SERVICE_FILE_PATH"
[Unit]
Description=Nimbus Collector
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/bin/$BINARY_NAME -c /usr/local/etc/vector-config.yaml
Restart=on-abort

[Install]
WantedBy=multi-user.target
EOF1

# Reload systemd to recognize the new service
echo "Reloading systemd manager configuration..."
systemctl daemon-reload

# Enable the service to start on boot
echo "Enabling $SERVICE_NAME..."
systemctl enable "$SERVICE_NAME"

# Start the service
echo "Starting $SERVICE_NAME..."
systemctl start "$SERVICE_NAME"

echo "$SERVICE_NAME is now running."
EOF
```

4. Execute

```sh
. ~/.zprofile
chmod +x /tmp/nimsetup.sh
sudo /tmp/nimsetup.sh `which vector`
```

5. Verify

```sh
systemctl status vector

vector.service - Nimbus Collector
    Loaded: loaded (/etc/systemd/system/vector.service; enabled; vendor preset: enabled)
    Active: active (running) since Thu 2024-02-29 22:41:32 UTC; 6min ago
Main PID: 3505 (vector)
    Tasks: 6 (limit: 18945)
    Memory: 16.5M
```


---

# 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.nimbus.dev/integrations/integrations.datadog/datadog.journald.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.
