Documentation

Installation & user guide

A step-by-step guide to installing GuardStats, connecting your Guardium environments and automating the daily routine. Menu names match the application.

1. Requirements

ComponentRecommendation
ServerWindows Server 2016+ or Windows 10/11; 4 vCPU, 8 GB RAM, 40 GB disk
Web / PHPApache + PHP 8.2 (XAMPP recommended); curl, openssl, mysqli, mbstring extensions
DatabaseMariaDB 10.4+ or MySQL 8
NetworkAccess to port 8443 on every Guardium appliance; SMTP for e-mail
Automatic reportsGoogle Chrome or Microsoft Edge (for PDF generation, installed for all users)
OptionalTelegram / WhatsApp / ntfy access, SFTP server, IMAP mailbox, AI API key or Ollama

2. Installation

  1. Install XAMPP (Apache + MariaDB + PHP 8.2). Run Apache and MySQL as Windows services.
  2. Copy the files: extract the GuardStats package to C:\xampp\htdocs\guardstats.
  3. Create the database: in phpMyAdmin, create an empty database with the utf8mb4_general_ci collation and import the SQL file from the package.
  4. Configure the connection: enter the host, user, password and database name in layout/dbconn.php.
  5. Enter your licence: open the application in a browser; on first launch you are asked for your licence key, which is then validated.
  6. 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:

  1. Companies — add your customers (companies).
  2. Users — add team members as administrators and customer contacts as company-bound users.
  3. 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:

  1. Connect to the appliance CLI and register the client:
    grdapi register_oauth_client client_id=guardstats01 grant_types="password" scope="read,write"
    The command returns a client secret; note it down.
  2. In GuardStats, go to Guardium → Environments → Add: enter the name, type (Aggregator / Collector), role (PROD / POC), hostname, data IP and the https://IP:8443 address.
  3. Enter the Client ID, client secret and the API user's password in the corresponding fields.
  4. Assign the environment to one or more companies and choose the service type (Dedicated / Shared).
  5. Add STAPs and databases on the STAPs and Databases screens; a STAP's primary host must be the collector's data IP.
Environment detail — company assignment and API details

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

  1. Status Check — run it first; the other checks treat it as a prerequisite. Offline environments are skipped automatically.
  2. STAP Check — STAPs that are not running.
  3. Log Operations Check — failed archive / export / purge / aggregation operations.
  4. System Check — disk / memory / CPU over the limit.
  5. Alerter Restart — restarts the alerter service.
  6. 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.

Daily change rates

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.
Status Report parameters

8. Automatic report delivery

  1. On Reports → Auto Report, create a report definition for each environment and set its type to Automatic.
  2. In Cron Settings, choose the day and hour of the Auto Reports job and enable it (e.g. Friday 10:00).
  3. 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.
  4. 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.

Report Send — Last Automatic Send card

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.

JobSetting
Daily ChecksHour (e.g. 07:00). Checks already done by hand today are not run again.
Periodic ChecksInterval: 1 / 3 / 6 hours; optional day. Offline environments + STAP + System.
Auto ReportsDay and hour; waits until checks are complete.
Daily Check ReminderHour; e-mail if any check is pending.
Count ReportsInterval / day / hour.
XML / CSV ExportChecks 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.

Cron Settings

10. Alerts

Configure the channels in Cron Settings → Job Result Notifications and verify them with Test.

Telegram

  1. In Telegram, open @BotFather → /newbot and paste the token you receive.
  2. 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).
  3. Find chat IDs with @userinfobot and enter them separated by commas: 123456789, 987654321.
  4. 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:

SituationWhat happens
New problemImmediate ❌ FAILED, listing the new problems
Same problem continues🔁 STILL FAILING once the Repeat alert interval has passed (with how long it has lasted)
Everything fixedOne ✅ 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

  1. Preferences → XML Export (or CSV Export) → New Export Config.
  2. Select companies, modules (environments, STAPs, counts, patches, databases, policies, licences) and fields.
  3. Delivery: an SFTP profile and target folder and/or an e-mail address.
  4. Scheduled Run: every day, a specific weekday or the 1st of the month; choose the hour and tick Enable automatic export.
  5. Make sure the corresponding Export job is enabled in Cron Settings.
XML Export settings

12. SQL, policy and compliance analysis

  1. Export the relevant report from Guardium (Full SQL, Access Log Full Details or Policy Exception) as CSV.
  2. 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.
  3. SQL Analyzer: select the company and import; risky queries are listed with their score. You can compare two imports.
  4. Policy Tracker: rules, source programs, hourly activity and violators.
  5. Compliance Report: select the company and standard (KVKK, PCI-DSS, ISO 27001), Generate Report, and export as PDF.
Compliance Report — KVKK

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

SymptomSolution
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 arriveCheck 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 runCheck due jobs with gs_cron_runner.php --due --dry and look at guardstats_cron.log.

If you cannot solve a problem, write to us.

Cut your daily Guardium routine down to a coffee break.

Contact us for a live demo — installation and initial setup support included.