Variables
A variable you set wins over what the agent detects. Leave a variable unset to keep the detected value.To get a public price, values must match the price catalog’s naming, for example the AWS region
us-east-1 and instance type m6i.large.Set the variables
- Install script
- Docker
- Ansible
- Helm
Export the variables before running the install command. The script writes them to the agent’s environment file: Re-running the script keeps any value already recorded in the environment file, so an upgrade does not drop your settings. To change a value, export the new one before running it again. To remove one, delete its line from that file and restart the agent.
/etc/default/costgraph-agent on systemd hosts, /etc/conf.d/costgraph-agent on OpenRC hosts.When detection fails at startup
If the agent cannot detect the cloud when it starts, it tries again on its regular metadata interval and updates the machine after detection succeeds. Google Cloud is the exception: restart the agent or set the preceding variables.On-premises machines
Machines the agent cannot match to a public price can be given one of your organization’s own prices instead. See Pricing IDs.Machines cloned from one image
Machines cloned from one template share a machine id and can merge into one record in CostGraph. Either regenerate the machine id on each clone, or setCOSTGRAPH_INSTANCE_ID to a unique value per machine.
To regenerate the machine id on a systemd host:
/var/lib/dbus/machine-id where it exists. The agent reads that file first and falls back to /etc/machine-id.