Sign in as an admin
Open the Smart DBA Hub and sign in with an owner or admin account.
https://smartdbportal.smart-apps.inSmart DBA admin guide
Use this guide to install the pre-configured agent on a DB-adjacent host, upgrade it in place without losing registration or configuration, attach database instances from the Hub, configure AWS RDS monitoring, and verify runtime readiness.
The Hub stores the organization agent key and generates a script with the key embedded. The database host never needs inbound access from the Hub.
Open the Smart DBA Hub and sign in with an owner or admin account.
https://smartdbportal.smart-apps.inGo to Settings, then Remote Agents. Confirm there is an active organization key.
/settings/agent-keysChoose Standalone. The downloaded `install-dba-agent.sh` pins the current agent wheel from this Hub.
Run the script on a Linux host that can reach both the Hub over HTTPS and the database over its native port.
Add database instances in the Hub and select the running agent. No YAML edit or agent restart is required.
/instancesConfirm the agent is online, the instance has a runtime readiness status, and metrics begin to arrive.
/agentsInstall the agent on a DB-adjacent host. For most teams this is a small Linux VM in the same network as MySQL, PostgreSQL, or MongoDB.
Install Python, venv, pip, certificates, and standard transfer tools.
sudo apt update
sudo apt install -y python3 python3-venv python3-pip ca-certificates curl unzip
python3 --version
Install the tool families for the database vendors this host will reach.
sudo apt install -y mysql-client postgresql-client
# MongoDB Database Tools are distributed separately by MongoDB.
# Install the mongodb-database-tools package for your Ubuntu release.
mongodump --version || true
Download the script from the Hub UI, copy it to the DB-adjacent host, and run it. The script writes `~/.dba-agent/agent.yaml` with owner-only permissions and installs the agent into a local virtualenv.
Run this on the machine that can reach the target databases.
chmod +x install-dba-agent.sh
./install-dba-agent.sh
Use this on Linux hosts with systemd after the normal install path is understood.
sudo ./install-dba-agent.sh --systemd
systemctl status dba-agent
journalctl -u dba-agent -f
Useful after an upgrade or a network, proxy, CA, or database access change. Submission synchronizes the running version with Agent Fleet.
~/.dba-agent/.venv/bin/dba-agent self-check \
--config ~/.dba-agent/agent.yaml \
--warn-missing-tools \
--submit
Operator-controlled rollout
The Hub publishes immutable versioned wheels and container images. Upgrade the existing installation so `agent.yaml`, the registered agent identity, and mounted data directories remain unchanged.
Copy and run this once. Do not split it into separate stages.
curl -fsSLo /tmp/upgrade-dba-agent.sh \
https://agent.dba.smart-apps.in/docs/upgrade-dba-agent.sh && \
sudo bash /tmp/upgrade-dba-agent.sh --version 0.2.4 --hub-origin https://agent.dba.smart-apps.in --strict
Select the directory printed by the script. This is not normally needed.
sudo bash /tmp/upgrade-dba-agent.sh \
--agent-dir /root/.dba-agent \
--version 0.2.4 \
--strict
A package, version, or service-start failure triggers automatic rollback. A database network or privilege self-check failure is printed as a warning and the agent remains upgraded and running, because upgrading the agent cannot repair VPC routes or database security groups. The Smart DBA command above uses `--strict`, so every self-check failure triggers rollback.
The agent upgrade is complete when Agent Fleet reports version `0.2.4`, Online, and WebSocket connected. Database readiness is a separate operational gate: Instances must report `OK` and database metric timestamps must advance after the collector interval. A red `DB Unreachable` state requires network or database remediation, not another agent upgrade.
Once the agent is online, create database instances in the Hub and select the agent that can reach them. The agent syncs assigned instances on its next config sync cycle.
Run these from the same agent host to prove network reachability before adding the instance.
mysql -h <db-host> -P 3306 -u <user> -p -e "select 1;"
PGPASSWORD='<password>' psql -h <db-host> -p 5432 -U <user> -d <database> -c 'select 1;'
mongodump --host <db-host> --port 27017 --username <user> --authenticationDatabase admin --dryRun
Smart DBA RDS assurance
The agent reads RDS, CloudWatch, backup, security, and cost evidence through AWS APIs. Attach a read-only IAM role to the agent EC2 host; do not put AWS access keys in `agent.yaml` or Hub environment files.
In AWS Console, open EC2, select the agent instance, open its IAM role, and attach a policy containing these core read-only actions. Use the same policy with `aws iam create-policy` if your team prefers CLI.
{
"Version": "2012-10-17",
"Statement": [{
"Sid": "SmartDBARDSCoreRead",
"Effect": "Allow",
"Action": [
"cloudwatch:GetMetricData",
"ec2:DescribeSecurityGroups",
"rds:DescribeDBInstances",
"rds:DescribeEvents",
"rds:DescribeDBInstanceAutomatedBackups"
],
"Resource": "*"
}]
}
Database Insights, AWS Backup, Security Hub, and Compute Optimizer permissions are optional modules. Missing optional access must appear as unavailable coverage, not as a healthy result.
In Instances, open the RDS row menu and choose Test AWS Access. Required and optional permission coverage is returned by the assigned customer agent over the existing WebSocket. The browser does not send AWS keys or role values.
Live result on 2026-09-01: agent 0.1.27 uses the ec2-s3-full-access ambient role and passes
all seven required checks: configuration, identity, CloudWatch, RDS inventory, network, RDS events,
and automated backups. Coverage is 7/11. Database Insights, Security Hub, Compute Optimizer, and AWS
Backup remain optional gaps. The replacement identifier is growaasan-stage-rds-02;
the retired ...-01 identifier returns DBInstanceNotFoundFault.
Use only if the UI check cannot run. Run on `ip-10-11-3-246`.
sudo /root/.dba-agent/.venv/bin/python - <<'PY'
import boto3
session = boto3.Session(region_name="ap-south-1")
identity = session.client("sts").get_caller_identity()
database = session.client("rds").describe_db_instances(
DBInstanceIdentifier="growaasan-stage-rds-02"
)["DBInstances"][0]
print("IAM ARN:", identity["Arn"])
print("RDS:", database["DBInstanceIdentifier"], database["DBInstanceStatus"])
print("Class:", database["DBInstanceClass"], "MultiAZ:", database["MultiAZ"])
PY
Completed on 2026-09-01: current aws.rds.* metrics, RDS inventory evidence, explicit
optional-source coverage, a governed RDS assurance run, and a readable ten-section monthly report were
verified. The latest pack run recorded one passed evidence snapshot and three actionable findings.
Cloudflare SMTP accepted the single-reviewer sample. The final two-To/two-CC distribution remains
disabled until the reviewer explicitly confirms the sample.
Verification should prove four things: the Hub is healthy, the installer artifact is reachable, the agent is online, and each database instance has a runtime readiness result.
curl -fsS https://api.dba.smart-apps.in/health
Expected: `{"status":"ok"}`.
curl -I https://agent.dba.smart-apps.in/artifacts/agent_generic-0.2.4-py3-none-any.whl
Expected: HTTP 200 and `application/octet-stream`.
Go to Agent Fleet. The installed host should appear online after registration and WebSocket connection.
Go to Instances. Use runtime readiness status and reason code as the source of truth.
Start with the self-check output. It validates configuration, Hub reachability, Python drivers, native tools, writable paths, database connectivity, and readiness checks.
Confirm outbound HTTPS from the agent host and check whether a proxy, firewall, or private CA is required.
curl -I https://api.dba.smart-apps.in/health
curl -I https://agent.dba.smart-apps.in/artifacts/agent_generic-0.2.4-py3-none-any.whl
Install Python 3.11 or newer and the venv package. On some Linux images, `python3` may point to an older runtime even when Python 3.11 is available as `python3.11`.
Metrics can run with Python drivers, but backup and restore workflows require native tools. Install the relevant tool family for each database vendor the agent will manage.
In Remote Agents, confirm there is an active organization key. Download a fresh installer after rotating or issuing a key, because the key is embedded server-side into the script.
Check security groups, firewalls, bind addresses, usernames, passwords, default database names, TLS settings, and whether the agent host is in the same network path as the database.
Wait one collector interval, then check runtime readiness, self-check output, and agent logs. Confirm the instance was assigned to the correct agent in the Hub.
The agent honors standard proxy environment variables. For private CA certificates, set `ca_bundle` in `~/.dba-agent/agent.yaml` or configure `REQUESTS_CA_BUNDLE`.
export HTTPS_PROXY=http://proxy.example.com:8080
export NO_PROXY=localhost,127.0.0.1,.internal.example.com
When escalating an install issue, collect command output and logs. Do not send database passwords, private keys, or full `agent.yaml` unless it has been redacted.
~/.dba-agent/.venv/bin/dba-agent self-check \
--config ~/.dba-agent/agent.yaml \
--warn-missing-tools | tee dba-agent-self-check.txt
tail -n 300 ~/.dba-agent/agent_logs/agent.log > dba-agent-last-300.log
systemctl status dba-agent --no-pager > dba-agent-systemd-status.txt 2>/dev/null || true
On Debian/Ubuntu, the updated standalone installer provisions missing Python/venv and database clients from configured OS repositories. Run it with sudo. Select this host's vendors and minimum PostgreSQL server major; Docker installations include clients inside the agent image.
sudo bash install-dba-agent.sh --systemd --db-vendors postgres --postgres-major 17
For an existing agent, download the public install-agent-tools.sh from your Hub's agent-documents location and run:
sudo bash install-agent-tools.sh --vendors postgres --postgres-major 17
bash install-agent-tools.sh --vendors postgres --postgres-major 17 --check-only
This helper preserves agent configuration and identity. It installs client packages only, without database grants or database service restarts. Backup access, user-management access and execution policy are separate choices. Clients in another database container do not satisfy agent prerequisites.
Automatic provisioning requires the updated Hub release; older generated installers require the public helper first. Unsupported operating systems or unavailable client packages require provisioning through approved OS repositories before retrying. Offline installs need OS package mirrors as well as Python dependencies.