Skip to main content

Scan and Import Assets

After connecting your cloud provider, NightOps automatically discovers all manageable compute resources.

How Asset Discovery Works

┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│ Provider │────▶│ NightOps │────▶│ Asset │
│ (AWS) │ │ Sync │ │ Database │
└──────────────┘ └──────────────┘ └──────────────┘


┌──────────────┐
│ Dashboard │
│ Display │
└──────────────┘

NightOps queries each cloud provider's APIs to:

  1. Discover all compute resources (VMs, databases, containers)
  2. Retrieve current status (running, stopped)
  3. Extract tags/labels for organization
  4. Estimate hourly and monthly costs

Triggering a Sync

Initial Sync

When you first connect a provider, NightOps automatically starts an initial sync. This typically takes 1-3 minutes depending on the number of resources.

Manual Sync

To refresh the asset list:

  1. Go to Providers in the dashboard
  2. Find your provider
  3. Click the Sync button
  4. Wait for the sync to complete

Automatic Sync

NightOps automatically syncs every 15 minutes to:

  • Detect new resources
  • Update status changes
  • Remove terminated resources
  • Refresh cost estimates

Discovered Asset Types

AWS

ServiceAsset TypeDiscovered Details
EC2ec2_instanceInstance ID, type, state, VPC, tags
RDSrds_instanceInstance ID, engine, size, storage
ECSecs_serviceCluster, service name, task count
EKSeks_nodegroupCluster, node group, instance types
Redshiftredshift_clusterCluster ID, node type, node count
ASGasgGroup name, desired/min/max capacity

GCP

ServiceAsset TypeDiscovered Details
Compute Enginegce_instanceInstance name, machine type, zone
Cloud SQLcloud_sql_instanceInstance name, tier, storage
GKEgke_nodepoolCluster, pool name, node count
Cloud Runcloud_run_serviceService name, region, concurrency
Cloud Functionscloud_functionFunction name, runtime, memory

Azure

ServiceAsset TypeDiscovered Details
Virtual Machinesvirtual_machineVM name, size, OS, resource group
Azure SQLsql_databaseServer, database name, tier
AKSaks_nodepoolCluster, pool name, node count
Container Instancescontainer_instanceContainer group, CPU, memory
Functionsfunction_appApp name, plan, runtime

Asset Details

Each discovered asset includes:

Identification

id: asset_abc123
name: staging-api-server
type: ec2_instance
provider_resource_id: i-0abcd1234efgh5678
region: us-east-1

Status

status: running        # running, stopped, starting, stopping, terminated, error
is_manageable: true # Can NightOps control this resource?
is_active: true # Is this resource being tracked?

Cost Estimate

hourly_cost: 0.1664    # $0.17/hour (m5.large)
monthly_cost: 119.81 # $119.81/month (730 hours)

Tags

provider_tags:
Environment: staging
Team: backend
nightops-managed: "true"

tags:
- staging
- api

Specs

specs:
instance_type: m5.large
vcpu: 2
memory_gb: 8
storage_gb: 100

Filtering Assets

By Tag

Only discover resources with specific tags:

  1. Go to Providers → Edit Provider
  2. Under Tag Filters, add:
    nightops-managed: true
  3. Save and re-sync

NightOps will only import resources matching the tag filter.

By Region

Limit discovery to specific regions:

  1. Go to Providers → Edit Provider
  2. Under Regions, select only the regions you want
  3. Save and re-sync

By Resource Type

Exclude specific resource types from discovery:

  1. Go to Settings → Discovery
  2. Disable resource types you don't want managed
  3. Re-sync providers

Asset Status

StatusDescriptionCan Start?Can Stop?
runningResource is active-Yes
stoppedResource is offYes-
startingResource is booting-Yes
stoppingResource is shutting down--
terminatedResource was deleted--
errorLast operation failedRetryRetry
unknownStatus check failedRetryRetry

Manageability

Not all discovered resources can be managed by NightOps.

Manageable

Resources that support stop/start operations:

  • Most EC2 instances
  • RDS instances (with caveats)
  • ECS services
  • Standard VMs

Not Manageable

Resources that cannot be stopped:

  • Spot instances (will terminate instead of stop)
  • RDS Multi-AZ with read replicas in some configurations
  • AKS system node pools
  • Resources protected by deletion protection

NightOps marks these as is_manageable: false and won't attempt to control them.


Cost Estimation

NightOps estimates costs using:

  1. On-Demand Pricing — Current public on-demand rates
  2. Instance Specs — CPU, memory, storage
  3. Region — Prices vary by region
  4. Hours/Month — Based on 730 hours/month

Accuracy

Cost estimates are approximate and may differ from actual bills due to:

  • Reserved instances or savings plans
  • Spot pricing
  • Data transfer costs
  • Storage I/O costs
  • Support costs

Use estimates for relative comparisons, not exact billing predictions.


Sync Errors

"Rate Limited"

Cloud provider APIs have rate limits. NightOps automatically:

  • Backs off when rate limited
  • Retries with exponential delay
  • Completes sync in multiple batches

"Access Denied"

Missing permissions for some resources:

  1. Check IAM/RBAC policy includes all required permissions
  2. Verify resource-level permissions if using tag-based access
  3. Re-deploy CloudFormation/Terraform with updated policy

"Timeout"

Large accounts may timeout during initial sync:

  1. Limit regions to reduce scope
  2. Wait for automatic retry
  3. Contact support if persistent

Manual Asset Creation

For resources not auto-discovered (like SSH servers):

  1. Go to Infrastructure → Add Asset
  2. Select Custom SSH or other manual type
  3. Enter connection details:
    host: 192.168.1.100
    port: 22
    username: admin
  4. Define start/stop commands:
    start_command: "sudo systemctl start myapp"
    stop_command: "sudo systemctl stop myapp"
    status_command: "systemctl is-active myapp"
  5. Save the asset

Best Practices

Tag Everything

Add consistent tags to your cloud resources:

# AWS
nightops-managed: "true"
nightops-environment: staging
nightops-collection: web-tier

# GCP (labels)
nightops-managed: true
nightops-environment: staging

# Azure
nightops-managed: true
nightops-environment: staging

Regular Syncs

  • Sync after deploying new infrastructure
  • Sync after changing resource tags
  • Sync after modifying provider permissions

Clean Up Terminated

NightOps automatically removes terminated resources after 24 hours. To remove immediately:

  1. Go to Infrastructure
  2. Filter by Status: Terminated
  3. Select and Delete the assets

Next Steps