Post Deploy
Now that your Bublik instance is running at the specified FQDN, you're ready to import your first log.
Directory Structure
After setting BUBLIK_DOCKER_DATA_DIR
and launching the application, it creates the following structure:
<BUBLIK_DOCKER_DATA_DIR>/
├── django-logs/ # Application logs
└── logs/ # Test logs storage
├── bad/ # Failed imports
├── incoming/ # Temporary storage for logs waiting to be published
└── logs/ # Put your logs in this folder
└── ... # Your test logs
The example below shows a possible structure with net-drv-ts
as a test suite directory, but you can organize your logs in any way that suits your needs:
<BUBLIK_DOCKER_DATA_DIR>/
logs/
└── logs/
└── net-drv-ts/ # Example test suite directory
Directory Purposes
incoming/
: Temporary storage for logs waiting to be publishedlogs/
: Contains all successfully published logs, accessible at<BUBLIK_FQDN>/logs/
. You can organize test logs in this directory using any structurebad/
: Storage for logs that failed during the publishing process
Publishing Logs
Input Requirements
Each log must be a GNU tar archive containing two mandatory files:
meta_data.json
- contains metadata about the lograw_log_bundle.tpxz
- the actual log content
Documentation is currently in progress.
Please check back later for updates.
TODO:
- Add other allowed files
Publishing Process
These command also trigger automatic import of the log into Bublik database
- Copy your log archive(s) to the
incoming
directory - Run the publish command:
task publish
You also can import log archive directly via this command:
task import -- <path/to/my_log.tar>
Once log published you should be able to see it at <BUBLIK_FQDN>/logs/
Since import is automatically triggered you should be able see running import logs at
http://localhost/v2/admin/import
Import Log
Import process is mainly is a background process and you view and monitor logs at
<BUBLIK_FQDN>/v2/admin/import/
<BUBLIK_FQDN>/flower/
You can import logs in multiple ways:
UI
You can also issue import via using UI
- Go to
<BUBLIK_FQDN>/v2/admin/import
- Press "Import" button in the top right corner of the screen
- Specify single URL or multiple URLs for logs to import
API
You can also import log from remote logs storage via using Bublik API by issuing GET request
We provide shortcut for this command with:
# This calls under the hood:
# curl <BUBLIK_FQDN>/api/v2/importruns/source/?url=<log_url>
task import-remote -- <log_url>
Archive
task import -- <path/to/tar-archive>.tar
Command
task import-command -- <log_url>
FAQ
How to reset db?
This is dangerous operation
Please, create db backup before doing anything via task backup:create
Proceed with caution!
task down
- remove running containersdocker volume ls
- locate db volume (be default it should bebublik_db_data
, depends on project name from.env
file)docker volume rm <volume_name>
- to delete dbtask up
- db will be create again
URL doesn't matched project references
This is caused by misconfiguring references
config
For example if you try to import log from:
https://example.com/logs/
Solution
- Go to
<BUBLIK_FQDN>/v2/admin/config
- Find
references
config - Add or edit
LOGS_BASES
to include from where you try to import logs
{
"uri": ["https://example.com/logs/"],
"name": "Example log base"
},