polite-animal-10151
01/12/2023, 1:31 PMbusy-agent-35515
01/12/2023, 1:33 PMpolite-animal-10151
01/12/2023, 1:39 PMbusy-agent-35515
01/12/2023, 1:39 PMpolite-animal-10151
01/13/2023, 3:27 PMbusy-agent-35515
01/13/2023, 4:13 PMpolite-animal-10151
01/13/2023, 4:51 PMwhite-airport-8778
01/13/2023, 6:32 PMpolite-animal-10151
01/13/2023, 6:43 PMcurl <https://pricing.api.infracost.io/graphql> \
-X POST \
-H 'X-Api-Key: MY_KEY' \
-H 'Content-Type: application/json' \
--data 'query {
products(
filter: {
vendorName: "aws",
service: "AWSDataTransfer",
productFamily: "Data Transfer",
region: "us-east-1",
attributeFilters: [
{ key: "transferType", value: "InterRegion Outbound" },
{ key: "fromLocation", value: "US East (N. Virginia)" }
{ key: "toLocation", value: "US West (Oregon)" }
]
},
) {
attributes { key, value }
prices { USD }
}
}'
and I got {"error":"Bad request"}
Maybe I'm doing something wrong and another question I found an example only for aws other providers you do not support?busy-agent-35515
01/16/2023, 9:19 AMfromLocation
line - there should be comma
Here's how data should look like for your request:
--data '{"query": "{ products( filter: { vendorName: \"aws\", service: \"AWSDataTransfer\", productFamily: \"Data Transfer\", region: \"us-east-1\", attributeFilters: [ { key: \"transferType\", value: \"InterRegion Outbound\" }, { key: \"fromLocation\", value: \"US East (N. Virginia)\" }, { key: \"toLocation\", value: \"US West (Oregon)\" } ] },) { attributes { key, value } prices { USD } } }"}'
polite-animal-10151
01/16/2023, 10:08 AMbusy-agent-35515
01/16/2023, 10:09 AMpolite-animal-10151
01/16/2023, 10:13 AMbusy-agent-35515
01/16/2023, 10:15 AMpolite-animal-10151
01/17/2023, 9:39 AMbusy-agent-35515
01/17/2023, 9:43 AMpolite-animal-10151
01/17/2023, 9:45 AMbusy-agent-35515
01/17/2023, 1:13 PMpolite-animal-10151
01/17/2023, 1:22 PMbusy-agent-35515
01/17/2023, 1:24 PMpolite-animal-10151
01/19/2023, 12:45 PMcurl <https://pricing.api.infracost.io/graphql> \
-X POST \
-H 'X-Api-Key: MY_KEY' \
-H 'Content-Type: application/json' \
--data '{"query": "{ products( filter: { vendorName: \"azure\", service: \"Bandwidth\", productFamily: \"Networking\", region: \"eastus\", attributeFilters: [ { key: \"fromLocation\", value: \"US East 2(Virginia)\" }, { key: \"toLocation\", value: \"West US 2 (Washington)\" } ] },) { attributes { key, value } prices { USD } } }"}'
I got {"error":"Invalid API key"}curl: (3) URL using bad/illegal format or missing URL
I checked API key it looks okbusy-agent-35515
01/19/2023, 12:47 PMpolite-animal-10151
01/19/2023, 12:51 PMbusy-agent-35515
01/19/2023, 12:51 PMpolite-animal-10151
01/19/2023, 12:52 PMbusy-agent-35515
01/19/2023, 12:52 PMpolite-animal-10151
01/19/2023, 12:59 PMcurl <https://pricing.api.infracost.io/graphql> -X POST -H 'X-Api-Key: MY_KEY' -H 'Content-Type: application/json' --data '{"query": "{ products( filter: { vendorName: \"azure\", service: \"Bandwidth\", productFamily: \"Networking\", attributeFilters: [ { key: \"fromLocation\", value: \"US East 2(Virginia)\" }, { key: \"toLocation\", value: \"West US 2 (Washington)\" } ] },) { attributes { key, value } prices { USD } } }"}'
returned empty value {"data":{"products":[]}}
maybe I need to add more attributeFilters ?busy-agent-35515
01/19/2023, 12:59 PMpolite-animal-10151
01/19/2023, 1:02 PMbusy-agent-35515
01/19/2023, 1:03 PMvalue_regex:
instead of `value`: value
is the exact match, the value_regex
takes regular expression so you can do partial matches https://github.com/infracost/cloud-pricing-api/blob/master/src/typeDefs.ts#L40polite-animal-10151
01/19/2023, 1:05 PMbusy-agent-35515
01/19/2023, 1:05 PMattributes
column holds the specificsfromLocation
and toLocation
might be different that you providepolite-animal-10151
01/19/2023, 2:52 PMcurl <https://pricing.api.infracost.io/graphql> -X POST -H 'X-Api-Key: MY-KEY' -H 'Content-Type: application/json' --data '{"query": "{ products( filter: { vendorName: \"azure\", service: \"Bandwidth\", productFamily: \"Networking\", attributeFilters: [{key: \"meterName\", value: \"Standard Inter-Region Data Transfer\"}, {key: \"skuName\", value: \"Standard\"}] }) { attributes { key, value} prices { USD } } }"}'
I got this response
{"data":{"products":[{"attributes":[{"key":"meterId","value":"e92d3650-2471-55d2-8433-d8cacd330f70"},{"key":"skuName","value":"Standard"},{"key":"meterName","value":"Standard Inter-Region Data Transfer"},{"key":"productId","value":"DZH318Z0BNVX"},{"key":"serviceId","value":"DZH318FHKQ5W"},{"key":"armSkuName","value":""},{"key":"productName","value":"Rtn Preference: MGN"},{"key":"serviceFamily","value":"Networking"},{"key":"effectiveStartDate","value":"2022-11-01T00:00:00Z"}],"prices":[{"USD":"0.012"}]}
what is this data and what region does it belong to?busy-agent-35515
01/19/2023, 2:57 PMregion
https://github.com/infracost/cloud-pricing-api/blob/master/src/typeDefs.ts#L26polite-animal-10151
01/19/2023, 3:02 PMbusy-agent-35515
01/19/2023, 5:53 PMpolite-animal-10151
01/27/2023, 3:02 PMbusy-agent-35515
01/27/2023, 4:37 PMpolite-animal-10151
01/27/2023, 7:12 PMabundant-terabyte-72655
01/27/2023, 7:19 PMbusy-agent-35515
01/27/2023, 7:36 PMabundant-terabyte-72655
01/27/2023, 9:54 PMpolite-animal-10151
01/30/2023, 2:46 PMbusy-agent-35515
01/30/2023, 3:23 PMabundant-terabyte-72655
01/31/2023, 5:29 PMpolite-animal-10151
01/31/2023, 5:29 PMabundant-terabyte-72655
01/31/2023, 5:32 PMpolite-animal-10151
02/06/2023, 12:57 PMbusy-agent-35515
02/06/2023, 12:59 PMlittle-author-61621
02/06/2023, 1:01 PMpolite-animal-10151
02/06/2023, 1:01 PMabundant-terabyte-72655
02/06/2023, 1:02 PMpolite-animal-10151
02/06/2023, 1:04 PMpostgresql:
existingSecret: cloud-pricing-api-postgresql
postgresPassword: xxxxxxx
secretName: cloud-pricing-api-postgresql
little-author-61621
02/06/2023, 1:09 PMcloud-pricing-api-postgresql
secret?abundant-terabyte-72655
02/06/2023, 1:11 PMpostgresPassword
{{- if and (not .Values.postgresql.enabled) (not .Values.postgresql.existingSecret) }}
postgresql-password: {{ .Values.postgresql.external.password | b64enc | quote }}
{{- end }}
postgresql:
# -- Deploy PostgreSQL servers. See [below](#postgresql) for more details
enabled: true
key: postgresql-password
little-author-61621
02/06/2023, 1:21 PMcloud-pricing-api-postgresql
secret have the correct value for the password?(not .Values.postgresql.existingSecret)
part from the secret contentsabundant-terabyte-72655
02/06/2023, 1:41 PMpostgresql-password
key to postgres-password
on secret side as it is creating and the pods are up, but is going to do restart
over and over. The error is Can not connect to the db...
postgresql.postgresqlPassword
but in the postgresql chart, you need to specify postgresql.auth.postgresPassword
.little-author-61621
02/07/2023, 2:17 PMpostgresql.auth.postgresPassword
when installing the helm chart?postgresql.auth.password
. Let me know if that works for you.polite-animal-10151
02/13/2023, 8:55 AMabundant-terabyte-72655
02/13/2023, 12:28 PM{"level":30,"time":1676291116738,"pid":18,"hostname":"cloud-pricing-api-77d59d858f-qjw2p","msg":":rocket: Server ready at <http://0.0.0.0:4000/>"}
{"level":50,"time":1676291124437,"pid":18,"hostname":"cloud-pricing-api-77d59d858f-qjw2p","msg":"Could not connect to database: Error: connect ECONNREFUSED 10.7.39.139:5432"}
{"level":50,"time":1676291124442,"pid":18,"hostname":"cloud-pricing-api-77d59d858f-qjw2p","msg":"Could not connect to database: Error: connect ECONNREFUSED 10.7.39.139:5432"}
Is it a normal behaviour?little-author-61621
02/13/2023, 12:29 PMabundant-terabyte-72655
02/13/2023, 12:31 PMcloud-pricing-api-77d59d858f-qjw2p 1/1 Running 0 4m42s
cloud-pricing-api-init-job-ktclb 1/1 Running 0 4m42s
cloud-pricing-api-postgresql-0 1/1 Running 0 4m42s
On Postgres i can see:
2023-02-13 12:25:15.730 GMT [1] LOG: pgaudit extension initialized
2023-02-13 12:25:15.740 GMT [1] LOG: starting PostgreSQL 14.5 on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2023-02-13 12:25:15.740 GMT [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2023-02-13 12:25:15.740 GMT [1] LOG: listening on IPv6 address "::", port 5432
2023-02-13 12:25:15.746 GMT [1] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"
2023-02-13 12:25:15.754 GMT [154] LOG: database system was shut down at 2023-02-13 12:25:15 GMT
2023-02-13 12:25:15.765 GMT [1] LOG: database system is ready to accept connections
2023-02-13 12:26:34.945 GMT [155] LOG: checkpoints are occurring too frequently (17 seconds apart)
2023-02-13 12:26:34.945 GMT [155] HINT: Consider increasing the configuration parameter "max_wal_size".
2023-02-13 12:26:51.101 GMT [155] LOG: checkpoints are occurring too frequently (17 seconds apart)
2023-02-13 12:26:51.101 GMT [155] HINT: Consider increasing the configuration parameter "max_wal_size".
2023-02-13 12:27:06.994 GMT [155] LOG: checkpoints are occurring too frequently (15 seconds apart)
2023-02-13 12:27:06.994 GMT [155] HINT: Consider increasing the configuration parameter "max_wal_size".
2023-02-13 12:27:23.373 GMT [155] LOG: checkpoints are occurring too frequently (17 seconds apart)
2023-02-13 12:27:23.373 GMT [155] HINT: Consider increasing the configuration parameter "max_wal_size".
2023-02-13 12:27:39.559 GMT [155] LOG: checkpoints are occurring too frequently (16 seconds apart)
2023-02-13 12:27:39.559 GMT [155] HINT: Consider increasing the configuration parameter "max_wal_size".
2023-02-13 12:27:55.455 GMT [155] LOG: checkpoints are occurring too frequently (16 seconds apart)
2023-02-13 12:27:55.455 GMT [155] HINT: Consider increasing the configuration parameter "max_wal_size".
2023-02-13 12:28:12.392 GMT [155] LOG: checkpoints are occurring too frequently (17 seconds apart)
2023-02-13 12:28:12.392 GMT [155] HINT: Consider increasing the configuration parameter "max_wal_size".
2023-02-13 12:28:29.696 GMT [155] LOG: checkpoints are occurring too frequently (17 seconds apart)
2023-02-13 12:28:29.696 GMT [155] HINT: Consider increasing the configuration parameter "max_wal_size".
2023-02-13 12:28:48.088 GMT [155] LOG: checkpoints are occurring too frequently (19 seconds apart)
2023-02-13 12:28:48.088 GMT [155] HINT: Consider increasing the configuration parameter "max_wal_size".
2023-02-13 12:29:09.263 GMT [155] LOG: checkpoints are occurring too frequently (21 seconds apart)
2023-02-13 12:29:09.263 GMT [155] HINT: Consider increasing the configuration parameter "max_wal_size".
2023-02-13 12:29:29.364 GMT [155] LOG: checkpoints are occurring too frequently (20 seconds apart)
2023-02-13 12:29:29.364 GMT [155] HINT: Consider increasing the configuration parameter "max_wal_size".
2023-02-13 12:29:48.452 GMT [155] LOG: checkpoints are occurring too frequently (19 seconds apart)
2023-02-13 12:29:48.452 GMT [155] HINT: Consider increasing the configuration parameter "max_wal_size".
2023-02-13 12:30:09.027 GMT [155] LOG: checkpoints are occurring too frequently (21 seconds apart)
2023-02-13 12:30:09.027 GMT [155] HINT: Consider increasing the configuration parameter "max_wal_size".
2023-02-13 12:30:29.605 GMT [155] LOG: checkpoints are occurring too frequently (20 seconds apart)
2023-02-13 12:30:29.605 GMT [155] HINT: Consider increasing the configuration parameter "max_wal_size".
little-author-61621
02/13/2023, 12:32 PMabundant-terabyte-72655
02/13/2023, 12:32 PMlittle-author-61621
02/13/2023, 12:39 PMabundant-terabyte-72655
02/13/2023, 12:39 PMlittle-author-61621
02/13/2023, 12:39 PMabundant-terabyte-72655
02/13/2023, 12:40 PMpolite-animal-10151
02/15/2023, 3:36 PMlittle-author-61621
02/15/2023, 3:40 PMproductFamily
to Compute Instance
?polite-animal-10151
02/15/2023, 3:42 PMbusy-agent-35515
02/15/2023, 3:44 PMattributes
column as a string: select * from products where "vendorName" = 'aws' and region = 'us-east-1' and attributes::text ilike '%t3a.xlarge%' limit 1
will give you one record where you can see the detailspolite-animal-10151
02/15/2023, 3:44 PMabundant-terabyte-72655
02/17/2023, 9:00 AMrolling update or upgrade
for the cloud pricing api helm chart, how is the behaviour, will work? Right now, we have one issue when we do helm upgrade for our stack and we get this error.mysterious-teacher-68276
02/17/2023, 9:54 AMcontroller-uid
and job-name
from the init job to support a rolling upgrade. Probably something we can add here: https://github.com/infracost/helm-charts/blob/master/charts/cloud-pricing-api/templates/job-init.yaml#L6-L7 . I’ll raise an issue in the helm chart repo to track and fix. That being said I don’t think we’ll have a fix for this today as the team is heads down on shipping some important features/goals. So we’ll most likely get to this some point next week.abundant-terabyte-72655
02/17/2023, 9:57 AMmysterious-teacher-68276
02/17/2023, 9:58 AMabundant-terabyte-72655
02/17/2023, 9:59 AM