Advanced settings
You may need to adjust backend settings to match your environment. The following files hold the values described below:
.envforSECRET_KEY,DEBUG, andFRONTEND_REDIRECTocsinventory_backend/settings.pyforLOGGING,MEDIA_ROOT, andMEDIA_URL
Both files can be found at /usr/share/ocsinventory-backend/ on a package install. Any changes will require a server restart to be effective:
sudo systemctl restart uwsgiEnvironment variables
SECRET_KEY
A random value used to sign session cookies and authentication tokens.
Unique value. Keep it secret.
DEBUG
Shows detailed technical information on error pages.
False. True exposes internal details after an error.
FRONTEND_REDIRECT
The OCS interface URL. OCS redirects users here after they sign in through SSO.
http://ocs.example.com:3000. Required for SSO sign-in.
Logging
The backend writes these files to the logs/ directory:
ocs_auth.log
Sign-ins, including SSO events
ocs_collection.log
Inventory data received from agents
ocs_backend.log
General backend activity
ocs_django.log
Django framework messages
ocs_management.log
Scheduled and manual maintenance activities
Each file rotates every Sunday (when="W6"). Two previous files are retained
(backupCount=2). About three weeks of history are available.
when and backupCount are TimedRotatingFileHandler options.
See Django logging for the LOGGING structure.
Media files
Media settings control where OCS stores deployment packages.
MEDIA_ROOT
Server directory where package files are stored.
media/ under the installation directory
MEDIA_URL
URL prefix used to serve package files.
/media/
Deployment packages can be large. Ensure this directory has sufficient space. Include it in your backup plan with the database.
Last updated

