Kibana filters and useful CLI commands
Service logs available in Kibana and their filter queries
Cron
*.container.name : "cron"
ElasticSearch
*.container.name : "elasticsearch"
Application
*.container.name : "app-fe"
*.container.name : "app-be"
Redis
*.container.name : "redis"
Nginx
*.container.name : "nginx"
If you see that your logs are duplicated, then keep in mind that nginx has many server blocks in its configuration, so one or more of the same internal requests may be added to the external request, and each of them will be logged. If you want to filter only external requests without showing duplicates, then use the following query:
*.container.name : nginx and server_port: 80
MySQL
*.container.name : "mysql"
Deployment and build logs in Kibana
Build logs
*.container.name : "build"
Deployment logs
*.container.name : "app-updater"
system.log in Kibana
(*.container.name : "app" or *.container.name : "cron") and (message : "main.ERROR" or message: "main.NOTICE" or message: "main.INFO" or message: "main.DEBUG")
exception.log in Kibana
(*.container.name.keyword : "app" or *.container.name : "cron") and message: "main.CRITICAL"
cron.log in Kibana
*.container.name.keyword : "cron"
Create database dump
Grant SSH access via the User Portal following the instructions.
Connect to the environment using created SSH access.
Create a database dump on the server:
mysqldump magento --single-transaction --no-tablespaces | zip dump.sql.gz -
Exit SSH.
Copy the database dump locally:
scp {ssh_user}@ssh.readymage.com:/home/magento/dump.sql.gz .
Replace the database with a database dump
Grant SSH access via the User Portal following the instructions.
Place database dump on the server by running:
scp {local_path_to_db} {ssh_user}@ssh.readymage.com:/home/magento/dump.sql
Connect to the environment using created SSH access.
Replace the database with your dump file:
mysql magento < dump.sql
Copy media data from local to SSH container
rsync -azP media/ [email protected]:/home/magento/media/
Copy media data from SSH container to local
rsync -azP [email protected]:/home/magento/media/
Connect to MySQL database
Grant SSH access via the User Portal following the instructions.
Connect to the environment using created SSH access.
Connect to MySQL database:
SSH - "mysql"
View Magento reports stored in var/reports
Use the following command when connected to SSH to list all available reports:
ls -l var/report/
Use the following command when connected to SSH to view the specific report:
cat var/report/{report_name}
Resolve stuck deployment
Identify the problem by checking deployment and build logs and try redeploying the instance following the instructions here.
Reindex commands
Grant SSH access via the User Portal following the instructions.
Connect to the environment using created SSH access.
Check reindexing status:
php bin/magento indexer:info php bin/magento indexer:status
Perform reindex
php bin/magento indexer:reindex
Reset reindex
php bin/magento indexer:reset
Files that are copied to ReadyMage during deployment
src/composer.json
src/composer.lock
src/app/
src/pub/.well-known
src/pub/google*.html
Content Security Policy control
Content security policies are controlled on Magento 2 application level.
Clear cache
Via Magento admin
System > Tools > Cache Management > Flush Cache Storage and Flush Magento Cache.
SSH
php bin/magento c:f
Cloudflare
Dashboard > Settings > Purge Cache
Resolve "The default website isn't defined"
ReadyMage requires having store views, stores, and website defined in the config.php file
The folder structure on the Magento server
Magento files are stored in /var/www/public
and can be checked through SSH access.
Applying patches
Magento patches must be placed in src/patches
There should be no composer.patches.json
file. The indication of patches should be via "extra: patches" in composer.json
.
Last updated
Was this helpful?