Skip to content

Commit 3328ad1

Browse files
authored
Merge pull request #8 from notesofcliff/codex/update-documentation-for-new-project-structure
docs: update paths for new project layout
2 parents e885880 + e6f3f59 commit 3328ad1

8 files changed

Lines changed: 52 additions & 42 deletions

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Delve is a powerful, extensible platform for ingesting, transforming, and search
1717
- `bootstrap.py` for automated build, packaging, and asset management
1818
- `frontend/` for JavaScript and SCSS assets
1919
- `doc/` for user and admin documentation
20+
- `utilities/cli/` for ingestion utilities such as `tail-files.py` and `syslog-receiver.py`
2021

2122
## Quick Start
2223

@@ -66,6 +67,18 @@ python manage.py createsuperuser
6667
python manage.py runserver
6768
```
6869

70+
### 9. (Optional) Start additional services
71+
```bash
72+
# Task scheduler
73+
python manage.py qcluster
74+
75+
# Syslog server
76+
python utilities/cli/syslog-receiver.py
77+
78+
# Tail log files
79+
python utilities/cli/tail-files.py /var/log/*.log
80+
```
81+
6982
> **Defaults:** Delve ships with Whitenoise + CherryPy by default to keep air-gapped/offline use simple. Swap components as desired.
7083
## Dependency Management
7184

doc/admin/Backup_and_Restore.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ Use the `dumpdata` command to export data from the database to a JSON file. This
99
To back up the entire database, run the following command:
1010

1111
```bash
12-
fl dumpdata > backup.json
12+
python manage.py dumpdata > backup.json
1313
```
1414

1515
### Backing Up Specific Apps
1616
To back up specific apps (e.g., `users`, `auth`), run the following command:
1717

1818
```bash
19-
fl dumpdata users auth > backup_users_auth.json
19+
python manage.py dumpdata users auth > backup_users_auth.json
2020
```
2121

2222
### Scheduling Backups
2323
You can schedule regular backups using a task scheduler like `cron` on Linux or Task Scheduler on Windows. Here is an example of a `cron` job that runs a backup every day at midnight:
2424

2525
```cron
26-
0 0 * * * /path/to/delve/venv/bin/fl dumpdata > /path/to/backups/backup_$(date +\%F).json
26+
0 0 * * * cd /path/to/delve && /path/to/delve/venv/bin/python manage.py dumpdata > /path/to/backups/backup_$(date +\%F).json
2727
```
2828

2929
## Restoring Data
@@ -33,7 +33,7 @@ Use the `loaddata` command to import data from a JSON file into the database. Th
3333
To restore data from a backup file, run the following command:
3434

3535
```bash
36-
fl loaddata backup.json
36+
python manage.py loaddata backup.json
3737
```
3838

3939
The `loaddata` command will load the data into the proper app automatically.
@@ -58,7 +58,8 @@ Here is an example backup script for Linux:
5858
DELVE_DIR="/path/to/delve"
5959

6060
# Run the backup command
61-
$DELVE_DIR/fl dumpdata > "$DELVE_DIR/backups/backup_$(date +\%F).json"
61+
cd "$DELVE_DIR"
62+
python manage.py dumpdata > "$DELVE_DIR/backups/backup_$(date +\%F).json"
6263
```
6364

6465
### Automating Restores
@@ -75,7 +76,8 @@ Here is an example restore script for Linux:
7576
DELVE_DIR="/path/to/delve"
7677

7778
# Run the restore command
78-
$DELVE_DIR/fl loaddata "$DELVE_DIR/backups/backup.json"
79+
cd "$DELVE_DIR"
80+
python manage.py loaddata "$DELVE_DIR/backups/backup.json"
7981
```
8082

8183
By following these steps, you can effectively back up and restore your Delve instance, ensuring that your data is protected and can be quickly recovered in case of an issue.

doc/admin/Configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Delve has several specific configuration options that you can set in `settings.p
8484

8585
## Example Configuration
8686

87-
Please see the provided `example-settings.py` which can be found in the Delve installation directory at `./delve/example-settings.py` for an example.
87+
Use the existing `delve/settings.py` file in the project root as a reference for available options and environment variable support.
8888

8989

9090
[Previous: Bootstrap Guide](/doc/admin/Bootstrap_Guide.md) | [Next: Ingesting Data](/doc/admin/Ingesting_Data.md)

doc/admin/Ingesting_Data.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ python utilities/cli/tail-files.py --sourcetype "my_sourcetype" "/path/to/logfil
8989
python utilities/cli/tail-files.py --no-verify --server "https://delve.example.com" "/path/to/logfile.log"
9090

9191
# Provide username and password for authentication to prevent being prompted
92-
python utilities/cli/tail-files.py--username "myuser" --password "mypassword" "/path/to/logfile.log"
92+
python utilities/cli/tail-files.py --username "myuser" --password "mypassword" "/path/to/logfile.log"
9393

9494
# Slightly decrease verbosity of log output
9595
python utilities/cli/tail-files.py -v "/path/to/logfile.log"
@@ -98,7 +98,7 @@ python utilities/cli/tail-files.py -v "/path/to/logfile.log"
9898
python utilities/cli/tail-files.py -vvvvvv "/path/to/logfile.log"
9999

100100
# Monitor multiple log files using glob patterns
101-
python utilities/cli/tail-files.py"/var/log/*.log"
101+
python utilities/cli/tail-files.py "/var/log/*.log"
102102
```
103103

104104
### Additional Information

doc/admin/Installation_and_Setup.md

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@ Follow these steps to install Delve:
1616

1717
1. **Download Delve**: Download the latest release from the [releases page](https://github.com/notesofcliff/delve/releases).
1818
2. **Extract Files**: Unzip the downloaded file to your desired location.
19-
3. **Configure Settings**: Copy the example settings and URL files.
20-
21-
```
22-
cp ./delve/example-settings.py ./delve/settings.py
23-
cp ./delve/example-urls.py ./delve/urls.py
24-
```
19+
3. **Configure Settings**: Adjust `delve/settings.py` and `delve/urls.py` for your environment. These files are provided in the repository and can be customized directly.
2520

2621
**Important**: It is very important to change your `SECRET_KEY` setting. The default setting will invalidate all sessions and more on every restart of the server. `SECRET_KEY` should be set to a randomly generated string that is kept secret and safe. The `python manage.py gen-secret-key` command will print such a string that can be copied and pasted into your `settings.py`.
2722

@@ -47,10 +42,10 @@ Follow these steps to install Delve:
4742

4843
```
4944
# Start the web server (Explore UI, Admin UI and REST API)
50-
./dlv serve
45+
python manage.py serve
5146
5247
# Start the task scheduler
53-
./dlv qcluster
48+
python manage.py qcluster
5449
5550
# Start the syslog server
5651
python utilities/cli/syslog-receiver.py
@@ -59,7 +54,7 @@ Follow these steps to install Delve:
5954
python utilities/cli/tail-files.py /var/log/*.log
6055
```
6156

62-
**NOTE**: Utilities launched with `dlv` are generally configured in settings.py, while utilities in `utilities/cli/` are generally configured via command line arguments.
57+
**NOTE**: Utilities launched with `python manage.py` are configured in `settings.py`, while utilities in `utilities/cli/` are generally configured via command line arguments.
6358

6459
For details on automating these steps into a repeatable build, see the [Bootstrap Guide](/doc/admin/Bootstrap_Guide.md).
6560

@@ -68,7 +63,7 @@ For details on automating these steps into a repeatable build, see the [Bootstra
6863
Delve uses CherryPy to host the Django web app. The `serve` management command starts the CherryPy server to serve the Delve web UI.
6964

7065
```bash
71-
./dlv serve
66+
python manage.py serve
7267
```
7368

7469
The following settings in `settings.py` control the behavior of the CherryPy web server:
@@ -86,7 +81,7 @@ The following settings in `settings.py` control the behavior of the CherryPy web
8681
- **DELVE_ACCEPTED_QUEUE_TIMEOUT**: How long to wait for an HTTP request to be accepted before timing out.
8782
- **DELVE_SERVER_MAX_THREADS**: The max number of threads to spawn to handle web requests.
8883

89-
**NOTE**: The provided example-settings.py will check environment variables of the same name for all of these server-specific configurations as well as other settings.
84+
**NOTE**: The provided `settings.py` will check environment variables of the same name for all of these server-specific configurations as well as other settings.
9085

9186
## Initial Configuration
9287
After installation, perform the initial configuration to tailor Delve to your needs. Configuration settings are found in the `settings.py` file.
@@ -95,7 +90,7 @@ After installation, perform the initial configuration to tailor Delve to your ne
9590

9691
Delve Supervisor is a very simple service (currently only available on Windows) that is configured via the `DELVE_SERVICE_COMMANDS` value in `settings.py`.
9792

98-
`DELVE_SERVICE_COMMANDS` should be a list of commands to run when the Delve Supervisor service is started. These commands are supposed to run forever (like `./dlv serve` and `./dlv qcluster`). Each command will be run and if any of the processes die, that process will be restarted.
93+
`DELVE_SERVICE_COMMANDS` should be a list of commands to run when the Delve Supervisor service is started. These commands are supposed to run forever (like `python manage.py serve` and `python manage.py qcluster`). Each command will be run and if any of the processes die, that process will be restarted.
9994

10095
### Installing Delve Supervisor Service on Windows
10196
If you are on Windows, you can use the following command from the Delve directory to install the Delve supervisor service. Run the command from an Administrator Command Prompt:

doc/admin/Troubleshooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ If you encounter issues that you cannot resolve, consider accessing support reso
5252
- **Django Documentation**: [https://docs.djangoproject.com/](https://docs.djangoproject.com/)
5353
- **Django Rest Framework Documentation**: [https://www.django-rest-framework.org/](https://www.django-rest-framework.org/)
5454
- **Django Extensions Documentation**: [https://django-extensions.readthedocs.io/](https://django-extensions.readthedocs.io/)
55-
- **Delve Documentation**: Included with every Delve documentation in the `doc` directory, available in the Delve Web UI (default http://127.0.0.1:8000/docs/) and in the [Github Repository](https://github.com/notesofcliff/delve/blob/main/src/home/doc/index)
55+
- **Delve Documentation**: Included with every Delve documentation in the `doc` directory, available in the Delve Web UI (default http://127.0.0.1:8000/docs/) and in the [Github Repository](https://github.com/notesofcliff/delve/blob/main/doc/index.md)
5656
- **Delve Community**: Refer our [Github Repository](https://github.com/notesofcliff/delve) for reporting issues, submitting feature requests, and contacting the project maintainers.
5757

5858
By following these troubleshooting techniques and utilizing available resources, you can effectively diagnose and resolve issues with your Delve instance.

doc/user/App_Developer_Guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ search --last-15-minutes text__icontains=fail index=logs
291291
```
292292

293293
2. Schedule the saved query using Django Q:
294-
1. Ensure the Q cluster is running (`./dlv qcluster` or via Windows Service)
294+
1. Ensure the Q cluster is running (`python manage.py qcluster` or via Windows Service)
295295
2. Access the Django admin interface at `/admin/`
296296
3. Navigate to `Django Q > Scheduled tasks`
297297
4. Click "Add Scheduled task"

doc/user/Ingesting_Data.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -75,28 +75,28 @@ Here are some example commands to use the file-tail utility:
7575

7676
```bash
7777
# Basic usage with default settings
78-
python tail-files.py "/path/to/logfile.log"
78+
python utilities/cli/tail-files.py "/path/to/logfile.log"
7979

8080
# Specify a custom index
81-
python tail-files.py --index "my_index" "/path/to/logfile.log"
81+
python utilities/cli/tail-files.py --index "my_index" "/path/to/logfile.log"
8282

8383
# Specify a custom sourcetype
84-
python tail-files.py --sourcetype "my_sourcetype" "/path/to/logfile.log"
84+
python utilities/cli/tail-files.py --sourcetype "my_sourcetype" "/path/to/logfile.log"
8585

8686
# Disable TLS hostname verification for the Delve server
87-
python tail-files.py --no-verify --server "https://delve.example.com" "/path/to/logfile.log"
87+
python utilities/cli/tail-files.py --no-verify --server "https://delve.example.com" "/path/to/logfile.log"
8888

8989
# Provide username and password for authentication to prevent being prompted
90-
python tail-files.py --username "myuser" --password "mypassword" "/path/to/logfile.log"
90+
python utilities/cli/tail-files.py --username "myuser" --password "mypassword" "/path/to/logfile.log"
9191

9292
# Slightly decrease verbosity of log output
93-
python tail-files.py -v "/path/to/logfile.log"
93+
python utilities/cli/tail-files.py -v "/path/to/logfile.log"
9494

9595
# Most verbose log output
96-
python tail-files.py -vvvvvv "/path/to/logfile.log"
96+
python utilities/cli/tail-files.py -vvvvvv "/path/to/logfile.log"
9797

9898
# Monitor multiple log files using glob patterns
99-
python tail-files.py "/var/log/*.log"
99+
python utilities/cli/tail-files.py "/var/log/*.log"
100100
```
101101

102102
### Additional Information
@@ -145,37 +145,37 @@ Here are some example commands to use the syslog-receiver utility:
145145

146146
```bash
147147
# Basic usage with default settings for UDP
148-
python syslog-receiver.py --udp
148+
python utilities/cli/syslog-receiver.py --udp
149149

150150
# Basic usage with default settings for TCP
151-
python syslog-receiver.py --tcp
151+
python utilities/cli/syslog-receiver.py --tcp
152152

153153
# Basic usage with default settings for TCP and UDP
154-
python syslog-receiver.py --tcp --udp
154+
python utilities/cli/syslog-receiver.py --tcp --udp
155155

156156
# Listen on a custom port for TCP
157-
python syslog-receiver.py --tcp --tcp-port 9514
157+
python utilities/cli/syslog-receiver.py --tcp --tcp-port 9514
158158

159159
# Specify a custom index and sourcetype for UDP
160-
python syslog-receiver.py --udp --index "my_index" --sourcetype "my_sourcetype"
160+
python utilities/cli/syslog-receiver.py --udp --index "my_index" --sourcetype "my_sourcetype"
161161

162162
# Specify a custom index and sourcetype for TCP
163-
python syslog-receiver.py --tcp --index "my_index" --sourcetype "my_sourcetype"
163+
python utilities/cli/syslog-receiver.py --tcp --index "my_index" --sourcetype "my_sourcetype"
164164

165165
# Use TLS for TCP with specified certificate and key
166-
python syslog-receiver.py --tcp --tcp-cert "/path/to/cert.pem" --tcp-key "/path/to/key.pem"
166+
python utilities/cli/syslog-receiver.py --tcp --tcp-cert "/path/to/cert.pem" --tcp-key "/path/to/key.pem"
167167

168168
# Disable TLS hostname verification for the Delve server
169-
python syslog-receiver.py --no-verify --server "https://delve.example.com" --tcp
169+
python utilities/cli/syslog-receiver.py --no-verify --server "https://delve.example.com" --tcp
170170

171171
# Provide username and password for authentication to prevent being prompted
172-
python syslog-receiver.py --username "myuser" --password "mypassword" --udp
172+
python utilities/cli/syslog-receiver.py --username "myuser" --password "mypassword" --udp
173173

174174
# Lowest verbosity of log output (less than default)
175-
python syslog-receiver.py -v --udp
175+
python utilities/cli/syslog-receiver.py -v --udp
176176

177177
# Most verbose log output (more than default)
178-
python syslog-receiver.py -vvvvvv --udp
178+
python utilities/cli/syslog-receiver.py -vvvvvv --udp
179179
```
180180

181181
### Additional Information

0 commit comments

Comments
 (0)