You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+26-13Lines changed: 26 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,21 @@
1
1
# SBOanalytics
2
-
Web site log analytics on a budget.
2
+
Web site and server analytics on a budget.
3
3
4
4
**Background and motivation**
5
5
6
-
Running web sites on a budget is not too hard (especially for Apache, PHP, Mysql people like us) but monitoring web site activity is not so easy
7
-
(and obviously we do not want to spend any money for it).
6
+
Running web sites on a budget is not too hard (especially for Apache, PHP, Mysql people like us)
7
+
but monitoring web site and server activity is not so easy (and obviously we do not want to spend any money for it).
8
8
9
9
This tool is suitable for people running their own web sites on their own VMs, droplets etc. You must be able to run operating system commands on your server
10
-
to run the log processing component and you should know how to deploy PHP apps.
10
+
to run the log processing component and you should know how to deploy PHP apps.
11
+
You can monitor web site and operating system metrics with minimal effort.
11
12
12
13
## Components
13
14
14
15
### Log processor
15
-
You need to run the log processor, https://github.com/SBOsoft/SBOLogProcessor, to collect web server access logs.
16
-
It will monitor your access logs, generate metrics and optionally save logs to its database (for now only mysql is supported).
16
+
You need to run the log processor, https://github.com/SBOsoft/SBOLogProcessor,
17
+
to collect web server access logs, web site metrics and operating system metrics.
18
+
It will monitor your access logs, generate metrics and optionally save logs to a database (for now only mysql is supported).
17
19
18
20
### SBOanalytics (this application), the frontend
19
21
Use this application to view metrics and logs collected by the log processor. Data generated by the log processor will be saved in a mysql database.
@@ -45,18 +47,28 @@ To set up the containers, change into the containers folder and run `docker-comp
45
47
46
48
### Production deployments
47
49
48
-
- Go to https://github.com/SBOsoft/SBOanalytics/releases and download a release package, i.e SBOanalytics-xxxx.xx.xx.xxx.zip.
49
-
- Copy the zip file into a new folder and unzip it
50
-
- Review the .htaccess file in the package. The .htaccess file contains multiple SetEnv directives which are commented out by default.
50
+
1. Go to https://github.com/SBOsoft/SBOanalytics/releases and download a release package, i.e SBOanalytics-xxxx.xx.xx.xxx.zip.
51
+
2. Copy the zip file into a new folder and unzip it
52
+
3. Review the .htaccess file in the package. The .htaccess file contains multiple SetEnv directives which are commented out by default.
51
53
Environment variables are used for application configuration. You can either set them in the .htaccess file or in your VirtualHost configuration.
52
54
Setting them up in VirtualHost configuration will allow for easier updates. If you set them in the .htaccess file then during upgrades
53
55
you will need to migrate your changes to the .htaccess file manually.
54
-
- Just placing the folder to a path under your php enabled virtual host will work
55
-
- To upgrade, download a release package, extract into a new folder and replace your existing deployment folder with the new one after
56
+
4. Just placing the folder to a path under a php enabled virtual host will work
57
+
5. To upgrade, download a release package, extract into a new folder and replace your existing deployment folder with the new one after
56
58
migrating the changes in your existing .htacess file. Do NOT replace the new .htaccess with your existing .htaccess file as there maybe changes
57
59
required for the new version to function properly.
58
60
61
+
#### Database setup for new installations
62
+
1. Review db/db-for-new-installations.sql file in the package. (Ignore db/upgrades folder for new installations)
63
+
2. Create a new database for SBOanalytics (or use an existing database, all tables have sbo_ prefix)
64
+
3. Run db/db-for-new-installations.sql
59
65
66
+
#### Database updates for upgrades
67
+
- To apply database updates, review the files in db/upgrades/ folder in the release package. Run .sql files with names after your old version.
68
+
For example if your old version was 2025.07.25.0001 you need to run all files with names after 20250725*.sql in db/upgrades folder.
69
+
You MUST run sql files in alphabetical order.
70
+
71
+
#### .htaccess and environment variables
60
72
Please review webapp/DocumentRoot/.htaccess before deployments and upgrades. You can define the required environment variables in VirtualHost settings,
61
73
e.g /etc/apache2/sites-enabled/yoursite.conf, and leave .htaccess as is.
62
74
If you set environment variables in the .htaccess file then you will need to manually apply your changes during upgrades.
@@ -74,7 +86,8 @@ defined by SBO_AUTH_SINGLE_USER and SBO_AUTH_SINGLE_PWD environment variables.
74
86
- SBO_DB_PASSWORD mysql password
75
87
- SBO_AUTH_SINGLE_USER username for SBO_AUTH_TYPE single
76
88
- SBO_AUTH_SINGLE_PWD password for SBO_AUTH_TYPE single
89
+
- SBO_ADMIN_SECRET secret required for accessing the settings page
77
90
78
-
Always review https://github.com/SBOsoft/SBOanalytics/blob/main/webapp/DocumentRoot/.htaccess for latest updates to configuration options.
79
-
The above list may not be exhaustive.
91
+
Always review https://github.com/SBOsoft/SBOanalytics/blob/main/webapp/DocumentRoot/.htaccess for latest updates to configuration options
0 commit comments