huksley / prometheus-remote-write

Send samples to prometheus via remote_write from NodeJS
MIT License
19 stars 6 forks source link

Any plans to support AMP (Amazon Managed Prometheus) ? #1

Closed ebolwidt closed 1 year ago

ebolwidt commented 1 year ago

Writing (with remote-write) to AMP requires AWS Sigv4 authentication. Do you have any plans to support that as an authentication mechanism?

huksley commented 1 year ago

Do you have more info on that? I have no idea how it work, but would like to try.

ebolwidt commented 1 year ago

I've found a way to do it using the "fetch" argument in the Options to pushTimeseries.

npm module "aws-sigv4-fetch" has a function "createSignedFetcher" that creates a node-fetcher compatible fetcher function that performs sigv4 authentication.

For AWS's managed prometheus service, use the service name "aps" when you call "createSignedFetcher".

huksley commented 1 year ago

Added to readme, thanks @ebolwidt 👍