1. Requirements
| Component | Recommendation |
|---|---|
| Server | Windows Server 2016+ or Windows 10/11; 4 vCPU, 8 GB RAM, 40 GB disk |
| Web / PHP | Apache + PHP 8.2 (XAMPP recommended); curl, openssl, mysqli, mbstring extensions |
| Database | MariaDB 10.4+ or MySQL 8 |
| Network | Access to port 8443 on every Guardium appliance; SMTP for e-mail |
| Automatic reports | Google Chrome or Microsoft Edge (for PDF generation, installed for all users) |
| Optional | Telegram / WhatsApp / ntfy access, SFTP server, IMAP mailbox, AI API key or Ollama |
2. Installation
- Install XAMPP (Apache + MariaDB + PHP 8.2). Run Apache and MySQL as Windows services.
- Copy the files: extract the GuardStats package to
C:\xampp\htdocs\guardstats. - Create the database: in phpMyAdmin, create an empty database with the
utf8mb4_general_cicollation and import the SQL file from the package. - Configure the connection: enter the host, user, password and database name in
layout/dbconn.php. - Enter your licence: open the application in a browser; on first launch you are asked for your licence key, which is then validated.
- Log in and check the site address (URL) and root folder on the Preferences screen.
The application URL is also used by scheduled jobs and automatic reports. Enter an address reachable from the server itself (e.g. http://localhost/guardstats).
3. Initial settings
On the Preferences screen:
- E-mail (SMTP): server, port, security (TLS/SSL), sender name and address. Check notifications and reports are sent from this account.
- Limits: the disk, memory and CPU percentages at which System Check raises an alarm.
- E-mail templates: the text of report and check e-mails (variables
%check_name%,%check_date%).
Then:
- Companies — add your customers (companies).
- Users — add team members as administrators and customer contacts as company-bound users.
- Report Users — add each company's report recipients. Recipients marked Admin also receive reminder and alert e-mails.
4. Adding a Guardium environment
GuardStats connects to Guardium through the REST API. Register an OAuth client on each appliance:
- Connect to the appliance CLI and register the client:
The command returns a client secret; note it down.grdapi register_oauth_client client_id=guardstats01 grant_types="password" scope="read,write" - In GuardStats, go to Guardium → Environments → Add: enter the name, type (Aggregator / Collector), role (PROD / POC), hostname, data IP and the
https://IP:8443address. - Enter the Client ID, client secret and the API user's password in the corresponding fields.
- Assign the environment to one or more companies and choose the service type (Dedicated / Shared).
- Add STAPs and databases on the STAPs and Databases screens; a STAP's primary host must be the collector's data IP.
Environments with an empty Client ID are excluded from REST API checks. If check results show “API error”, verify access to port 8443 and the client details first.
5. Daily checks
Checks are under the Checks menu. Each page has two options: a single environment and Check All Environments. A check counts as done for the day when it has been run with “Check All Environments”, and the dashboard card then shows Done.
Recommended order
- Status Check — run it first; the other checks treat it as a prerequisite. Offline environments are skipped automatically.
- STAP Check — STAPs that are not running.
- Log Operations Check — failed archive / export / purge / aggregation operations.
- System Check — disk / memory / CPU over the limit.
- Alerter Restart — restarts the alerter service.
- Get Counts — collects exception / session / SQL counts.
In the result screen each environment is a green (no problem) or red (problem) row; click a row to open the details.
To run them all automatically every morning, enable the Daily Checks job. If checks are still pending at the set hour, administrators receive a Daily Check Reminder e-mail.
6. Counts and analysis
Get Counts fetches daily exception, session and SQL counts from every environment and stores them in the Counts table. This data is shown:
- on the Counts → Daily change rates screen as change against the previous day,
- on the company Count Analysis screen with SPIKE / DROP findings,
- in the Top 10 Critical Count Findings card on the dashboard.
For regular count e-mails to company recipients, define the company and number of days in Reports → Count Reports and enable the Count Reports job.
7. Reports
- Trend Report: select an environment and date range, then Generate Report. Export the charts with Export PDF.
- Status Report: a full status report with system resources, patches, STAPs and count trends.
- Report Files: generated PDF reports.
- Send Report: readiness and sending per company; Send List shows the send history.
8. Automatic report delivery
- On Reports → Auto Report, create a report definition for each environment and set its type to Automatic.
- In Cron Settings, choose the day and hour of the Auto Reports job and enable it (e.g. Friday 10:00).
- On that day the job checks every 15 minutes and waits until all daily checks are complete. It then generates the reports as PDF and sends them to every eligible company.
- Companies whose report file count does not match their active environment count, or that could not be sent, trigger an alert. If checks are not complete by 23:00, no reports are sent and you get an alert.
The Last Automatic Send card at the top of Reports → Send Report shows the result of the last run. You can regenerate a missing environment's report with the ⟳ button and send the company by hand; a company is never sent twice on the same day.
PDFs are generated by headless Chrome / Edge and the job runs as the SYSTEM account. If Chrome was installed for a single user only (under AppData), SYSTEM cannot see it: install Chrome for all users or enter the chrome.exe / msedge.exe path in Cron Settings → Auto Reports browser.
9. Scheduled jobs (Task Scheduler)
GuardStats needs a single Windows task. It runs every 15 minutes; Preferences → Cron Settings decides which job runs when. In an elevated command prompt:
schtasks /Create /TN "GuardStats Cron" /TR "C:\xampp\htdocs\guardstats\guardstats_cron_run.bat" /SC MINUTE /MO 15 /RU SYSTEM /F
To list due jobs without running them:
C:\xampp\php\php.exe C:\xampp\htdocs\guardstats\gs_cron_runner.php --due --dry
The run log is kept outside the web folder: C:\xampp\guardstats_cron.log. To remove the task: schtasks /Delete /TN "GuardStats Cron" /F.
| Job | Setting |
|---|---|
| Daily Checks | Hour (e.g. 07:00). Checks already done by hand today are not run again. |
| Periodic Checks | Interval: 1 / 3 / 6 hours; optional day. Offline environments + STAP + System. |
| Auto Reports | Day and hour; waits until checks are complete. |
| Daily Check Reminder | Hour; e-mail if any check is pending. |
| Count Reports | Interval / day / hour. |
| XML / CSV Export | Checks hourly; the actual day and hour are set per export (Scheduled Run). |
The ▶ button on each row runs the job immediately. Thanks to the built-in pseudo-cron, due jobs are also triggered as pages are opened, even without Task Scheduler; Task Scheduler is still recommended for automatic reports and reliable timing.
10. Alerts
Configure the channels in Cron Settings → Job Result Notifications and verify them with Test.
Telegram
- In Telegram, open @BotFather →
/newbotand paste the token you receive. - Everyone who should receive alerts must first send a message to the bot (Telegram does not allow a bot to message someone who hasn't).
- Find chat IDs with @userinfobot and enter them separated by commas:
123456789, 987654321. - You can also use a team group: add the bot to the group and enter the group ID (
-100…) on its own.
WhatsApp and ntfy
WhatsApp: via CallMeBot, to your own number (personal use). ntfy: a topic URL on ntfy.sh or your own server; instant push to your phone.
Per-job choices
In the Notify column of the Scheduled Jobs table, for each job separately: 💬 message (Telegram / WhatsApp / ntfy) and ✉ e-mail, for Fail and Success. Success ✉ on the Daily Checks row is the “daily checks completed” e-mail.
Alert repeat
Periodic Checks does not report the same problem again on every run:
| Situation | What happens |
|---|---|
| New problem | Immediate ❌ FAILED, listing the new problems |
| Same problem continues | 🔁 STILL FAILING once the Repeat alert interval has passed (with how long it has lasted) |
| Everything fixed | One ✅ RESOLVED |
Problems are compared by environment and problem type, not by value: disk going from 91% to 92% does not trigger a new message, but a CPU alarm on the same environment does. Open problems are shown in Cron Settings as “● N open problem(s)”.
11. XML / CSV export
- Preferences → XML Export (or CSV Export) → New Export Config.
- Select companies, modules (environments, STAPs, counts, patches, databases, policies, licences) and fields.
- Delivery: an SFTP profile and target folder and/or an e-mail address.
- Scheduled Run: every day, a specific weekday or the 1st of the month; choose the hour and tick Enable automatic export.
- Make sure the corresponding Export job is enabled in Cron Settings.
12. SQL, policy and compliance analysis
- Export the relevant report from Guardium (Full SQL, Access Log Full Details or Policy Exception) as CSV.
- Import it for a company with SQL → SQL Import or Policy → Policy Import. For regular reports, create a company-specific token in Email Import and forward the reports to that mailbox.
- SQL Analyzer: select the company and import; risky queries are listed with their score. You can compare two imports.
- Policy Tracker: rules, source programs, hourly activity and violators.
- Compliance Report: select the company and standard (KVKK, PCI-DSS, ISO 27001), Generate Report, and export as PDF.
13. Users and roles
- Administrator: all companies, settings, checks and reports.
- Company user: only the data of the company they belong to.
- Report Users: do not log in; they only receive e-mails. Those marked Admin also receive reminder and alert e-mails.
Every action is written to System → Process Logs; old entries are archived with Archive Logs.
14. Troubleshooting
| Symptom | Solution |
|---|---|
| All environments “offline” | Check that the GuardStats server can reach port 8443 on the appliances (firewall). |
| Check result “API error” | Verify the client ID / secret and the API user's password; make sure the client was registered with the password grant type. |
| Jobs started from Cron Settings show “could not run” | The web server may not be allowed to start processes; GuardStats then falls back to an HTTP call automatically. Check that the application URL is reachable from the server itself. |
| Automatic report: “No Chrome / Edge found” | Install Chrome for all users or enter the browser path in Cron Settings. |
| No e-mails arrive | Check the SMTP settings in Preferences; failed notifications appear in Process Logs as “Cron Notify”. |
| Telegram “HTTP 403” | That person has not messaged the bot yet, or has blocked it. |
| Scheduled jobs don't run | Check due jobs with gs_cron_runner.php --due --dry and look at guardstats_cron.log. |
If you cannot solve a problem, write to us.