I'm a bit of a AWS newbie so forgive me if this is a stupid question. We have a legacy Classic ASP website (not hosted at Amazon) and I wanted to know if its possible to utilize Amazon Cloudwatch for custom logging. I know we could use a site like Loggly or Sumo Logic but their retention policies are a little short and the pricing a bit too expensive for our small site. But essentially, I'm trying to recreate their functionality in AWS.
There is quite a bit of detail on how to log from various Amazon services (EC2, etc...) but I'm not finding much on using Cloudwatch from a non-Amazon hosted site
Basically, I want to SERVERXMLHTTP POST a json log string from our Classic ASP site to Cloudwatch. However, I'm struggling to find the right endpoint and how to post to a particular Log Group that I've created. Do I use
https://monitoring.us-west-1.amazonaws.com/doc/2010-08-01/?Action=PutMetricData
or
https://logs.us-west-1.amazonaws.com/doc/2010-08-01/?Action=PutMetricData
to try to post json like this
[
{
"MetricName": "404 Error",
"Timestamp": "Wednesday, June 12, 2013 8:28:20 PM",
"Value": "http://example.com/badpage.asp",
"Unit": "Count"
}
]
Also, how do I post the json to a particular log group / log stream that I've created? Do I authenticate with some sort of
xxx.setRequestHeader "Authorization", "Basic " & [auth credentials]
?
Thanks for any help!